Chart FX-Passing Data Using the API
Passing Data using the Value property
Sometimes the easiest or most convenient way to pass numerical data to Chart FX is to use the Value property. The Value property allows you to set the numerical value for a point in a particular series in the chart.
The Value property takes the index of the series and the index of the point you want to populate – both zero based indexes.
For example, if you want to set a value of 40 for point 3 of series 2, you must use the Value property from the chart object passing both the series index of 1 and point index of 2 to the value property, and then assign the value 40.
Axes Rescaling
When data is loaded to the chart, by default, Chart FX automatically adjusts the axes Min and Max to guarantee every value is inside the range. This behavior is controlled by the axes AutoScale property. However, if a new set of values is loaded on the same chart, Chart FX will adjust the Min and Max again, only increasing when necessary but never decreasing them, which can affect the chart visualization. To force the Min and Max to be recalculated based on the new set of data, call the axes ResetScale method before loading the new data.
Hidden Points
Chart FX has the ability to create hidden points in the chart. Although Chart FX forces the same amount of points per series, you may specify hidden points to create the illusion of some invisible points in the chart. Assigning the Hidden Chart constant:
All you need to do to create a hidden point is to assign the Chart object Hidden constant as a value to a particular point.
Changing Existing Values in the Chart
If you've already populated the chart and all you want to do is change an isolated value; you may do so without repopulating all the data again. As an example, the API calls necessary to make such a change are as follows:
© Copyright 2000-2023 COGITO SOFTWARE CO.,LTD. All rights reserved