GraphET x-axis label - bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GraphET x-axis label - bug?

Usman Bhatti
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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GraphET x-axis label - bug?

abergel
Daniel is away for 1 week. He will work on this once back. This is important

Alexandre


On Sep 16, 2013, at 11:18 AM, Usman Bhatti <[hidden email]> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GraphET x-axis label - bug?

abergel
In reply to this post by Usman Bhatti
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#18853456

Cheers,
Alexandre


On Sep 16, 2013, at 11:18 AM, Usman Bhatti <[hidden email]> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GraphET x-axis label - bug?

Daniel Aviv Notario
In reply to this post by Usman Bhatti
Shoot!
Thanks for spotting it! I'm currntly on holidays but i'll check this out asap.

--- Mensaje Original ---

Desde: "Alexandre Bergel" <[hidden email]>
Enviado: 17 de septiembre de 2013 5:18 PM
Para: "Moose-related development" <[hidden email]>
Asunto: [Moose-dev] Re: GraphET x-axis label - bug?

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#18853456

Cheers,
Alexandre


On Sep 16, 2013, at 11:18 AM, Usman Bhatti <[hidden email]> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GraphET x-axis label - bug?

Usman Bhatti
In reply to this post by abergel
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 <[hidden email]> 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#18853456

Cheers,
Alexandre


On Sep 16, 2013, at 11:18 AM, Usman Bhatti <[hidden email]> 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
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GraphET x-axis label - bug?

abergel
Exactly :-)

Alexandre


On Sep 20, 2013, at 11:42 AM, Usman Bhatti <[hidden email]> 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 <[hidden email]> 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#18853456
>
> Cheers,
> Alexandre
>
>
> On Sep 16, 2013, at 11:18 AM, Usman Bhatti <[hidden email]> 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
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev