Exactly :-)
Alexandre
On Sep 20, 2013, at 11:42 AM, Usman Bhatti usman.bhatti@gmail.com wrote:
If the labels are same on both axes, we need a way to test the position (x or y axis) of the label, otherwise the labels are not placed correctly. For example:
| 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)
On Tue, Sep 17, 2013 at 5:16 PM, Alexandre Bergel alexandre.bergel@me.com wrote: Thanks for having spotted the bug.
In the meantime, you may want to check this how to add labels in a "manual" way: http://stackoverflow.com/questions/18831437/graph-et-x-axis-labels/18853456#...
Cheers, Alexandre
On Sep 16, 2013, at 11:18 AM, Usman Bhatti usman.bhatti@gmail.com wrote:
Hello,
I am starting to use GraphET and looks really nice. While learning to script with it, I stumbled upon this script that does not place x-axis label in the correct place. In fact the x-axis label is superimposed on y-axis one. Here's how you can reproduce it:
tmpBrowser := GLMDashboard new. tmpBrowser addPaneNamed: #first. tmpBrowser transmit to: #first; andShow: [:a | a graphET title: 'First Chart with ET'; chart: [:chart :mooseModel| chart verticalBarDiagram models: (1 to: 3); xAxisLabel: 'Test label'; yAxisLabel: 'Another'; regularAxis. ]. ]. tmpBrowser openOn: 1
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev