I am attempting to replace the Silverlight XamDataChart with the jQuery version but I cannot seem to find much documentation about available events and general procedures on how to update the structure of a chart. For example, how would one add more series or axes. I assume simply redefine the igDataChart? I have also seen the notifyInsertItem event being used. Also, each time I add data to the datasource to I need to use notifyClearItems to redraw the whole chart or do I use the notifyInsetItem for that too?
Ultimately I want to be able to add an x axis, y axis, and a series and bind it to a dataset then dynamically add a whole other x axis, y axis, series and bind this new series to another dataset (or another property of one big dataset). What I need to accomplish is that each series will have the same visible datetime range but one series may have a point every second and then next every 5 seconds and the vertical range can be completely different as well.
Is there more documentation somewhere?
Hi Mike,
Please let me know if you need any additional assistance regarding this matter.
Mike, if there was less CPU used in the clear case, then the frequency with which you are sending events may be high enough that sending the clear event is more worthwhile even though it has more overhead than the more fine grained events, as discussed.
The notify events do not modify the collection, they only notify the chart that the collection has been changed.
-Graham
Just to be clear, I need to update the data in the collection and then call NotifySetItem right? Calling that does not update the collection itself does it?
I tested removing/adding the point as they come in and the that used twice as much cpu as simply calling clear several times per second.
You could call remove then insert or you could just call NotifySetItem, and that should work. Some of this API may end up a bit rearranged by the time we hit RTM.
Actually, a more interesting question is I am actually just replacing items in my datasource. Would I be able to simply update the item in the datasource array and then call NotifyInsertItem or do I need to remove it first?