Class: LineChart

LineChart

Class representing a line chart.


new LineChart()

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:

interpolate :String

If interpolate is specified, sets the interpolation mode to the specified string or function available interpolation: linear - piecewise linear segments, as in a polyline. linear-closed - close the linear segments to form a polygon. step - alternate between horizontal and vertical segments, as in a step function. step-before - alternate between vertical and horizontal segments, as in a step function. step-after - alternate between horizontal and vertical segments, as in a step function. basis - a B-spline, with control point duplication on the ends. basis-open - an open B-spline; may not intersect the start or end. basis-closed - a closed B-spline, as in a loop. bundle - equivalent to basis, except the tension parameter is used to straighten the spline. cardinal - a Cardinal spline, with control point duplication on the ends. cardinal-open - an open Cardinal spline; may not intersect the start or end, but will intersect other control points. cardinal-closed - a closed Cardinal spline, as in a loop. monotone - cubic interpolation that preserves monotonicity in y.

Type:
  • String

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:
Overrides:
Returns:
Type
number

calculateYMin()

Caculate min y values

Inherited From:
Overrides:
Returns:
Type
number

computeDataProperty()

Compute and cache data properties

Inherited From:
Returns:

computer data related properties

Type
undefined

computeRenderProperty()

Compute and cache graphic properties

Inherited From:
Overrides:
Returns:

computer render properties

Type
undefined

destroy()

Destroy the chart

Inherited From:
Returns:
Type
undefined

getXScale()

get x scale

Inherited From:
Overrides:
Returns:
Type
function

getYScale()

get x scale

Inherited From:
Overrides:
Returns:
Type
function

hover(j)

Highlight datapoint

Parameters:
Name Type Description
j number

index of the dataset that should be highlighted

Inherited From:
Overrides:
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:
Returns:

[description]

Type
array