27/04/2018
Here is another script of the day. Today we illustrate the Sunburst visualization. Handy to represent hierarchy. The script visualizes the Pharo collection class library (Array classes vs Set classes vs Hash classes)
-=-=-=-=-=-=-=-=-=-=-=-=
p := RTPalette c3.
b := RTSunburstBuilder new.
b layout sunburstWithRadius: 100.
b
angularSpacing: 1;
radialSpacing: 5.
b shape
color: [ p first ];
if: [ :cls | '*Array*' match: cls name ] color: [ p second ];
if: [ :cls | '*Set*' match: cls name ] color: [ p third ];
if: [ :cls | '*Hash*' match: cls name ] color: [ p fourth ]
.
b explore: Collection using: .
b build.
lb := RTLegendBuilder new.
lb view: b view.
lb addText: 'Visualizing the collection Pharo collection class library'.
lb addColor: p second text: 'Array-like classes'.
lb addColor: p third text: 'Set-like classes'.
lb addColor: p fourth text: 'Hash-classes classes'.
lb build.
b view.
-=-=-=-=-=-=-=-=-=-=-=-=
More info on http://AgileVisualization.com and the Discord channel (http://pharo.org/community)