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 a chart. The method allows to represent several data propeties on one chart at the same time.
Not applicable to Pie chart.

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