I want to know when the data has been added to a chart so I can use localToData()
to draw on the chart. If I do this immediately after setting the dataProvider the chart has not yet updated, so the the call to localToData will not return the correct values. Is there an event I can subscribe to so I know the chart has drawn the data in the dataProvider?
views:
16answers:
2
A:
There is a CollectionChanged event, so you can listen to it. Also, initial data can be fetched using initialize/creationComplete event in the Chart component.
mico
2010-03-22 13:15:37
Thanks, I'm not sure that would fire when the collection was assigned to the chart though.
slashnick
2010-03-22 14:56:30
Sure, it will not. But you can build a setter for a collection for that in your custom chart :) TTT, I don't think that is an elegant solution.
mico
2010-03-22 15:26:21
A:
The updateComplete event whilst not strictly for this purpose, does fire after the series updateDisplayList
method has been called, which is close enough.
slashnick
2010-03-22 14:58:34