Graph Class
Graph manages and contains series instances for a CartesianChart
instance.
Item Index
Methods
Methods
_addSeries
-
series
Adds a series to the graph.
Parameters:
-
seriesCartesianSeriesSeries to add to the graph.
_drawingCompleteHandler
-
e
Event handler for series drawingComplete event.
Parameters:
-
eObjectEvent object.
_drawSeries
()
private
Draws each series.
_getDefaultStyles
()
protected
Gets the default value for the styles attribute. Overrides
base implementation.
Returns:
_getSeries
-
type
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.
Returns:
_markerEventHandler
-
e
Event handler for marker events.
Parameters:
-
eObjectEvent object.
_parseSeriesCollection
-
Collection
Parses series instances to be displayed in the graph.
Parameters:
-
CollectionArrayof
CartesianSeriesinstances or objects containerCartesianSeriesattributes values.
_updateStyles
()
private
Updates the Graph styles.
addDispatcher
-
val
Adds dispatcher to a _dispatcher used to
to ensure all series have redrawn before for firing event.
Parameters:
-
valCartesianSeriesseries instance to add
bindUI
()
private
createSeries
-
seriesData
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:
-
seriesDataObjectSeries 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:
-
valNumberindex of the series
Returns:
getSeriesByKey
-
val
Returns a series instance based on a key value.
Parameters:
-
valStringkey value of the series
Returns:
syncUI
()
private
Properties
Attributes
background
Graphic
Reference to graphic instance used for the background.
Fires event backgroundChange
Fires when the value for the configuration attribute background is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
chart
ChartBase
Reference to the chart instance using the graph.
Fires event chartChange
Fires when the value for the configuration attribute chart is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
graphic
Graphic
Reference to graphic instance used for series.
Fires event graphicChange
Fires when the value for the configuration attribute graphic is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
gridlines
Graphic
Reference to graphic instance used for gridlines.
Fires event gridlinesChange
Fires when the value for the configuration attribute gridlines is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
groupMarkers
Boolean
Indicates whether or not markers for a series will be grouped and rendered in a single complex shape instance.
Fires event groupMarkersChange
Fires when the value for the configuration attribute groupMarkers is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
horizontalGridlines
Gridlines
Reference to the horizontal Gridlines instance.
Default: null
Fires event horizontalGridlinesChange
Fires when the value for the configuration attribute horizontalGridlines is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
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.
Fires event seriesCollectionChange
Fires when the value for the configuration attribute seriesCollection is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
seriesDictionary
Object
Read-only hash lookup for all series on in the Graph.
Fires event seriesDictionaryChange
Fires when the value for the configuration attribute seriesDictionary is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
showBackground
Boolean
Indicates whether the Graph has a background.
Default: true
Fires event showBackgroundChange
Fires when the value for the configuration attribute showBackground is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
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.
Fires event stylesChange
Fires when the value for the configuration attribute styles is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
verticalGridlines
Gridlines
Reference to the vertical Gridlines instance.
Default: null
Fires event verticalGridlinesChange
Fires when the value for the configuration attribute verticalGridlines is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
x
Number
protected
The x-coordinate for the graph.
Fires event xChange
Fires when the value for the configuration attribute x is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
y
Number
protected
The y-coordinate for the graph.
Fires event yChange
Fires when the value for the configuration attribute y is
changed. You can listen for the event using the on method if you
wish to be notified before the attribute's value has changed, or
using the after method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
eEventFacadeAn Event Facade object with the following attribute-specific properties added:
