Check documentation for the latest version of dhtmlxSuite Pie Chart properties DHTMLX Docs

Pie Chart properties

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

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

Mandatory properties

  • container - the id of an html container where you want display the chart
  • view - the chart type
  • value - a property of dataset that chart represents

Optional properties

Look and feel

  • color - defines the color of chart items
  • gradient - the pie gradient
  • radius - the pie radius
  • x - the horizontal position of the pie center
  • y - the vertical position of the pie center

Pie personality

  • shadow - enables/disables pie shadow

3D Pie personality

  • cant - a value from 0 to 1 that defines the chart cant (0.5 by default)
  • height - the 3D pie height

Item details

  • label - a template for item labels
  • labelOffset - the offset of sector labels from the pie frame in pixels. By default, 20
  • tooltip - a template for item tooltips
  • legend - a template for element text in legend block
    • width - the block width
    • align - the horizontal alignment of the block: “left”, “right” or "center"
    • valign - the vertical alignment of the block: “top”,“bottom” or "middle"
    • layout - a layout that defines text stretching in horizontal or vertical direction :"x" or "y"
    • padding - the legend block padding
    • margin - the legend block margin
    • marker - an object that defines markers in the details block
      • radius - defines the radius of markers
      • type - the marker shape
      • width - the marker width
      • height - the marker height
    • toggle - enables/disables the possibility to hide/show a graph by clicking on the graph legend item
    • values - the legend items
  • pieInnerText - the inner label in the pie

Data manipulation

  • group - groups data by a certain property
  • sort - sorts dataset
Back to top