Chart

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


Full code of the example in the picture

Initialization

To init the component you need to perform a simple procedure - call initialization code.

Initialization code or an object constructor lets you create an object by using common declaration.

dhx.ui ({view:"chart", 
...})

Parameters

Parameters of the chart depends on the type you choose.

Please note, chart is a derived class, i.e. it inherits all the features of the base class (chart → view).

Work with charts

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 data propeties 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