Plots Class
Utility class used for drawing markers.
Item Index
Methods
Properties
Methods
_clearMarkerCache
()
private
Removes unused markers from the marker cache
_createGroupMarkers
-
styles
Draws a series of markers in a single shape instance.
Parameters:
-
styles
ObjectSet of configuration properties used to create the markers.
_createMarker
-
styles
-
order
-
index
Creates a shape to be used as a marker.
Parameters:
-
styles
ObjectHash of style properties.
-
order
NumberOrder of the series.
-
index
NumberIndex within the series associated with the marker.
Returns:
_createMarkerCache
()
private
Creates a cache of markers for reuse.
_getGroupShape
-
shape
Returns the correct group shape class.
Parameters:
-
shape
Shape | StringIndicates which shape class.
Returns:
_getItemColor
-
val
-
i
Parses a color from an array.
Parameters:
-
val
Arraycollection of colors
-
i
Numberindex of the item
Returns:
_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:
_getState
-
type
Returns marker state based on event type
Parameters:
-
type
Stringevent type
Returns:
_parseMarkerStyles
-
Object
Combines new styles with existing styles.
Parameters:
-
Object
Objectcontaining style properties for the marker.
Returns:
_setStyles
-
newStyles
Method used by styles
setter. Overrides base implementation.
Parameters:
-
newStyles
ObjectHash of properties to update.
Returns:
_toggleVisible
-
visible
Toggles visibility
Parameters:
-
visible
Booleanindicates visibilitye
drawPlots
()
protected
Draws the markers
getMarker
-
styles
-
order
-
index
Gets and styles a marker. If there is a marker in cache, it will use it. Otherwise it will create one.
Parameters:
-
styles
ObjectHash of style properties.
-
order
NumberOrder of the series.
-
index
NumberIndex within the series associated with the marker.
Returns:
updateMarkerState
-
type
-
i
Resizes and positions markers based on a mouse interaction.
Parameters:
-
type
Stringstate of the marker
-
i
Numberindex 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.