pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

Roassal3 Popups

ED
Evan Donahue
Wed, Mar 31, 2021 3:37 AM

Hello,

Just returning to Pharo after 1000 years and have discovered that Roassal
has upgraded to Roassal3. Trying to update my inspector integrations and
can't seem to figure out how to get popups working. How can I get popups
for the y values in a scatter plot such as the following:

RSChart new addPlot: (RSScatterPlot new y: #(1 2 3)).

Thanks,
Evan

Hello, Just returning to Pharo after 1000 years and have discovered that Roassal has upgraded to Roassal3. Trying to update my inspector integrations and can't seem to figure out how to get popups working. How can I get popups for the y values in a scatter plot such as the following: RSChart new addPlot: (RSScatterPlot new y: #(1 2 3)). Thanks, Evan
AB
Alexandre Bergel
Thu, Apr 1, 2021 10:51 AM

Dear Evan,

Welcome back!
Yes, we moved to Roassal3, and as you may have experienced, not all the features of Roassal2 have been migrated to Roassal3.

Currently, popup in charts are still work in progress. However, you can have something that should do what you expect using:

-=-=-=-=-=-=-=-=
chart := RSChart new.

classes := Collection withAllSubclasses.
dataX := classes collect: #numberOfMethods.
dataY := classes collect: #numberOfLinesOfCode.

plot := RSScatterPlot new x: dataX y: dataY.

plot processBlock: [ :shapes |
shapes doWithIndex: [ :shape :index |
shape model: (classes at: index).
shape @ (RSPopup text: 'My data: ', (classes at: index) asString)
] ].

chart addPlot: plot.

chart xlabel: 'number of methods'.
chart ylabel: 'number of lines of code'.
chart
-=-=-=-=-=-=-=-=

However, be aware that this code may soon not work anymore. In particular, we plan to remove the processBlock: method and replace by something else.

Let us know how it goes

Cheers,
Alexandre

On 31 Mar 2021, at 05:37, Evan Donahue emdonahu@gmail.com wrote:

Hello,

Just returning to Pharo after 1000 years and have discovered that Roassal has upgraded to Roassal3. Trying to update my inspector integrations and can't seem to figure out how to get popups working. How can I get popups for the y values in a scatter plot such as the following:

RSChart new addPlot: (RSScatterPlot new y: #(1 2 3)).

Thanks,
Evan

Dear Evan, Welcome back! Yes, we moved to Roassal3, and as you may have experienced, not all the features of Roassal2 have been migrated to Roassal3. Currently, popup in charts are still work in progress. However, you can have something that should do what you expect using: -=-=-=-=-=-=-=-= chart := RSChart new. classes := Collection withAllSubclasses. dataX := classes collect: #numberOfMethods. dataY := classes collect: #numberOfLinesOfCode. plot := RSScatterPlot new x: dataX y: dataY. plot processBlock: [ :shapes | shapes doWithIndex: [ :shape :index | shape model: (classes at: index). shape @ (RSPopup text: 'My data: ', (classes at: index) asString) ] ]. chart addPlot: plot. chart xlabel: 'number of methods'. chart ylabel: 'number of lines of code'. chart -=-=-=-=-=-=-=-= However, be aware that this code may soon not work anymore. In particular, we plan to remove the processBlock: method and replace by something else. Let us know how it goes Cheers, Alexandre > On 31 Mar 2021, at 05:37, Evan Donahue <emdonahu@gmail.com> wrote: > > Hello, > > Just returning to Pharo after 1000 years and have discovered that Roassal has upgraded to Roassal3. Trying to update my inspector integrations and can't seem to figure out how to get popups working. How can I get popups for the y values in a scatter plot such as the following: > > RSChart new addPlot: (RSScatterPlot new y: #(1 2 3)). > > Thanks, > Evan