Class: OverlayLayer

OverlayLayer

Class representing a layer to aid interaction.


new OverlayLayer(options)

OverlayLayer class constructor

Parameters:
Name Type Description
options object

Object with the following properties:

Properties
Name Type Argument Description
chart object <optional>

The chart object to append this legend to

legend object <optional>

The legend object which will be updated when hover happens

hoverCallback function <optional>

The callback function

Extends

Members


chart

Layer class constructor

Inherited From:

Methods


hover(i)

hover function, activate data point being hovered , activate the data point for chart and legend, then run callback function

Parameters:
Name Type Description
i number

index of data point to be activated

Returns:
Type
undefined

init()

initialise hover layer This function does the following things:

  1. update legend and chart to show the latest data point as action
  2. listen to touchmove event on mobile to update active data point for legend and chart
  3. listen to mousemove event to update active data point for legend and chart
Overrides:
Returns:
Type
undefined

render()

render the layer

Inherited From:
Returns:

render the layer with correct width and height

Type
undefined