Class: PieChart

PieChart

Class representing a pie chart.


new PieChart()

Extends

Members


data :array

Gets or sets data for the chart

Type:
  • array
Inherited From:

displayRoundedData :boolean

Gets or sets whether data displayed for this chart should be rounded, for example, if a tooltip is displayed

Type:
  • boolean
Inherited From:

element :object

Gets or sets the element

Type:
  • object
Inherited From:

height :number

Gets or sets the height of the chart,

Type:
  • number
Inherited From:

margin :object

Gets or sets the margin

Type:
  • object
Inherited From:

padding :object

Gets or sets padding for data

Type:
  • object
Inherited From:

prefix :string

Gets or sets the prefix of the data values

Type:
  • string
Inherited From:

suffix :string

Gets or sets the suffix of the data values

Type:
  • string
Inherited From:

svg :object

Gets or sets the svg for the chart

Type:
  • object
Inherited From:

type :string

Gets or sets the type of chart, could be line, bar or pie

Type:
  • string
Inherited From:

units :string

Gets or sets the units for data values

Type:
  • string
Inherited From:

width

Gets or sets the width of the chart content

Inherited From:

wrapper :object

Gets or sets the wrapper of the chart

Type:
  • object
Inherited From:

Methods


calculateYMax()

Caculate max y values

Inherited From:
Returns:
Type
number

calculateYMin()

Caculate min y values

Inherited From:
Returns:
Type
number

computeDataProperty()

Compute and cache data properties

Inherited From:
Overrides:
Returns:

computer data related properties

Type
undefined

computeRenderProperty()

Compute and cache graphic properties

Inherited From:
Returns:

computer render properties

Type
undefined

destroy()

Destroy the chart

Inherited From:
Returns:
Type
undefined

getXScale()

get x scale

Inherited From:
Returns:
Type
function

getYScale()

get x scale

Inherited From:
Returns:
Type
function

hover(j)

Highlight datapoint

Parameters:
Name Type Description
j number

index of the dataset that should be highlighted

Inherited From:
Returns:
Type
undefined

init()

init the chart

Inherited From:
Overrides:
Returns:
Type
undefined

render()

Render the chart based computed render properties

Inherited From:
Overrides:
Returns:
Type
undefined

switchColorMode()

Switch color mode

Inherited From:
Overrides:
Returns:
Type
undefined

transformForD3()

Sometimes data needs to be transformed for certain layout(e.g: stack layout, pie layout)

Inherited From:
Overrides:
Returns:

[description]

Type
array