Re: [Pharo-users] Hackathon question (kind of urgent): Adding labels to a treemap

2016-03-06 Thread Offray Vladimir Luna Cárdenas
Thanks Alexandre. Your code lead me to the following, which solves the issue: === | boxedLabels b labels | b := RTTreeMapBuilder new. labels := #('uno' 'dos' 'tres' 'cuatro' 'cinco'). boxedLabels := (RTLabelled new color: Color black; center). boxedLabels text: [:index | labels

Re: [Pharo-users] Hackathon question (kind of urgent): Adding labels to a treemap

2016-03-06 Thread Alexandre Bergel
You can do something like that: b := RTTreeMapBuilder new. labels := #('uno' 'dos' 'tres' 'cuatro' 'cinco'). b shape fillColor: Color veryLightGray. b from: (1 to: 5) using: [#()]. b weight: [:n | n]. b build. b view elements @ (RTLabelled new color: Color black; center). ^ b view.

Re: [Pharo-users] Hackathon question (kind of urgent): Adding labels to a treemap

2016-03-05 Thread Offray Vladimir Luna Cárdenas
Almost there! === | b labels popup | labels := #('uno' 'dos' 'tres' 'cuatro' 'cinco'). popup := RTPopup new. popup text: [:object | labels at: object ]. b := RTTreeMapBuilder new. b shape fillColor: Color random. b from: (1 to: 5) using: [#()]. b weight: [:n |

Re: [Pharo-users] Hackathon question (kind of urgent): Adding labels to a treemap

2016-03-05 Thread Offray Vladimir Luna Cárdenas
Thanks Alexandre, even more being away of the computer... It kind of works. Now the visualization shows the labels in the upper side of each rectangle. Like this: The idea is to put labels like "uno", "dos", "tres", "cuatro", "cinco" on each rectagle instead of the numbers. Anyway we have en

Re: [Pharo-users] Hackathon question (kind of urgent): Adding labels to a treemap

2016-03-05 Thread Alexandre Bergel
I am not in front of my computer: B view elements @ RTLabelled I think it should do it Alexandre > Le 5 mars 2016 à 19:44, Offray Vladimir Luna Cárdenas > a écrit : > > Hi, > > We're in our local Open Data Day hackathon, creating a treemap to visualize > public spending. We have cleaned th

[Pharo-users] Hackathon question (kind of urgent): Adding labels to a treemap

2016-03-05 Thread Offray Vladimir Luna Cárdenas
Hi, We're in our local Open Data Day hackathon, creating a treemap to visualize public spending. We have cleaned the dataset and made some queries to zoom into the info we're interested in. So far, so good, but now we would like to change the labels on a treemap. So consider this code: =