DataSeries

This section is regarding Methods and Properties available in DataSeries. All DataSeries of a Chart reside inside data array and you can access them as shown below.


Example :
        chart.data[0].get(“type”);
        chart.data[0].set(“type”, “spline”);

Note
  • Chart should be rendered before you can access DataSeries & its methods / properties.

DataSeries Methods:

Method Description Example
get(String propertyName) Returns the specified property of dataSeries chart.data[0].get(“zoomType”);
set(String propertyName, Mixed value [,Boolean updateChart = true]) Sets the specified property of dataSeries & optionally updates (default) the chart chart.data[0].set(“zoomType”, “y”);
addTo(String arrayName, Object options [, Number index = array.length]) Adds a new element of given type to the specified array chart.data[0].addTo(“dataPoints”, {y: 27});
remove([Boolean updateChart = true]) Remove the specified dataSeries chat.data[1].remove();

Writable Properties in DataSeries:

All data options become available as properties after Chart Render. You can access them either via get method or dot notation. But you can change / set those values only via set method.

Please refer to DataSeries Element for complete list of properties available.

Try it Yourself by Editing the Code below.


If you have any questions, please feel free to ask in our forums.Ask Question