public class Ticks<T extends Ticks<T>> extends Object
Constructor and Description |
---|
Ticks() |
Modifier and Type | Method and Description |
---|---|
Boolean |
getAutoSkip() |
BigDecimal |
getAutoSkipPadding() |
JavaScriptFunction |
getCallback() |
Boolean |
getDisplay() |
Color |
getFontColor() |
String |
getFontFamily() |
BigDecimal |
getFontSize() |
FontStyle |
getFontStyle() |
BigDecimal |
getLabelOffset() |
BigDecimal |
getMaxRotation() |
BigDecimal |
getMinRotation() |
Boolean |
getMirror() |
BigDecimal |
getPadding() |
Boolean |
getReverse() |
T |
setAutoSkip(Boolean autoSkip)
If true, automatically calculates how many labels that can be shown and
hides labels accordingly.
|
T |
setAutoSkipPadding(BigDecimal autoSkipPadding)
Padding between the ticks on the horizontal axis when
autoSkip is
enabled. |
T |
setCallback(JavaScriptFunction callback)
Returns the string representation of the tick value as it should be
displayed on the chart.
|
T |
setDisplay(Boolean display)
If true, show the ticks.
|
T |
setFontColor(Color fontColor)
Font color for the tick labels.
|
T |
setFontFamily(String fontFamily)
Font family for the tick labels, follows CSS font-family options.
|
T |
setFontSize(BigDecimal fontSize)
Font size for the tick labels.
|
T |
setFontStyle(FontStyle fontStyle)
Font style for the tick labels, follows CSS font-style options (i.e.
|
T |
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).
|
T |
setMaxRotation(BigDecimal maxRotation)
Maximum rotation for tick labels when rotating to condense labels.
|
T |
setMinRotation(BigDecimal minRotation)
Minimum rotation for tick labels.
|
T |
setMirror(Boolean mirror)
Flips tick labels around axis, displaying the labels inside the chart
instead of outside.
|
T |
setPadding(BigDecimal padding)
Padding between the tick label and the axis.
|
T |
setReverse(Boolean reverse)
Reverses order of tick labels.
|
public Boolean getAutoSkip()
setAutoSkip(Boolean)
public T setAutoSkip(Boolean autoSkip)
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
public BigDecimal getAutoSkipPadding()
setAutoSkipPadding(BigDecimal)
public T setAutoSkipPadding(BigDecimal autoSkipPadding)
Padding between the ticks on the horizontal axis when autoSkip
is
enabled.
Note: Only applicable to horizontal scales.
public JavaScriptFunction getCallback()
setCallback(JavaScriptFunction)
public T setCallback(JavaScriptFunction callback)
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; }
public Boolean getDisplay()
setDisplay(Boolean)
public Color getFontColor()
setFontColor(Color)
public String getFontFamily()
setFontFamily(String)
public T setFontFamily(String fontFamily)
Font family for the tick labels, follows CSS font-family options.
Default "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"
public BigDecimal getFontSize()
setFontSize(BigDecimal)
public T setFontSize(BigDecimal fontSize)
Font size for the tick labels.
Default 12
public FontStyle getFontStyle()
setFontStyle(FontStyle)
public T setFontStyle(FontStyle fontStyle)
Font style for the tick labels, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
Default "normal"
public BigDecimal getLabelOffset()
setLabelOffset(BigDecimal)
public T 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). Note: this can cause labels at the edges to be cropped by the edge of the canvas
Default 0
public BigDecimal getMaxRotation()
setMaxRotation(BigDecimal)
public T setMaxRotation(BigDecimal maxRotation)
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
public BigDecimal getMinRotation()
setMinRotation(BigDecimal)
public T setMinRotation(BigDecimal minRotation)
Minimum rotation for tick labels. Note: Only applicable to horizontal scales.
Default 0
public Boolean getMirror()
setMirror(Boolean)
public T setMirror(Boolean mirror)
Flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales.
Default false
public BigDecimal getPadding()
setPadding(BigDecimal)
public T setPadding(BigDecimal padding)
Padding between the tick label and the axis. Note: Only applicable to horizontal scales.
Default 10
public Boolean getReverse()
setReverse(Boolean)
Copyright © 2020. All rights reserved.