I will have a look at it ASAP. I am now on my way
to Lille...
Alexandre
Le 12-12-2013 à 10:22, Yuriy Tymchuk
<yuriy.tymchuk(a)me.com> a écrit :
Ok, I’ve made some progress in this direction. For now on I’ve spotted 3 bottlenecks of
plotting non-number values.
1) setMaxAndMinXValues
self maxXValue: (self xValues max max: 0).
self minXValue: (self xValues min min: 0)
max: 0 and min: 0 are ruining things a bit. It will be nice to rethink this part. I’m not
sure that it’s a good idea to have 0 all the time. Eg. I’d like to plot something in range
10100..10200 and as the result my data will take a very small place. Removing max: 0 and
min: 0 solves the problem but they were put there for some reason.
2) getPixelsFromXValue: value
^ value * (self width) / (self maxXValue - self minXValue)
We get problem when multiplying Date (value) by number. We can rewrite line in this way
^ (value - self minXValue) * (self width) / (self maxXValue - self minXValue) + minValue
this way we operate with durations, which makes more sense.
3) sizeInPixelsOfPositiveXArea: maxSize
"return the bar size (width or height) for the corresponding maxSize"
(self minValue > 0 and: [ self maxValue > 0 ]) ifTrue: [ ^ maxSize ].
(self minValue <= 0 and: [ self maxValue > 0 ]) ifTrue: [ ^ maxSize * self
maxXValue / (self maxXValue + (self minXValue abs)) ].
(self minValue <= 0 and: [ self maxValue <= 0 ]) ifTrue: [ ^ 0 ].
^ self error: 'should not be here’
I have no idea what this does :). To make things work I just removed everything and made
this thing return maxSize… So I’d really appreciate some kind of explanation. It will be
good to push this into a working state.
Cheers.
Uko
> On 10 Dec 2013, at 18:15, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
>
> Hi Uko,
>
> GraphET and Roassal indeed do not support date.
> Let us know how we can help.
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel
http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>> On Dec 10, 2013, at 11:19 AM, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
>>
>> Hi guys,
>>
>> you will probably hate me after today, but I have one more question.
>>
>> I’m trying to plot some data that is related to time. By default GraphET (and
Roassal) do not support Date as value. Of course I can convert timestamp to seconds from
epoch but maybe it would be cool to be able to use just Timestamp. For me it seems that
evolution of some metric in time should be quite common.
>>
>> Does anybody have intention to implement something like this?
>>
>> Uko
>> _______________________________________________
>> Moose-dev mailing list
>> Moose-dev(a)iam.unibe.ch
>>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch