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
labelPadding after label as pixels.
Readonly
labelLabel rotation in degrees.
Readonly
tickLength of Tick itself as pixels.
Readonly
tickPadding after Tick as pixels.
Readonly
tickStyle of Tick itself as a SolidLine object.
Get font of Labels.
FontSettings object
Construct a new VisibleTicks object based on this one, but with modified gridstroke length.
New VisibleTicks object
Length of GridStroke, where 1 = full and 0 = zero.
Construct a new VisibleTicks object based on this one, but with modified GridStroke style.
Example usage:
// Specified SolidLine
VisibleTicks.setGridStrokeStyle(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
// Changed thickness
VisibleTicks.setGridStrokeStyle((solidLine) => solidLine.setThickness(5))
// Hidden
VisibleTicks.setGridStrokeStyle(emptyLine)
New VisibleTicks object
Either a SolidLine object or a function, which will be used to create a new SolidLine based on current value.
Set alignment of Label respective to tick line.
after: -1
center: 0
before: +1
New VisibleTicks object with modified Label alignment
Label alignment [-1, 1].
Set fill style of Labels.
Example usage:
// Specified FillStyle
VisibleTicks.setLabelFillStyle(new SolidFill({ color: ColorHEX('#F00') }))
// Changed transparency
VisibleTicks.setLabelFillStyle((solidFill) => solidFill.setA(80))
// Hidden
VisibleTicks.setLabelFillStyle(emptyFill)
New VisibleTicks object
Either a VisibleFill object or a function, which will be used to create a new VisibleFill based on current value.
Construct a new VisibleTicks object based on this one, but with modified Label font.
Example usage:
// Specified FontSettings
VisibleTicks.setLabelFont(new FontSettings({ size: 24, style: 'italic' }))
// Set to bold
VisibleTicks.setLabelFont((fontSettings) => fontSettings.setWeight('bold'))
New VisibleTicks object
Set padding after label as pixels.
New VisibleTicks object with modified Label padding
Padding after label as pixels.
Set rotation of Label title.
Object itself
Set length of Ticks.
New VisibleTicks object
Length of Ticks as pixels.
Set padding after Tick as pixels.
New VisibleTicks object with modified Tick padding
Padding after Tick as pixels.
Construct a new VisibleTicks object based on this one, but with modified Tick style.
Example usage:
// Specified SolidLine
VisibleTicks.setGridStrokeStyle(new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) }))
// Changed thickness
VisibleTicks.setGridStrokeStyle((solidLine) => solidLine.setThickness(5))
// Hidden
VisibleTicks.setGridStrokeStyle(emptyLine)
New VisibleTicks object
Class which is used to style Axis Ticks. Use with setTickStyle
Instances of VisibleTicks are immutable, meaning that its setters don't modify the object, but instead return a completely new modified object.
When creating a new VisibleTicks object from scratch, parameters can be passed like follows:
new VisibleTicks({ labelFillStyle: new SolidFill({ color: ColorHEX('#F00'), tickLength: 8 })