DHTMLX Docs & Samples Explorer

Object Constructor

Constructor is used to create an object, to set its initial parameters.

Syntax:

var myChart = new dhtmlChart(obj)

where,

view: specifies a chart type

container: specifies an HTML container for a chart

value: specifies data, that will be present in a chart

Code Snippet:

 
var myChart = new dhtmlChart({
	view:"bar",
	container:"chart_container",
	value:"#sales#"
})

The code snippet shows how to create dhtmlXChart object.