Hi!
Today with Juraj we completely rewrote RTTimeline.
Before you needed to do:
-=-=-=-=-=-=-=-=-=-=-=-=
b := RTTimeLine new.
b addEntry: (RTTimeLineEntry new identifier: #WP1; start: 0; end: 5).
b addEntry: (RTTimeLineEntry new identifier: #WP2; start: 5; end: 8).
b addEntry: (RTTimeLineEntry new identifier: #WP3; start: 7; end: 10).
b axisX numberOfLabels: 5.
b
-=-=-=-=-=-=-=-=-=-=-=-=
Now, you need:
-=—=-=—=-=—=-=—=
data := #(#(WP1 0 5) #(WP2 5 8) #(WP3 7 10)).
b := RTTimeline new.
s := RTTimelineSet new.
s objects: data.
s lineIdentifier: #first.
s start: #second.
s end: #third.
b add: s.
b
-=—=-=—=-=—=-=—=
The advantages, is that the object model is kept within the roassal element.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> On May 8, 2015, at 4:33 PM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
>
> Hi Hannes!
>
> Here is a first shoot paired-programmed with Juraj using Roassal:
>
-=-=-=-=-=-=-=-=-=-=-=-=
b := RTTimeLine new.
b addEntry: (RTTimeLineEntry new identifier: #WP1; start: 0; end: 5).
b addEntry: (RTTimeLineEntry new identifier: #WP2; start: 5; end: 8).
b addEntry: (RTTimeLineEntry new identifier: #WP3; start: 7; end: 10).
b axisX numberOfLabels: 5.
b
-=-=-=-=-=-=-=-=-=-=-=-=
>
> <Screen Shot 2015-05-08 at 4.21.25 PM.png>
>
> Here some slightly more elaborated example:
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> “One color per entry"
> | b d |
> b := RTTimeLine new.
> b addEntry: (RTTimeLineEntry new identifier: #c1; start: 0; end: 5).
> b addEntry: (RTTimeLineEntry new identifier: #c1; start: 6; end: 8).
>
> b addEntry: (RTTimeLineEntry new identifier: #c2; start: 0; end: 5).
> b addEntry: (RTTimeLineEntry new identifier: #c2; start: 8; end: 10).
>
> b addEntry: (RTTimeLineEntry new identifier: #c3; start: 0; end: 10).
>
> b addEntry: (RTTimeLineEntry new identifier: #c4; start: 5; end: 10).
>
> b addEntry: (RTTimeLineEntry new identifier: #c5; start: 5; end: 8).
>
> d := RTVerticalTickLineDecorator new.
> d shape line color: Color white.
> b addDecorator: d.
> b axisX
> numberOfLabels: 5;
> labelRotation: -45;
> labelConversion: [ :v | Date year: 2015 day: v ].
>
> b shape color: (RTMultiLinearColorForIdentity new objects: b entries).
> b
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> <Screen Shot 2015-05-08 at 4.21.58 PM.png>
>
> One color per timeline
>
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> | b |
> b := RTTimeLine new.
> b addEntry: (RTTimeLineEntry new identifier: #c1; start: 0; end: 5).
> b addEntry: (RTTimeLineEntry new identifier: #c1; start: 6; end: 8).
>
> b addEntry: (RTTimeLineEntry new identifier: #c2; start: 0; end: 5).
> b addEntry: (RTTimeLineEntry new identifier: #c2; start: 8; end: 10).
>
> b addEntry: (RTTimeLineEntry new identifier: #c3; start: 0; end: 10).
>
> b addEntry: (RTTimeLineEntry new identifier: #c4; start: 5; end: 10).
>
> b addEntry: (RTTimeLineEntry new identifier: #c5; start: 5; end: 8).
>
> d := RTVerticalTickLineDecorator new.
> d shape line color: Color white.
> b addDecorator: d.
> b axisX
> numberOfLabels: 5;
> labelRotation: -45;
> labelConversion: [ :v | Date year: 2015 day: v ].
>
> b shape color: (RTMultiLinearColorForIdentity new command: #identifier; objects:
#(c1 c2 c3 c4 c5)).
> b
> -=-=-=-=-=-=-=-=-=-=-=-=
> <Screen Shot 2015-05-08 at 4.23.04 PM.png>
>
> Age of some classes:
> -=-=-=-=-=-=-=-=-=-=-=-=
> | b |
> b := RTTimeLine new.
> b extent: 500 @ 500.
> ((RTShape withAllSubclasses sortedAs: #ageInDaysRounded) select: #hasMethods)
> do: [ :cls |
> e := RTTimeLineEntry new.
> e identifier: cls.
> e start: cls computeYoungestMethod ageInDays.
> e end: cls computeOldestMethod ageInDays.
> b addEntry: e ].
> b
> -=-=-=-=-=-=-=-=-=-=-=-=
> <Screen Shot 2015-05-08 at 4.23.50 PM.png>
>
>
> All these examples are in the Roassal time line example menu.
>
> This is still an early version. Let us know how it goes!
>
https://www.facebook.com/ObjectProfile/posts/840542572699008
<https://www.facebook.com/ObjectProfile/posts/840542572699008>
>
> Cheers,
> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel
http://www.bergel.eu <http://www.bergel.eu/>
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>> On May 7, 2015, at 4:25 PM, H. Hirzel <hannes.hirzel(a)gmail.com
<mailto:hannes.hirzel@gmail.com>> wrote:
>>
>> Hello
>>
>> Has somebody done a GANTT chart?
>>
>> GanttChartMorph openOn: aCollectionOfActivities
>>
>> ?
>>
>> Activities have
>> - id
>> - description
>> - start date
>> - end date
>> ?
>>
>> Regards
>>
>> Hannes
>>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev