Chart

Overview

CHART is a component that allows to create different charts on a page. Ui-related CHART inherits from view.


Related sample: 07_chart/01_initialization/01_load_xml.html

Initialization

The following is an example of initialization with the commonly used parameters (to see a full list of CHART's parameters, please refer to the corresponding chapter of the manual):

dhx.ui ({view:"chart",
         id:"topChart",
         type:"bar",
	 value:"#sales#",
	 details:"#year#",
         datatype:"json",
	 data:salesData
});

Specify id if you're going to refer to CHART later.

Working with CHART

API Reference

Useful tips

  • define() method lets to set any CHART's parameter out of the constructor.
  • CHART's data can be sorted by the property sort or by the method sort() .
  • If you want to represent several datasets on a chart - use addSeries() method.
  • To load CHART's data you have to use one of two methods: load(), if you use data form external file or parse(), if your data is internal.

Related how-tos

A full list of articles.

To use ui functionality, touchui.css and touchui.js files must be included.