DHTMLX Docs & Samples Explorer

Index
dhtmlxchart
Configuration properties

## BarChart properties

Configuration properties are set in the chart constructor. Some of them are mandatory, others - optional.

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

#### Mandatory properties

- container - the id of html container where you want display a chart
- view - a chart type, “bar” for Bar charts
- value - a property of dataset that chart represent

#### Optional properties

look and fill

- alpha - bar transparency
- border - enables/disables bar border
- color - a fixed value or template for a bars color
- gradient - a bars gradient
- padding - an object that defines padding of chart content:
  - top - top padding
  - bottom - bottom padding
  - left - left padding
  - right - right padding
- width - a width of bars
- radius - the radius for bar rounding

item details

- label - a template for item labels
- tooltip - a template for item tooltips

scales

- xAxis - the horizontal scale
  - title - a scale title
  - color - a scale color
  - template - a template of scale labels
  - lines - enables/disables vertical lines for scale units

- yAxis - the vertical scale:
  - title - a scale title
  - color - a scale color
  - start - the mininum value
  - end - the maximum value
  - step - a scale step
  - template - a template of scale labels
  - lines - enables/disables horizontal lines for scale units

data manipulation

- group - groups data by a certain property
- sort - sorts dataset