new TicksOptions()
The TicksOptions object defines the configuration options to show the ticks. The TicksOptions type inherits all properties of LineOptions type. The ticks are small lines or marks on the axis that indicate specific values or intervals. The options defined by TicksOptions allow you to customize the appearance of these ticks, including their width, color, style, and how many ticks to skip or show based on a step value. For instance, the color option can be set to define the color to show the ticks. The ValueAxisOptions.majorTicks field defines the configuration options to show the major ticks of the value-axis. The CategoryAxisOptions.majorTicks field defines the configuration options to show the major ticks of the category-axis.
For instance, the "color" option:
majorTicks: { color: "blue" }specifies the color to show the ticks in blue
Members
(static) color :string
The color field specifies the color to show the ticks (accepts a valid CSS color string, including hex and rgb). The width field specifies the tick line's width or size (1 by default). The style field defines the style of the ticks. 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 skip field specifies the number of ticks to skip. The step field defines the step to show the ticks.
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 ticks to skip. The width field specifies the tick line's width or size (1 by default). The color field specifies the color to show the ticks (accepts a valid CSS color string, including hex and rgb). The style field defines the style of the ticks. 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 step field defines the step to show the ticks.
Type:
- number
Example
null {null}, no ticks are skipped
2 {number}, skips the first two ticks
skip
(static) step :number
The step field defines the step to show the ticks. The width field specifies the tick line's width or size (1 by default). The color field specifies the color to show the ticks (accepts a valid CSS color string, including hex and rgb). The style field defines the style of the ticks. 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 skip field specifies the number of ticks to skip.
Type:
- number
Example
null {null},
2 {number}, draw the ticks two by two
step
(static) style :array
The style field defines the style of the ticks. 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 tick line's width or size (1 by default). The color field specifies the color to show the ticks (accepts a valid CSS color string, including hex and rgb). The skip field specifies the number of ticks to skip. The step field defines the step to show the ticks.
Type:
- array
Example
null {null} or [] {array}, defines solid ticks
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 tick line's width or size (1 by default). The Miscellaneous.categoryAxisSize field defines the size of the category axis, and the Miscellaneous.valueAxisSize field defines the size of the value axis. The color field specifies the color to show the ticks (accepts a valid CSS color string, including hex and rgb). The style field defines the style of the ticks. 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 skip field specifies the number of ticks to skip. The step field defines the step to show the ticks.
Type:
- number
Example
null {null}, indicates tick-lines of 1-pixel wide
2 {number}, indicates tick-lines of 2-pixels wide
width