API Docs for:
Show:

Graph Class

Module: charts

Graph manages and contains series instances for a CartesianChart instance.

Methods

_addSeries

(
  • series
)
private

Adds a series to the graph.

Parameters:

_drawingCompleteHandler

(
  • e
)
private

Event handler for series drawingComplete event.

Parameters:

  • e Object

    Event object.

_drawSeries

() private

Draws each series.

_getDefaultStyles

() protected

Gets the default value for the styles attribute. Overrides base implementation.

Returns:

Object

_getSeries

(
  • type
)
private

Returns a specific CartesianSeries class based on key value from a look up table of a direct reference to a class. When specifying a key value, the following options are available:

Key ValueClass lineY.LineSeries columnY.ColumnSeries barY.BarSeries areaY.AreaSeries stackedareaY.StackedAreaSeries stackedlineY.StackedLineSeries stackedcolumnY.StackedColumnSeries stackedbarY.StackedBarSeries markerseriesY.MarkerSeries splineY.SplineSeries areasplineY.AreaSplineSeries stackedsplineY.StackedSplineSeries stackedareasplineY.StackedAreaSplineSeries stackedmarkerseriesY.StackedMarkerSeries pieY.PieSeries comboY.ComboSeries stackedcomboY.StackedComboSeries combosplineY.ComboSplineSeries stackedcombosplineY.StackedComboSplineSeries

When referencing a class directly, you can specify any of the above classes or any custom class that extends CartesianSeries or PieSeries.

Parameters:

  • type String | Object

    Series type.

Returns:

CartesianSeries

_markerEventHandler

(
  • e
)
private

Event handler for marker events.

Parameters:

  • e Object

    Event object.

_parseSeriesCollection

(
  • Collection
)
private

Parses series instances to be displayed in the graph.

Parameters:

  • Collection Array

    of CartesianSeries instances or objects container CartesianSeries attributes values.

_sizeChangeHandler

(
  • e
)
private

Event handler for size changes.

Parameters:

  • e Object

    Event object.

_updateStyles

() private

Updates the Graph styles.

addDispatcher

(
  • val
)
protected

Adds dispatcher to a _dispatcher used to to ensure all series have redrawn before for firing event.

Parameters:

bindUI

() private

createSeries

(
  • seriesData
)
private

Creates a CartesianSeries instance from an object containing attribute key value pairs. The key value pairs include attributes for the specific series and a type value which defines the type of series to be used.

Parameters:

  • seriesData Object

    Series attribute key value pairs.

destructor

() protected

Destructor implementation Graph class. Removes all Graphic instances from the widget.

getSeriesByIndex

(
  • val
)

Returns a series instance based on an index.

Parameters:

  • val Number

    index of the series

Returns:

CartesianSeries

getSeriesByKey

(
  • val
)

Returns a series instance based on a key value.

Parameters:

  • val String

    key value of the series

Returns:

CartesianSeries

syncUI

() private

Properties

_dispatchers

Array private

Collection of CartesianSeries instances to be redrawn.

_seriesCollection

Array private

Collection of series to be displayed in the graph.

_seriesDictionary

Object private

Object containing key value pairs of CartesianSeries instances.

_seriesMap

Object private

String reference for pre-defined Series classes.

seriesTypes

Object private

Object of arrays containing series mapped to a series type.

Attributes

background

Graphic

Reference to graphic instance used for the background.

chart

ChartBase

Reference to the chart instance using the graph.

graphic

Graphic

Reference to graphic instance used for series.

gridlines

Graphic

Reference to graphic instance used for gridlines.

groupMarkers

Boolean

Indicates whether or not markers for a series will be grouped and rendered in a single complex shape instance.

horizontalGridlines

Gridlines

Reference to the horizontal Gridlines instance.

Default: null

seriesCollection

CartesianSeries

Collection of series. When setting the seriesCollection the array can contain a combination of either CartesianSeries instances or object literals with properties that will define a series.

seriesDictionary

Object

Read-only hash lookup for all series on in the Graph.

showBackground

Boolean

Indicates whether the Graph has a background.

Default: true

styles

Object

Style properties used for drawing a background. Below are the default values:

background
An object containing the following values:
fill
Defines the style properties for the fill. Contains the following values:
color
Color of the fill. The default value is #faf9f2.
alpha
Number from 0 to 1 indicating the opacity of the background fill. The default value is 1.
border
Defines the style properties for the border. Contains the following values:
color
Color of the border. The default value is #dad8c9.
alpha
Number from 0 to 1 indicating the opacity of the background border. The default value is 1.
weight
Number indicating the width of the border. The default value is 1.

verticalGridlines

Gridlines

Reference to the vertical Gridlines instance.

Default: null

x

Number protected

The x-coordinate for the graph.

y

Number protected

The y-coordinate for the graph.