Readonly scaleCallback function that is triggered when event is fired.
Optional options: LCJSAddEventListenerOptionsOptional extra configuration options.
Permanently destroy the component.
To fully allow Garbage-Collection to free the resources used by the component, make sure to remove any references to the component and its children in application code.
let chart = ...ChartXY()
let axisX = chart.getDefaultAxisX()
// Dispose Chart, and remove all references so that they can be garbage-collected.
chart.dispose()
chart = undefined
axisX = undefined
Object itself for fluent interface
Remove event listener added using addEventListener.
The expected argument should be the exact same callback function that was supplied using addEventListener:
// Basic example syntax
const listener = () => {}
obj.addEventListener('click', listener)
obj.removeEventListener('click', listener)
// Basic boilerplate of custom interaction when user drags on an object
obj.addEventListener('pointerdown', (eventDown) => {
let prevCoord = eventDown
const handlePointerMove: LCJSInteractionEventListener<'pointermove'> = (eventMove) => {
const delta = { x: eventMove.clientX - prevCoord.clientX, y: eventMove.clientY - prevCoord.clientY }
prevCoord = eventMove
console.log(delta, eventMove.clientX, eventMove.clientY)
}
const handlePointerUp: LCJSInteractionEventListener<'pointerup'> = (eventUp) => {
window.removeEventListener('pointermove', handlePointerMove)
window.removeEventListener('pointerup', handlePointerUp)
}
window.addEventListener('pointermove', handlePointerMove)
window.addEventListener('pointerup', handlePointerUp)
})
Listener that was added using addEventListener.
Set auto-fit strategy of Cursor. Affects logic of automatic fitting of Cursors ResultTable to the screen.
Object itself for fluent interface
Optional autoFitStrategy: AutoFitStrategyFactoryAutoFitStrategy factory or undefined to disable auto-fitting
Mutator function for Cursors PointMarker. PointMarker is a visual that is displayed at the Cursors position
Object itself for fluent interface
Mutator function for PointMarker
Set position of the Cursor.
Object itself.
CursorPosition3D
Mutator function for Cursors ResultTable. ResultTable is a visual that displays currently pointed data next to its location
Object itself for fluent interface
Mutator function for ResultTable
Modify cursor ticks along X axis. This covers elements like:
// Example syntax
cursor.setTickX((tick) => tick
.setBackgroundFillStyle(new SolidFill({ color: ColorRGBA(255, 0,0 ) }))
)
For available APIs refer to CustomTick3D.
Object itself.
Callback function that modifies the tick object(s).
Modify cursor ticks along Y axis. This covers elements like:
// Example syntax
cursor.setTickY((tick) => tick
.setBackgroundFillStyle(new SolidFill({ color: ColorRGBA(255, 0,0 ) }))
)
For available APIs refer to CustomTick3D.
Object itself.
Callback function that modifies the tick object(s).
Modify cursor ticks along Z axis. This covers elements like:
// Example syntax
cursor.setTickZ((tick) => tick
.setBackgroundFillStyle(new SolidFill({ color: ColorRGBA(255, 0,0 ) }))
)
For available APIs refer to CustomTick3D.
Object itself.
Callback function that modifies the tick object(s).
Modify cursor ticks along every axis. This covers elements like:
// Example syntax
cursor.setTicks((tick) => tick
.setBackgroundFillStyle(new SolidFill({ color: ColorRGBA(255, 0,0 ) }))
)
For available APIs refer to CustomTick3D.
Object itself.
Callback function that modifies the tick object(s).
Add callback function to be triggered when specified event is fired.
Some classes also report extra information about the interacted object with the second parameter:
Optional third parameter allows registering event handlers that will automatically remove themselves after first trigger:
Each class has its own list of supported events. Some events are from HTML standard (
click,pointerdown, etc.), while others are own events from LightningChart JS (dispose,resize, etc.)To find what events are available, you can try following:
TypeScriptenabled, just writeaddEventListenerand see what possible event types the IDE suggests. These APIs are strongly typed, and even the callback event will be correctly typed.Ktype parameter extends.