new GridLinesOptions()
The GridLinesOptions object defines the configuration options to show the grid lines. The GridLinesOptions type inherits all properties of LineOptions type. The skip field specifies the number of grid lines to skip, and the step field defines the step to show the grid lines. If no step is specified, all grid lines are shown. If a step is specified, the grid lines are drawn at intervals defined by the step value (e.g., a step of 2 would show every other grid line). If a skip value is specified, the first 'skip' number of grid lines are not drawn. For instance, if skip is set to 2, the first two grid lines will be skipped and not displayed.
For instance, the "color" option:
majorGridLines: { color: "blue" }specifies the color to show the grid lines in blue
Members
(static) color :string
The color field specifies the color to show the line (accepts a valid CSS color string, including hex and rgb). The style field defines the style of the line. An Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. The width field specifies the line's width or size (1 by default).
Type:
- string
Example
null {null}, indicates a black line
"transparent" {string}, specifies a transparent line
"red" {string}, specifies a red line
"#00FF00" {string}, specifies a green line
"rgba(255,0,0,0.5)" {string}, indicates 50% red line
color
(static) skip :number
The skip field specifies the number of grid lines to skip. The step field defines the step to show the grid lines. If no step is specified, all grid lines are shown. If a step is specified, the grid lines are drawn at intervals defined by the step value (e.g., a step of 2 would show every other grid line). If a skip value is specified, the first 'skip' number of grid lines are not drawn. For instance, if skip is set to 2, the first two grid lines will be skipped and not displayed.
Type:
- number
Example
null {null}, no grid lines are skipped
2 {number}, skips the first two grid lines
skip
(static) step :number
The step field defines the step to show the grid lines. If no step is specified, all grid lines are shown. If a step is specified, the grid lines are drawn at intervals defined by the step value (e.g., a step of 2 would show every other grid line). If a skip value is specified, the first 'skip' number of grid lines are not drawn. For instance, if skip is set to 2, the first two grid lines will be skipped and not displayed.
Type:
- number
Example
null {null},
2 {number}, draw the grid lines two by two
step
(static) style :array
The style field defines the style of the line. An Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. The width field specifies the line's width or size (1 by default). The color field specifies the color to show the line (accepts a valid CSS color string, including hex and rgb).
Type:
- array
Example
null {null} or [] {array}, defines solid grid lines
2 {number}, becomes [2, 2, ...]
[5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...]
style
(static) width :number
The width field specifies the line's width or size (1 by default). The color field specifies the color to show the line (accepts a valid CSS color string, including hex and rgb). The style field defines the style of the line. An Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated.
Type:
- number
Example
null {null}, indicates lines of 1-pixel wide
2 {number}, indicates lines of 2-pixels wide
width