LineChart problem
I have an array of objects looking like this
obj.date=23/02/2010, obj.regType=0, obj.value=1000;
obj.date=23/03/2010, obj.regType=0, obj.value=500;
obj.dat开发者_如何学Pythone=23/02/2010, obj.regType=1, obj.value=500;
obj.date=23/04/2010, obj.regType=1, obj.value=1000;
I want the line series to be by regType. On the x-axis to have the dates and on the y-axis to have the values.
Is it possible to do that? because i looked on the internet and the examples did not help me.
Thank you
Might as well add this as an answer:
No need for Drawing API. If you can arrange those objects into two separate collections by regType
most of the work is done. Then create two LineSeries with xField set to date
and yField to value
and bind one collection for each as a dataProvider
.
New minimal example where collection manipulation is handled quite nicely with ListCollectionView:
- http://pastebin.com/jkyn2UEz
精彩评论