# Yahoo! UI Library

### charts 3.3.0

Yahoo! UI Library > charts > Plots
Search:
Filters Show Private Show Protected Show Deprecated

## Class Plots

Utility class used for drawing markers.

### Constructor

Plots `( )`

### Properties

#### _hotspotCache - `private object`

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

#### _hotspots - `private object`

Collection of hotspots to be used in the series.

#### _markerCache - `private object`

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

#### _markers - `private object`

Collection of markers to be used in the series.

#### _plotDefaults - `private object`

#### _stateSyles - `private object`

### Methods

#### _clearHotspotCache

`private void _clearHotspotCache ( )`
Removes unused hotspots from the hotspot cache

#### _clearMarkerCache

`private void _clearMarkerCache ( )`
Removes unused markers from the marker cache

#### _createHotspot

`private _createHotspot ( styles , order , index )`
Creates a shape to be used as a hotspot.

Parameters:
  `styles <Object>` Hash of style properties.
  `order <Number>` Order of the series.
  `index <Number>` Index within the series associated with the hotspot.

Returns: ``
  Shape

#### _createHotspotCache

`private void _createHotspotCache ( )`
Creates a cache of hotspots for reuse.

#### _createMarker

`private _createMarker ( styles , order , index )`
Creates a shape to be used as a marker.

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

#### _createMarkerCache

`private void _createMarkerCache ( )`
Creates a cache of markers for reuse.

#### _getItemColor

`protected _getItemColor ( val , i )`
Parses a color from an array.

Parameters:
  `val <Array>` collection of colors
  `i <Number>` index of the item

Returns: ``
  String

#### _getPlotDefaults

`protected _getPlotDefaults ( )`
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

`protected _getState ( type )`
Returns marker state based on event type

Parameters:
  `type <String>` event type

Returns: ``
  String

#### _parseMarkerStyles

`private void _parseMarkerStyles ( )`
Combines new styles with existing styles.

#### _setStyles

`protected _setStyles ( newStyles )`
Method used by `styles` setter. Overrides base implementation.

Parameters:
  `newStyles <Object>` Hash of properties to update.

Returns: ``
  Object

#### drawPlots

`protected void drawPlots ( )`
Draws the markers

#### getHotspot

`protected getHotspot ( styles , order , index )`
Gets and styles a hotspot. If there is a hotspot 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 hotspot.

Returns: ``
  Shape

#### getMarker

`protected 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 <Object>` Hash of style properties.
  `order <Number>` Order of the series.
  `index <Number>` Index within the series associated with the marker.

Returns: ``
  Shape

#### updateMarkerState

`protected void updateMarkerState ( type , i )`
Resizes and positions markers based on a mouse interaction.

Parameters:
  `type <String>` state of the marker
  `i <Number>` index of the marker

Copyright © 2011 Yahoo! Inc. All rights reserved.