Hi,
I would like to know what is the best way to update a large quantity of NRangeSeries into a graph without freezing the whole application.
Knowing that the graph will be updated every 5 seconds (maybe less)
I thought of 2 options :
1) Disable the graph refresh, clear all values from the graph, add the new values and fillstyles, re-enable the graph refresh
2) As the points will be the same each time but only the colors will change, only update the fill styles
For option 1, I'm a bit lost between all these nevron objects and I don't really know where to look for the refresh disable/enable property (the NChartControl, the NChart or the NRangeSeries object) ?
For option 2, I'm not sure that using the FillStyles is the best thing to do. For each point I would like to be able to define an associated color corresponding to a value not depending on the coordinates. Now each time I add a new point, I do it this way:
For Each pt As tGraphPoint In ptLst
fRangeSeries.Values.Add(pt.Z) 'Nevron Y start - Deepth (Z axis)
fRangeSeries.Y2Values.Add(pt.Z + 2) 'Nevron Y end
fRangeSeries.XValues.Add(pt.X) 'Nevron X start - Horizontal (X axis)
fRangeSeries.X2Values.Add(pt.X + 1) 'Nevron X end
fRangeSeries.ZValues.Add(pt.Y) 'Nevron Z start - Vertical (Y axis)
fRangeSeries.Z2Values.Add(pt.Y + 1) 'Nevron Z end
i += 1
fRangeSeries.FillStyles.Add(i, New NColorFillStyle(GetColorFromValue(pt.Value, plotVariable)))
Next
But when comes the time to refresh what is the best thing to do ? Clear FillStyles and only add the new ones or is there a way to replace the specific color for a given coordinate ?
Thanks for your help,
Regards,
Joël