Get auto dispose behavior for this UI element.
Auto dispose mode.
Get dragging mode of object. Defines how the object can be dragged by mouse.
Object itself
Get theme effect enabled on component or disabled.
A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components.
Whether this effect is drawn above a particular component can be configured using the setEffect
method.
// Example, disable theme effect from a particular component.
Component.setEffect(false)
For the most part, theme effects are enabled by default on most components.
Theme effect is configured with effect property.
Boolean that describes whether drawing the theme effect is enabled around the component or not.
Abstract
getGet mouse style.
Interface for defining how mouse should look when hovering over UI object
Returns the size of the UiElements in pixels including any Margins or Paddings
Object size in pixels
Optional
spaceOfInterest: UISpaceParameter to disregard parts of object when calculating the position. Defaults to Margin, which includes everything. Should only ever be necessary for sub-classes
Subscribe to onDispose
event.
This event is triggered whenever the object is disposed.
A component can only be disposed by the end user, by calling the dispose
method on the component or the component which owns it.
// Example usage
Dashboard.onDispose(() => {
console.log('Dashboard was disposed')
})
Dashboard.dispose()
Token of subscription
Handler function for event
Subscribe to Mouse Click event
Token-object that is a reference ID to the listener created.
Function that will be called when mouse clicks the bounds of UiObject.
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
Token-object that is a reference ID to the listener created.
Function that will be called when mouse enters the bounds of UiObject.
Subscribe to Mouse Leave event
Token-object that is a reference ID to the listener created.
Function that will be called when mouse leaves the bounds of UiObject.
Subscribe to Mouse Move event
Token of subscription
Event handler function
Subscribe to Mouse Up event
Subscribe to Mouse Wheel event
Token of subscription
Event handler function
Subscribe to Touch End event
Token of subscription
Event handler function
Subscribe to Touch Move event
Token of subscription
Event handler function
Subscribe to Touch Start event
Token of subscription
Event handler function
Set auto dispose behavior for this UI element.
Can be used to set a condition, where the UI element is automatically disposed, removing it from view.
// Example, remove UI element when it is larger than 20% of viewport.
UIElement.setAutoDispose({
type: 'max-width',
maxWidth: 0.20,
})
Object itself for fluent interface.
Auto dispose mode.
Set dragging mode of object. Defines how the object can be dragged by mouse.
See UIDraggingModes collection for options.
Object itself
Optional
draggingMode: UIDraggingModesDraggingMode or undefined to disable dragging
Set theme effect enabled on component or disabled.
A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components.
Whether this effect is drawn above a particular component can be configured using the setEffect
method.
// Example, disable theme effect from a particular component.
Component.setEffect(false)
For the most part, theme effects are enabled by default on most components.
Theme effect is configured with effect property.
Object itself.
Theme effect enabled
Set margin around object in pixels.
Object itself
Number with pixel margins for all sides or datastructure with individual pixel margins for each side. Any side can be omitted, only passed values will be overridden.
Abstract
setSet mouse style when hovering over UI object.
Object itself
Interface for defining how mouse should look when hovering over UI object
Interface for a stand-alone UIElement.
Adds ability for: