API Docs for:
Show:

Gridlines Class

Module: charts

Gridlines draws gridlines on a Graph.

Methods

_drawGridlines

() private

Algorithm for drawing gridlines

_getDefaultStyles

() protected

Gets the default value for the styles attribute. Overrides base implementation.

Returns:

Object

_horizontalLine

(
  • path
  • pt
  • w
  • h
)
private

Algorithm for horizontal lines.

Parameters:

  • path Path

    Reference to path element

  • pt Object

    Coordinates corresponding to a major unit of an axis.

  • w Number

    Width of the Graph

  • h Number

    Height of the Graph

_verticalLine

(
  • path
  • pt
  • w
  • h
)
private

Algorithm for vertical lines.

Parameters:

  • path Path

    Reference to path element

  • pt Object

    Coordinates corresponding to a major unit of an axis.

  • w Number

    Width of the Graph

  • h Number

    Height of the Graph

draw

() protected

Draws the gridlines

remove

() private

Removes the Gridlines.

Properties

_path

Path private

Reference to the Path element used for drawing Gridlines.

Attributes

axis

Axis

Indicate the Axis in which to bind the gridlines.

direction

String

Indicates the direction of the gridline.

graph

Graph

Indicates the Graph in which the gridlines are drawn.