Axis that CustomTick belongs to.
Scale that is used for positioning CustomTick along Axis dimension. Translated to renderingScale in plotting stage as UI system doesn't support nonlinear rendering Scales.
Scale used for rendering CustomTicks Shapes.
Disposes all custom tick sub-elements
This for fluid interface
Remove Marker from rendering collection, so it can be safely trashed by GC
Object itself for fluent interface
Grid stroke length as a % of the viewport size
Grid stroke style as a LineStyle object
Get boolean flag for whether object is currently under mouse or not
Boolean for is object under mouse currently
Get custom ticks TickMarker (label, tick, possible background).
TickMarker object
Mouse interactions state
Get pixel padding between tick line and label.
Get rotation of tick label.
Rotation in degrees
Get tick length as pixels.
Tick length as pixels.
Value of CustomTick
True if all customTick child elements are disposed, false if not.
True if visible and False for invisible
Check that customTick fit the main scale
Boolean with the result
Remove event listener from Mouse Click Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Double Click Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Down Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Drag Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Drag Start Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Drag Stop Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Enter Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Leave Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Move Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Up Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Mouse Wheel Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Touch End Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Touch Move Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Remove event listener from Touch Start Event
Token of event listener which has to be removed
True if the listener is successfully removed and false if it is not found
Subscribe to Mouse Click event
Function that will be called when mouse clicks the bounds of UiObject.
Token-object that is a reference ID to the listener created.
Subscribe to Mouse Double Click event
Subscribe to Mouse Down event
Subscribe to Mouse Drag event
Subscribe to Mouse Drag Start event
Subscribe to Mouse Drag Stop event
Subscribe to Mouse Enter event
Function that will be called when mouse enters the bounds of UiObject.
Token-object that is a reference ID to the listener created.
Subscribe to Mouse Leave event
Function that will be called when mouse leaves the bounds of UiObject.
Token-object that is a reference ID to the listener created.
Subscribe to Mouse Move event
Event handler function
Token of subscription
Subscribe to Mouse Up event
Subscribe to Mouse Wheel event
Event handler function
Token of subscription
Subscribe to Touch End event
Event handler function
Token of subscription
Subscribe to Touch Move event
Event handler function
Token of subscription
Subscribe to Touch Start event
Event handler function
Token of subscription
Restore all sub-elements of custom tick
This for fluent interface
Place Marker back to rendering collection, so it became visible again
Object itself for fluent interface
Set length of grid stroke in percents
Grid line length as a % of viewport size
This for fluent interface
Grid stroke style
This for fluent interface
Configure custom ticks TickMarker (label, tick, possible background) via a callback function.
Example usage:
CustomTick.setMarker((tickMarker) => tickMarker
// Style TickMarker.
.setTextFillStyle(new SolidFill({ color: ColorRGBA( 255, 0, 0 ) }))
.setFont((font) => font.setStyle( 'italic' ))
)
See TickMarker for available customization API.
Styling specific TickMarkers:
When a custom tick is created, a tick marker builder can be specified. This specifies the shape, and general visual look of the custom tick, and can also expose a larger set of customization API for the tick marker. To use the specific API, it is required to cast the tick marker object to the correct type (TypeScript users only):
const customTick = Axis.addCustomTick(UIElementBuilders.PointableTextBox)
customTick.setMarker((tickMarker: UIPointableTextBox) => tickMarker
// ^ Above type cast is necessary to access full configuration API of UIPointableTextBox
// Style TickMarker background fill color.
.setBackground((background) => background
.setFillStyle(new SolidFill({ color: ColorRGBA(255, 0, 0, 100) }))
)
)
For reference,
UIElementBuilders.AxisTick
will support API as described by UITickUIElementBuilders.PointableTextBox
will support API as described by UIPointableTextBoxSet mouse interactions enabled or disabled
Specifies state of mouse interactions
Object itself for fluent interface
Set text of CustomTicks' Marker with a formatting function.
Example usage:
// Marker shows formatted position of CustomTick on its Axis
CustomTick.setTextFormatter((position, customTick) => customTick.axis.formatValue(position))
// Marker shows 'Hello world'
CustomTick.setTextFormatter((position, customTick) => 'Hello world')
A function of type: CustomTickTextFormatter, that defines text of CustomTicks' Marker.
Object itself
Set pixel padding between tick line and label.
Set rotation of tick label.
Rotation in degrees
Object itself
Set tick length as pixels.
Tick length as pixels.
Object itself for fluent interface.
Sets the position of this custom tick on its Axis
Value in the units of main scale
This for fluid interface
Class that represents a single Axis tick that can be managed by the user.
Custom ticks are created with Axis.addCustomTick.
Frequently used methods:
dispose
Styling CustomTicks:
Tick gridline can be styled with CustomTick.setGridStrokeStyle
TickMarker (label, tick, possible background) are styled via CustomTick.setMarker as a callback function, like this:
CustomTick.setMarker((tickMarker) => tickMarker // Style TickMarker. .setTextFillStyle(new SolidFill({ color: ColorRGBA( 255, 0, 0 ) })) .setFont((font) => font.setStyle( 'italic' )) )
See TickMarker for available customization API.
Styling specific TickMarkers:
When a custom tick is created, a tick marker builder can be specified. This specifies the shape, and general visual look of the custom tick, and can also expose a larger set of customization API for the tick marker. To use the specific API, it is required to cast the tick marker object to the correct type (TypeScript users only):
const customTick = Axis.addCustomTick(UIElementBuilders.PointableTextBox) customTick.setMarker((tickMarker: UIPointableTextBox) => tickMarker // ^ Above type cast is necessary to access full configuration API of UIPointableTextBox // Style TickMarker background fill color. .setBackground((background) => background .setFillStyle(new SolidFill({ color: ColorRGBA(255, 0, 0, 100) })) ) )
For reference,
UIElementBuilders.AxisTick
will support API as described by UITickUIElementBuilders.PointableTextBox
will support API as described by UIPointableTextBox