When creating a new VisibleTicks object from scratch, parameters can be passed like follows:
Optional object containing parameters for creation of VisibleTicks
Get length of GridStroke.
Length of GridStroke, where 1 = full and 0 = zero.
Get style of GridStrokes.
LineStyle object
Get horizontal alignment of Label respective to tick line.
Horizontal alignment [-1, 1].
Get fill style of Label.
Fill style of Label as a VisibleFill object
Get font of Labels.
FontSettings object
Get padding after label as pixels.
Padding after label as pixels.
Get rotation of Label title.
Rotation in degrees
Get length of Ticks.
Length of Ticks as pixels
Get padding after Tick as pixels.
Padding after Tick as pixels.
Get style of Ticks.
LineStyle object
Construct a new VisibleTicks object based on this one, but with modified gridstroke length.
Length of GridStroke, where 1 = full and 0 = zero.
New VisibleTicks object
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)
Either a SolidLine object or a function, which will be used to create a new SolidLine based on current value.
New VisibleTicks object
Set alignment of Label respective to tick line.
after: -1
center: 0
before: +1
Label alignment [-1, 1].
New VisibleTicks object with modified Label alignment
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
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.
Padding after label as pixels.
New VisibleTicks object with modified Label padding
Set rotation of Label title.
Object itself
Set length of Ticks.
Length of Ticks as pixels.
New VisibleTicks object
Set padding after Tick as pixels.
Padding after Tick as pixels.
New VisibleTicks object with modified Tick padding
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
Unlike other types in Immutable.js, the Record()
function creates a new
Record Factory, which is a function that creates Record instances.
See above for examples of using Record()
.
Note: Record
is a factory function and not a class, and does not use the
new
keyword during construction.
Class which is used to style Axis Ticks. Use with Axis.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: