DHTMLX Docs & Samples Explorer

addSeries (obj)

Required library edition: This method works with any edition of DHTMLX library

Required library file: dhtmlxchart .js

adds the new data property representation and redraws the chart. The method allows to represent several data propeties on one chart at the same time.
Not applicable to Pie and Scatter charts.

  • obj - a data object
    • view - the chart type
    • value - a property of dataset which representation you'd like to add to the chart
    • color - the template for the color of the property items
    • label - the template for the labels of the property items
chart.addSeries({
    value:"#sales1#",
    color:"#45abf5",
    label:"#sales1#"
});

Related methods: hideSeries, showSeries