I am developing an application that needs to display real-time data on an XYDiagram2D. Currently I have the data to be displayed in an array, where each element of the array could correspond to a series on the chart. Conceptually, the data looks something like an array of doubles, where element 0 might be a temperature reading, element 1 might be a pressure reading, etc. This array will be updated frequently, and I need the chart to show the new values in real time (although the chart update can go at its own rate; it doesn't have to match the update rate of the underlying data). Typically two elements from the array would be shown on a single chart, so if the data looks like
double Data = new double;
then I might want two series to be shown on the chart, one bound to Data and another bound to Data, for example.
I have not found an example or an answer to a support question that has this kind of binding. Is it possible? Or would it be necessary to rearrange the data and do the binding some other way?
Thanks for any assistance.
An array of double values cannot be linked to the Series directly. It is necessary to initialize the Series.ArgumentDataMember and Series.ValueDataMember properties based on actual fields containing values (see Bind a Series to a Data Source).
As an alternative solution, populate the Series.Points collection manually.