I know ;-)
I just wanted to avoid creating new big collections

#Luc

2015-06-17 21:12 GMT+02:00 Alexandre Bergel <[email protected]>:

> Hi!
>
> Well… Building the list of coordinate is not a big deal :-)
> { 5 . 1 . 2 . 5 } withIndexCollect: [ :v :index | v @ index ]
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> On Jun 17, 2015, at 7:04 AM, Luc Fabresse <[email protected]> wrote:
>
> Hi Alex,
>
> Thanks for your answer.
> I misunderstood RTStackedDataSet.
> To me, it does not do what the doc says ;-)
>
> I want to do exactly that:
>
> c := RTGrapher new.
> ds := RTDataSet new.
> ds dotShape color: Color red.
> ds points: {5@1 . 1@2 . 20@3 . 5@4 }.
> ds x: [ :e | e y ].
> ds y: [ :e | e x ].
> c add: ds.
> c axisX noDecimal.
> c axisY noDecimal.
> c build.
> c view inspect.
>
> But I would like to not write by hand (or compute) the X values in the
> data set which are the indexes of the element.
>
> Thanks,
>
> #Luc
>
> 2015-06-16 22:39 GMT+02:00 Alexandre Bergel <[email protected]>:
>
>> Hi Luc!
>>
>> This is something that is not really intuitive in Roassal. I am not sure
>> whether this is a bug, but until now, we usually disable the labels on the
>> X-axis.
>>
>> So, your script should be
>> -=-=-=-=-=-=-=-=-=-=-=-=
>> b := RTGrapher new.
>> ds := RTStackedDataSet new.
>> ds dotShape color: Color red.
>> ds points: #(5 1 20 5).
>> ds y: #yourself.
>> b add: ds.
>> b axisX noLabel; noTick.
>> b axisY noDecimal.
>> b
>> -=-=-=-=-=-=-=-=-=-=-=-=
>> <Screen Shot 2015-06-16 at 5.37.44 PM.png>
>>
>> If you need ticks and labels, you can simply do:
>> -=-=-=-=-=-=-=-=-=-=
>> b := RTGrapher new.
>> ds := RTStackedDataSet new.
>> ds barShape width: 10.
>> ds barChartWithBarCenteredTitle: #yourself.
>> ds points: #(5 1 20 5).
>> ds y: #yourself.
>> b add: ds.
>> b axisX noLabel; noTick.
>> b axisY noDecimal.
>>
>> b
>> -=-=-=-=-=-=-=-=-=-=
>> <Screen Shot 2015-06-16 at 5.39.28 PM.png>
>>
>> I hope this solves your problem.
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Jun 15, 2015, at 6:20 PM, Luc Fabresse <[email protected]> wrote:
>>
>> Hi,
>>
>> The doc here [1] says: "Data points may be stacked, meaning that the
>> index of the point in the collection is its X value."
>>
>> When I use the same example as in the doc but with labels and ticks:
>>
>> b := RTGrapher new.
>> ds := RTStackedDataSet new.
>> ds dotShape color: Color red.
>> ds points: #(5 1 20 5).
>> ds y: #yourself.
>> b add: ds.
>> b axisX noDecimal.
>> b axisY noDecimal.
>> b build.
>> b view inspect
>>
>> it seems that y values are not aligned on x ones (i.e. I would expect the
>> first red point to be 1@5). Is it a bug or did I misunderstood something?
>>
>>
>> <Screen Shot 2015-06-15 at 23.18.36.png>
>>
>>
>> [1]
>> https://dl.dropboxusercontent.com/u/31543901/AgileVisualization/Grapher/0202-
>> Grapher.html
>>
>>
>> Thanks,
>>
>> #Luc
>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>
>

Reply via email to