#

API Docs for:
Show: Inherited Protected Private Deprecated

# Gridlines Class

Defined in: `input/charts/Gridlines.js:1`
Module: charts

Gridlines draws gridlines on a Graph.

- Index
- Methods
- Properties
- Attributes

## Item Index

### Methods

- _drawGridlines
- _getDefaultStyles
- _horizontalLine
- _verticalLine
- draw
- remove

### Properties

- _path

### Attributes

- axis
- direction
- graph

## Methods

### `_drawGridlines`

() private

Defined in `input/charts/Gridlines.js:49`

Algorithm for drawing gridlines

### `_getDefaultStyles`

() protected

Defined in `input/charts/Gridlines.js:140`

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

#### Returns:

Object

### `_horizontalLine`

(

- `path`
- `pt`
- `w`
- `h`

)
private

Defined in `input/charts/Gridlines.js:108`

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

Defined in `input/charts/Gridlines.js:124`

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

Defined in `input/charts/Gridlines.js:35`

Draws the gridlines

### `remove`

() private

Defined in `input/charts/Gridlines.js:20`

Removes the Gridlines.

## Properties

### `_path`

Path private

Defined in `input/charts/Gridlines.js:11`

Reference to the `Path` element used for drawing Gridlines.

## Attributes

### `axis`

Axis

Defined in `input/charts/Gridlines.js:171`

Indicate the `Axis` in which to bind the gridlines.

### `direction`

String

Defined in `input/charts/Gridlines.js:163`

Indicates the direction of the gridline.

### `graph`

Graph

Defined in `input/charts/Gridlines.js:180`

Indicates the `Graph` in which the gridlines are drawn.