Readonly gridLength of GridStroke, where 1 = full and 0 = zero.
Readonly gridStyle of GridStroke as a SolidLine object.
Readonly labelHorizontal alignment of Label respective to tick line.
left: -1
center: 0
right: +1
Readonly labelFillStyle of Label.
Readonly labelFont of Label as FontSettings.
Readonly labelLabel rotation in degrees.
Readonly Beta labelNot to be confused with GlowEffect
Introduced in v7.0. API may be changed according to user feedback and reports.
Readonly tickLength of Tick itself as pixels.
Readonly tickPadding after Tick as pixels.
Readonly tickStyle of Tick itself as a SolidLine object.
Readonly typeGet font of Labels.
FontSettings object
Construct a new TickStyle object based on this one, but with modified GridStroke style.
Example usage:
// Specified SolidLine
TickStyle.setGridStrokeStyle(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
// Changed thickness
TickStyle.setGridStrokeStyle((solidLine) => solidLine.setThickness(5))
// Hidden
TickStyle.setGridStrokeStyle(emptyLine)
Supported line styles:
New TickStyle object
Either a SolidLine object or a function, which will be used to create a new SolidLine based on current value.
Set fill style of Labels.
Example usage:
// Specified FillStyle
TickStyle.setLabelFillStyle(new SolidFill({ color: ColorHEX('#F00') }))
// Changed transparency
TickStyle.setLabelFillStyle((solidFill) => solidFill.setA(80))
// Hidden
TickStyle.setLabelFillStyle(emptyFill)
New TickStyle object
Either a VisibleFill object or a function, which will be used to create a new VisibleFill based on current value.
Construct a new TickStyle object based on this one, but with modified Label font.
Example usage:
// Specified FontSettings
TickStyle.setLabelFont(new FontSettings({ size: 24, style: 'italic' }))
// Set to bold
TickStyle.setLabelFont((fontSettings) => fontSettings.setWeight('bold'))
New TickStyle object
Beta
Not to be confused with GlowEffect
Introduced in v7.0. API may be changed according to user feedback and reports.
Construct a new TickStyle object based on this one, but with modified Tick style.
Example usage:
// Specified SolidLine
TickStyle.setGridStrokeStyle(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
// Changed thickness
TickStyle.setGridStrokeStyle((solidLine) => solidLine.setThickness(5))
// Hidden
TickStyle.setGridStrokeStyle(emptyLine)
New TickStyle object
Class which is used to style Axis Ticks.
Instances of TickStyle are immutable, meaning that its setters don't modify the object, but instead return a completely new modified object.
When creating a new TickStyle object from scratch, parameters can be passed like follows:
new TickStyle({ labelFillStyle: new SolidFill({ color: ColorHEX('#F00'), tickLength: 8 })