Just for the record, if you want to do that with GraphET, you should use the message
modelAxis, which does practically the same, but the label sticks in the axis, with
negative numbers having it over the axis and positive numbers below the axis.
Here's an example:
| diagram |diagram := GETDiagramBuilder new.diagram verticalBarDiagrammodels: (1 to:
10);modelAxis.diagram open
resulting in:
https://www.facebook.com/ObjectProfile/photos/pb.340543479365589.-220752000…
;) -Daniel
From: alexandre.bergel(a)me.com
Date: Sun, 20 Apr 2014 22:25:18 -0300
To: moose-dev(a)iam.unibe.ch
Subject: [Moose-dev] Re: Roassal Tip #2: Labeling bar with GraphET.
On any element.
Try this:
-=-=-=-=-=-=-=-=-=-=-=-=| v es |
v := RTView new.
v @ RTDraggableView.
es := (RTEllipse new size: #numberOfMethods) elementsOn: RTObject withAllSubclasses.
v addAll: es.
es @ RTPopup @ RTLabelled @ RTDraggable.
RTFlowLayout new maxWidth: 900; gapSize: 50; on: es.
v open-=-=-=-=-=-=-=-=-=-=-=-=
Alexandre
On Apr 20, 2014, at 9:06 PM, Leo Perard <leo.perard(a)gmail.com> wrote:
Looks pretty cool !
Can we use on any RTShape or only RTBox ?
On Sun, Apr 20, 2014 at 11:40 PM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
Roassal Tip #2: Labeling bar with GraphET.
You can use @RTLabelled for each bar elements. Consider the following example:
-=-=-=-=-=-=-=-=-=
| diagram |
diagram := GET2DiagramBuilder new.
diagram horizontalBarDiagram
models: #(10 12 13 200 150 -13 149 -151);
regularAxis.
diagram build.
"Pick the horizontal bars and add a label"
diagram view elements do: [ :e |
(e shape class == RTBox)
ifTrue: [ e @ RTLabelled new right ]
].
diagram view open
-=-=-=-=-=-=-=-=-=
<10168048_620580701361864_1868405001679336135_n.png>
https://www.facebook.com/ObjectProfile/photos/a.341189379300999.82969.34054…
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
Leo Perard
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev