| chart |
chart := GETDiagramBuilder new.
chart verticalBarDiagram
models: (1 to: 10);
y: #yourself;
regularAxis;
height: 200.
chart open.
"We use the same model elements"
(1 to: 10) do: [ :value |
| bar label |
"We define a label, and add it to the view"
label := ROLabel elementOn: value asString.
chart rawView add: label.
"We get the bar, the gray element that grows up"
bar := chart rawView elementFromModel: value.
"Move the label below its corresponding bar"
ROConstraint move: label below: bar ].
"Inserting high level labels"
chart rawView add: ((ROLabel red elementOn: 'Chart about my life') translateBy: 200 @ 0).
chart rawView add: ((ROLabel elementOn: 'Happiness') translateBy: -30 @ -40).
chart rawView add: ((ROLabel elementOn: 'Passing days') translateBy: 650 @ 210)