Hi,
Just to make sure you understand exactly the problem I'm getting :
The CWGraph control works great when updating it's value (i.e. when I get new values to plot) but the problem I'm getting is with the display of fixed, existing data.
If I put my control in history mode (so that it doesn't update itself with new data) and then I do CWGraph.TrackMode = cwGTrackPanPlotAreaXY and then I move the plotted data around with the mouse, the refreshing of the display becomes really slow. It kind of "lag" behing the motion of the mouse. I also get the same problem with CWGraph.TrackMode = cwGTrackDragCursor. The cursor "lags" a lot behind the mouse. In both case, I can get up to 2 seconds of that "lag" between the moment I release the mouse button and the moment the graph (or the cursor) stops moving. And also, the amount of that "lag" isn't always the same. It "seems" to be dependant on the amount of "drawing" shown in the graph (i.e. a graph with flat lines doesn't "lag" as much as a graph with lots of spikes) so it might have something to do with the way TerminalServices refreshes the display of it's clients. And also, as I said in my original post, the control works fine on a regular PC when it is run locally.
So It's not related to how the CWGraph control render it's data (since the CWGraph.ChartXY method isn't called during the dragging of the display) and also the graph doesn't plot "new" data, it re-plot the entire graph on each "refresh" since the data stored in the archiving system is being compressed and mignt change over time because of that. By the way, should I use ChartXY or PlotXY in this case if I want to keep only the last set of data I got in the CWGraph buffer?
And also, I plot 2 times as much data as it is needed to render the full graph. I put half of the "spare" data on each side of the graph so that when the user drag the plot area around, it sees some data on each side and I do a full refresh when it release the button. And even better, the API I use to access the archiving system has a special function to get data for graph rendering. It return only the amount of points needed to render the graph based on it's width in pixels (it returns up to 5 points for each pixels (if they are differents) : min, max, start of period, end of period and one more point if needed to better represent the "average" value of the period) so I always have more or less the same amount of points in my graph (1450 pixels * 2 times the width * 5 points = 14500 points, which is the value I've set ChartLenght to)
As fot the testing of one of your examples in our HMI, I might give it a try this week to see how it will react. I'll give you some feedback on it when I'll be done.
Thank you and good day,
Eric Brousseau
AIA Automation Inc.