DHTMLX Docs & Samples Explorer

load (url, type, callback)

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

Required library file: dhtmlxchart .js

Loads data from remote url

  • url - data url, need to be in the same domain
  • callback
  • type - type of data
    • “xml”
    • “json”
    • “jsarray”
    • “csv”
	chart.load("data.xml");
	chart.load("data.xml",function(){
		//callback
	});
	//or
	chart.load("data.xml","xml");
	chart.load("data.json","json");
	//or 
	chart.load("data.xml","xml",function(){
		//callback
	});

Callback is always the last parameter. Methos is async., so you need to use callback to catch the moment when data is really loaded in the chart.