Timeline with time

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

Timeline with time

Uko2
Hi everyone,

I need to draw a timeline (like in RTRoassalExample>>#exampleTimeLineOfRoassal) and for x value I want to use DateAndTime. First thing that I’ve noticed is that normaliser does not work with time. so I’ve converted it to number with #asSeconds, but now all my entities are in one place. Does anybody know if there is an easier way to do that? I’ve seen post about charter, but can I use it for 1D case?

Cheers!
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: Timeline with time

abergel
Hi Yuriy,

Indeed, times are a bit tricky to use because they do not respect the protocol set by Magnitude (e.g., "5 < Date today” raise an exception). This is quite an unfortunate situation. It would be great if someone could tackle this. 

As you said, what can be easily done is converting the date into a number, #asSecond seems to do a pretty good job. I have just tried this:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
methods := RTShape withAllSubclasses flatCollect: #methods.

v := RTView new.

es := RTEllipse elementsOn: methods.
v addAll: es.

RTMetricNormalizer new
elements: es;
alphaColor: 0.3;
normalizeSize: #numberOfLinesOfCode min: 5 max: 30 using: #sqrt;
normalizeX: [ :aMethod | aMethod date asSeconds ] min: 0 max: 300.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

CompiledMethod>>date returns the time stamp of a method.

Regarding your problem, I am not sure what the exact problem is. 
Do you use RTMetricNormalizer?
Have you tried to remove the minimum number of seconds your data set has?

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



On Sep 22, 2014, at 5:48 PM, Yuriy Tymchuk <[hidden email]> wrote:

Hi everyone,

I need to draw a timeline (like in RTRoassalExample>>#exampleTimeLineOfRoassal) and for x value I want to use DateAndTime. First thing that I’ve noticed is that normaliser does not work with time. so I’ve converted it to number with #asSeconds, but now all my entities are in one place. Does anybody know if there is an easier way to do that? I’ve seen post about charter, but can I use it for 1D case?

Cheers!
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