Hi!
Today Usman and I have pair-programmed. We improved the legend builder.
Here is an example
Check this out:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
b := RTMondrian new.
b shape rectangle
width: [ :c | c numberOfVariables * 5 ];
height: #numberOfMethods.
b nodes: RTShape withAllSubclasses.
b edges connectFrom: #superclass.
b layout tree.
b normalizer
normalizeColor: #numberOfLinesOfCode using: { Color black. Color red }.
b build.
lb := RTLegendBuilder new.
lb view: b view.
lb addText: 'System complexity view'.
lb addRectanglePolymetricWidth: 'number of methods' height: 'Line of code'
box: 'a Pharo class'.
lb addColorFadingFrom: Color red to: Color black text: 'Number of lines of code'.
lb build.
b
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.