Bar Chart Properties

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

var barChart =  dhx.ui({
			view:"chart",
			type:"bar",
			container:"chart_container",
	   		value:"#sales#",
	    	        details:"#year#"
});
barChart.load("xml/sales.xml", "xml");

Mandatory properties

  • container - the id of the html container where you'll place a chart
  • type - the chart type
  • value - the data which chart represents

Optional properties

look and fill

  • alpha - the bar transparency
  • border - enables/disables bar border
  • color - defines the colors of chart's items
  • gradient - the bar's gradient
  • padding - an object that defines padding of chart content
  • width - the width of the bars
  • radius - the radius for the bar's rounding

item details

  • label - the template for items' labels
  • legend - specifies the legend block of the chart

data manipulation

  • group - groups data by the defined property
  • sort - defines sorting settings

scales

  • origin - the scale's origin (for vertical charts)
  • yAxis - sets the vertical scale of the chart
  • xAxis - sets the horizontal scale of the chart

Scale's properties depend on the type of Bar chart

Vertical scale (yAxis)

'Vertical Bar' and 'Stacked Vertical Bar' personality

  • title - (string) the scale title
  • color - (string) the scale color
  • start - (integer) the minimum value of the scale
  • end - (integer) the maximum value of the scale
  • step - (integer) the scale step
  • template - (template) the template for scale labels
  • lines - (boolean) enables/disables horizontal lines for scale units

'Horizontal Bar' and 'Stacked Horizontal Bar' personality

  • title - (string) the scale title
  • color - (string) the scale color
  • template - (template) the template for scale labels
  • lines - (boolean) enables/disables horizontal lines for scale units

Horizontal scale (xAxis)

'Vertical Bar' and 'Stacked Vertical Bar' personality

  • title - (string) the scale title
  • color - (string) the scale color
  • template - (template) the template for scale labels
  • lines - (boolean) enables/disables horizontal lines for scale units

'Horizontal Bar' and 'Stacked Horizontal Bar' personality

  • title - (string) the scale title
  • color - (string) the scale color
  • start - (integer) the minimum value of the scale
  • end - (integer) the maximum value of the scale
  • step - (integer) the scale's step
  • template - (template) the template for scale labels
  • lines - (boolean) enables/disables horizontal lines for scale units