Graph-ET x-axis labels

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

Graph-ET x-axis labels

Natalia Tymchuk
 Hello.
Please help me with my question http://stackoverflow.com/questions/18831437/graph-et-x-axis-labels
Thanks.
Best regards.

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

Re: Graph-ET x-axis labels

abergel
Hi Natalia,

Daniel, the author of GraphET is currently on holidays. He will be back very soon.

In the meantime, it is easy to add it manually. Consider the example:

-=-=-=-=-=-=-=-=-=-=
chart verticalBarDiagram 
models: (1 to: 20);
regularAxis;
height: 200.

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: 430 @ 210)
-=-=-=-=-=-=-=-=-=-=
The screenshot illustrates the result. 

Alexandre


On Sep 16, 2013, at 12:23 PM, Natalia Tymchuk <[hidden email]> wrote:

 Hello. 
Please help me with my question http://stackoverflow.com/questions/18831437/graph-et-x-axis-labels
Thanks. 
Best regards.
_______________________________________________
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: Graph-ET x-axis labels

abergel
Sorry, I read the question too fast.
I guess this is what you are looking for:

-=-=-=-=-=-=-=-=
| chart |

chart := GETDiagramBuilder new.
chart verticalBarDiagram 
models: ($a to: $z); 
y: #asInteger;
regularAxis;
height: 200.

chart open.

"We use the same model elements"
($a to: $z) 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)
-=-=-=-=-=-=-=-=



I know this has a lot of manual action. GraphET will get better over the time

Cheers,
Alexandre


On Sep 17, 2013, at 11:35 AM, Alexandre Bergel <[hidden email]> wrote:

Hi Natalia,

Daniel, the author of GraphET is currently on holidays. He will be back very soon.

In the meantime, it is easy to add it manually. Consider the example:

-=-=-=-=-=-=-=-=-=-=
chart verticalBarDiagram 
models: (1 to: 20);
regularAxis;
height: 200.

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: 430 @ 210)
-=-=-=-=-=-=-=-=-=-=

The screenshot illustrates the result. 

Alexandre

<Screen Shot 2013-09-17 at 11.32.24 AM.png>
On Sep 16, 2013, at 12:23 PM, Natalia Tymchuk <[hidden email]> wrote:

 Hello. 
Please help me with my question http://stackoverflow.com/questions/18831437/graph-et-x-axis-labels
Thanks. 
Best regards.
_______________________________________________
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

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
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: Graph-ET x-axis labels

Tudor Girba-2
Thanks Natalia for the question. And thanks Alex for the quick answer.

Indeed, as we will iterate, it will get better and simpler.

Doru


On Tue, Sep 17, 2013 at 5:08 PM, Alexandre Bergel <[hidden email]> wrote:
Sorry, I read the question too fast.
I guess this is what you are looking for:

-=-=-=-=-=-=-=-=
| chart |

chart := GETDiagramBuilder new.
chart verticalBarDiagram 
models: ($a to: $z); 
y: #asInteger;
regularAxis;
height: 200.

chart open.

"We use the same model elements"
($a to: $z) 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)
-=-=-=-=-=-=-=-=



I know this has a lot of manual action. GraphET will get better over the time

Cheers,
Alexandre


On Sep 17, 2013, at 11:35 AM, Alexandre Bergel <[hidden email]> wrote:

Hi Natalia,

Daniel, the author of GraphET is currently on holidays. He will be back very soon.

In the meantime, it is easy to add it manually. Consider the example:

-=-=-=-=-=-=-=-=-=-=
chart verticalBarDiagram 
models: (1 to: 20);
regularAxis;
height: 200.

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: 430 @ 210)
-=-=-=-=-=-=-=-=-=-=

The screenshot illustrates the result. 

Alexandre

<Screen Shot 2013-09-17 at 11.32.24 AM.png>

On Sep 16, 2013, at 12:23 PM, Natalia Tymchuk <[hidden email]> wrote:

 Hello. 
Please help me with my question http://stackoverflow.com/questions/18831437/graph-et-x-axis-labels
Thanks. 
Best regards.
_______________________________________________
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

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




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




--

"Every thing has its own flow"

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