Profile Picture

Prevent graph update while adding data

Posted By Joël Golinucci 10 Years Ago
Author
Message
Joël Golinucci
Posted 10 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 30, Visits: 61
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




Similar Topics


Reading This Topic