Re: [Pharo-dev] Charting in Roassal2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Charting in Roassal2

Pharo Smalltalk Users mailing list
Hi!

Roassal supports Whisker plots, but not exactly candlestick.

You can try this:

-=-=-=-=-=-=-=-=-=-=-=-=
| b createList r |
r := Random new.
createList := [ :size :d1 :d2 | (1 to: size) collect: [ :i | d1 + (r next * (d2-d1))] ].

b := RTGrapher new.
(1 to: 10) do: [ :i | | ds |
ds := RTBoxPlotDataSet new.
ds points: (createList value: 20 value: 0 value: 20).
b add: ds.].
b
-=-=-=-=-=-=-=-=-=-=-=-=
 
Which produces:


Another example:
=-=-==-=-==-=-==-=-==-=-==-=-==-=-==-=-==-=-==-=-=
| b ds |
b := RTGrapher new.
b extent: 400 @ 200.
RTShape withAllSubclasses
do: [ :cls | 
ds := RTBoxPlotDataSet new.
ds points: (cls rtmethods collect: #numberOfLinesOfCode).
b add: ds ].
^ b
=-=-==-=-==-=-==-=-==-=-==-=-==-=-==-=-==-=-==-=-=

Which shows the distribution of methods size in Roassal

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Jul 27, 2018, at 8:47 PM, Shaping <[hidden email]> wrote:

Hi Folks.
 
Can anyone tell me whether we have candlestick-charting ability in Roassal2?
 
 
Shaping