Class Ticks<T extends Ticks<T>>
- Direct Known Subclasses:
CategoryTicks
,LinearTicks
,LogarithmicTicks
,RadialLinearTicks
,TimeTicks
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Boolean
protected BigDecimal
protected JavaScriptFunction
protected Boolean
protected Color
protected String
protected BigDecimal
protected FontStyle
protected BigDecimal
protected BigDecimal
protected BigDecimal
protected Boolean
protected BigDecimal
protected Boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetAutoSkip
(Boolean autoSkip) If true, automatically calculates how many labels that can be shown and hides labels accordingly.setAutoSkipPadding
(BigDecimal autoSkipPadding) Padding between the ticks on the horizontal axis whenautoSkip
is enabled.setCallback
(JavaScriptFunction callback) Returns the string representation of the tick value as it should be displayed on the chart.setDisplay
(Boolean display) If true, show the ticks.setFontColor
(Color fontColor) Font color for the tick labels.setFontFamily
(String fontFamily) Font family for the tick labels, follows CSS font-family options.setFontSize
(BigDecimal fontSize) Font size for the tick labels.setFontStyle
(FontStyle fontStyle) Font style for the tick labels, follows CSS font-style options (i.e.setLabelOffset
(BigDecimal labelOffset) Distance in pixels to offset the label from the centre point of the tick (in the y direction for the x axis, and the x direction for the y axis).setMaxRotation
(BigDecimal maxRotation) Maximum rotation for tick labels when rotating to condense labels.setMinRotation
(BigDecimal minRotation) Minimum rotation for tick labels.Flips tick labels around axis, displaying the labels inside the chart instead of outside.setPadding
(BigDecimal padding) Padding between the tick label and the axis.setReverse
(Boolean reverse) Reverses order of tick labels.
-
Field Details
-
autoSkip
-
autoSkipPadding
-
callback
-
display
-
fontColor
-
fontFamily
-
fontSize
-
fontStyle
-
labelOffset
-
maxRotation
-
minRotation
-
mirror
-
padding
-
reverse
-
-
Constructor Details
-
Ticks
public Ticks()
-
-
Method Details
-
getAutoSkip
- See Also:
-
setAutoSkip
If true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it off to show all labels no matter what
Default
true
-
getAutoSkipPadding
- See Also:
-
setAutoSkipPadding
Padding between the ticks on the horizontal axis when
autoSkip
is enabled.Note: Only applicable to horizontal scales.
-
getCallback
- See Also:
-
setCallback
Returns the string representation of the tick value as it should be displayed on the chart. See callback section below.
Default
function(value) { return helpers.isArray(value) ? value : '' + value; }
-
getDisplay
- See Also:
-
setDisplay
If true, show the ticks.
Default
true
-
getFontColor
- See Also:
-
setFontColor
Font color for the tick labels.
Default
"#666"
-
getFontFamily
- See Also:
-
setFontFamily
Font family for the tick labels, follows CSS font-family options.
Default
"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"
-
getFontSize
- See Also:
-
setFontSize
Font size for the tick labels.
Default
12
-
getFontStyle
- See Also:
-
setFontStyle
Font style for the tick labels, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
Default
"normal"
-
getLabelOffset
- See Also:
-
setLabelOffset
Distance in pixels to offset the label from the centre point of the tick (in the y direction for the x axis, and the x direction for the y axis). Note: this can cause labels at the edges to be cropped by the edge of the canvas
Default
0
-
getMaxRotation
- See Also:
-
setMaxRotation
Maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. Note: Only applicable to horizontal scales.
Default
90
-
getMinRotation
- See Also:
-
setMinRotation
Minimum rotation for tick labels. Note: Only applicable to horizontal scales.
Default
0
-
getMirror
- See Also:
-
setMirror
Flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales.
Default
false
-
getPadding
- See Also:
-
setPadding
Padding between the tick label and the axis. Note: Only applicable to horizontal scales.
Default
10
-
getReverse
- See Also:
-
setReverse
Reverses order of tick labels.
Default
false
-