labelConversion: in latest Grapher

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

labelConversion: in latest Grapher

Uko2
Hi,

I’ve launched my oldish project, and encountered an issue with new grapher. When one uses #labelConversion: he has to define an axis label for a certain index of dataset. But in latest Grapher this index can exceed the total number of dataset entries. While this is not an issue for continuos data, I am experiencing problems when I want to graph readings in a stacked manner. For example I have data readings taken in a different moment of time, and I wan to label the index of a reading and it’s time, to give and idea where in time it is, but when I’m asked about the label on 4 indices after my last reading I cannot put there anything.

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

Re: labelConversion: in latest Grapher

abergel
Hi Yuriy,

Can you provide a code snippet please? It would help to really grasp the problem :-)

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



On May 11, 2015, at 5:55 AM, Yuriy Tymchuk <[hidden email]> wrote:

Hi,

I’ve launched my oldish project, and encountered an issue with new grapher. When one uses #labelConversion: he has to define an axis label for a certain index of dataset. But in latest Grapher this index can exceed the total number of dataset entries. While this is not an issue for continuos data, I am experiencing problems when I want to graph readings in a stacked manner. For example I have data readings taken in a different moment of time, and I wan to label the index of a reading and it’s time, to give and idea where in time it is, but when I’m asked about the label on 4 indices after my last reading I cannot put there anything.

Uko
_______________________________________________
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: labelConversion: in latest Grapher

Uko2
Ok, look at something like this:

| b ds items |

items := (100 to: 0 by: -5) asOrderedCollection.

b := RTGrapher new.
b extent: 500 @ 100.
ds := RTStackedDataSet new.
ds points: items.
ds y: #yourself.
ds barShape.

b add: ds.
b axisX
    labelConversion: [ :index |
        (items at: (index min: items size max: 1)) asString ].

b build.
b view

In my case I put time values on x axis. As you can see 0 in the end is really misleading. In the previous axis of grapher last tick was placed right on the last element.

Uko


On 11 May 2015, at 22:43, Alexandre Bergel <[hidden email]> wrote:

Hi Yuriy,

Can you provide a code snippet please? It would help to really grasp the problem :-)

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



On May 11, 2015, at 5:55 AM, Yuriy Tymchuk <[hidden email]> wrote:

Hi,

I’ve launched my oldish project, and encountered an issue with new grapher. When one uses #labelConversion: he has to define an axis label for a certain index of dataset. But in latest Grapher this index can exceed the total number of dataset entries. While this is not an issue for continuos data, I am experiencing problems when I want to graph readings in a stacked manner. For example I have data readings taken in a different moment of time, and I wan to label the index of a reading and it’s time, to give and idea where in time it is, but when I’m asked about the label on 4 indices after my last reading I cannot put there anything.

Uko
_______________________________________________
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


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