Version 3.18.1
Show:

Plots Class

Defined in: charts/js/Plots.js:11
Module: series-plot-util
Parent Module: charts

Utility class used for drawing markers.

Constructor

Plots

()

Methods

_clearMarkerCache

() private

Removes unused markers from the marker cache

_createGroupMarkers

(
  • styles
)
protected

Draws a series of markers in a single shape instance.

Parameters:

  • styles Object

    Set of configuration properties used to create the markers.

_createMarker

(
  • styles
)
private

Creates a shape to be used as a marker.

Parameters:

  • styles Object

    Hash of style properties.

Returns:

Shape

_createMarkerCache

() private

Creates a cache of markers for reuse.

_getDefaultStyles

() protected

Returns:

Object

_getGroupShape

(
  • shape
)
protected

Returns the correct group shape class.

Parameters:

Returns:

Function

_getItemColor

(
  • val
  • i
)
protected

Parses a color from an array.

Parameters:

  • val Array

    collection of colors

  • i Number

    index of the item

Returns:

String

_getPlotDefaults

() protected

Gets the default values for series that use the utility. This method is used by the class' styles attribute's getter to get build default values.

Returns:

Object

_getState

(
  • type
)
protected

Returns marker state based on event type

Parameters:

Returns:

String

_parseMarkerStyles

(
  • Object
)
private

Combines new styles with existing styles.

Parameters:

  • Object Object

    containing style properties for the marker.

Returns:

Object

_setStyles

(
  • newStyles
)
protected

Method used by styles setter. Overrides base implementation.

Parameters:

  • newStyles Object

    Hash of properties to update.

Returns:

Object

_toggleVisible

(
  • visible
)
private

Toggles visibility

Parameters:

  • visible Boolean

    indicates visibilitye

drawPlots

() protected

Draws the markers

drawSeries

() protected

getMarker

(
  • styles
  • order
  • index
)
protected

Gets and styles a marker. If there is a marker in cache, it will use it. Otherwise it will create one.

Parameters:

  • styles Object

    Hash of style properties.

  • order Number

    Order of the series.

  • index Number

    Index within the series associated with the marker.

Returns:

Shape

updateMarkerState

(
  • type
  • i
)
protected

Resizes and positions markers based on a mouse interaction.

Parameters:

  • type String

    state of the marker

  • i Number

    index of the marker

Properties

_groupShapes

Unknown private

Pre-defined group shapes.

_markerCache

Array private

Collection of markers to be re-used on a series redraw.

_markers

Array private

Collection of markers to be used in the series.

_plotDefaults

Object private

Storage for default marker styles.

_statSyles

Object private