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.



Let me know how it goes!

Cheers,
Alexandre


> On Mar 5, 2016, at 11:28 PM, Offray Vladimir Luna Cárdenas 
> <offray.l...@mutabit.com> wrote:
> 
> 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 | n].
>     b build.
>     b view elements @ popup.
>     ^ b view.
> ===========
> 
> The strange thing is that 2nd and 3rd boxes don't get the proper label, but 
> everyone else does....
> 
> Cheers,
> 
> Offray
> 
> On 05/03/16 20:56, Offray Vladimir Luna Cárdenas wrote:
>> 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:
>> 
>> <Mail Attachment.png>
>> 
>> The idea is to put labels like "uno", "dos", "tres", "cuatro", "cinco" on 
>> each rectagle instead of the numbers. Anyway we have ended our 
>> hackathon/workshop in the #DataWeek3 and #OpenDataDay for today. A really 
>> good balance  and this third edition is the best of all until now. Still 
>> there is a step learning curve and "cultural shock" on Smalltalk, but agile 
>> visualization, the Roassal environment, GT Tools, and Pharo are promising 
>> and interesting for newcomers.
>> 
>> Cheers and thanks again,
>> 
>> Offray
>> 
>> 
>> On 05/03/16 20:42, Alexandre Bergel wrote:
>>> B view elements @ RTLabelled
>> 
> 

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



Reply via email to