Events
This section describes events fired by this widget.
disposing
Fires when the widget is being removed.
Instead, you can use the onDisposing option to handle the event.
See Also
exported
Fires after data from the widget is exported.
To perform a custom action after data from the widget is exported, implement a handler for this event. For example, this handler can notify the user that the exporting has been completed. Within this handler, you can use the object passed to it as the parameter.
See Also
- exporting - an event that fires before data from the widget is exported.
- fileSaving - an event that fires before a file with exported data is saved on the user's local storage.
exporting
Fires before data from the widget is exported.
Information about the event.
The widget's container.
Data that is available for binding against the element. Available only in the Knockout approach.
The name of the file to which the widget is about to be exported.
Assign true to this field if you need to prevent exporting.
To perform a custom action before data from the widget is exported, implement a handler for this event. Within this handler, you can use the object passed to it as the parameter. For example, using the cancel field of this object, you can cancel exporting.
See Also
- exported - an event that fires after data from the widget is exported.
- fileSaving - an event that fires before a file with exported data is saved on the user's local storage.
fileSaving
Fires before a file with exported data is saved on the user's local storage.
Information about the event.
The widget's container.
The name of the file to be saved.
The format of the file to be saved.
Possible Values: 'PNG' | 'PDF' | 'JPEG' | 'SVG' | 'GIF'
Exported data as a BLOB.
Assign true to this field if you need to prevent the file from being saved.
To perform a custom action before a file with exported data is saved on the user's local storage, implement a handler for this event. Within this handler, you can use the object passed to it as the parameter. For example, using the cancel field of this object, you can cancel file saving.
See Also
incidentOccurred
Fires when an error or warning appears in a widget.
When implementing a handling function for this event, you can access information about the occurred incident using the target field of the function's argument. This information includes the following.
- id
Contains the ID of the incident. The full list of IDs can be found in the Errors and Warnings section. - type
Contains the type of the incident. This field equals 'error' for errors or 'warning' for warnings. - args
Contains the argument of the incident's message. The content of this field varies greatly, depending on the incident. For example, it may contain the name of the data source field that was not specified correctly, or the name of the option that was not set properly. - text
Contains the text passed to the browser console. This text includes the content of the args field, if there is any. - widget
Contains the name of the widget that produced the error or warning. - version
Contains the currently used version of the ChartJS library.
See Also
initialized
Fires when the widget is initialized.
Instead, you can use the onInitialized option to handle the event.
See Also
optionChanged
Fires after an option of the component is changed.
Provides function parameters.
Provides access to the widget instance.
Specifies the name of the option whose value is changed.
Specifies a full name of the option whose value is changed. The full name is formed by concatenating the names of the options that are presented in the hierarchy of the given option. The names are delimited by commas.
Specifies a new value for the option.
An HTML element of the widget.
Provides access to the data that is available for binding against the element. Available only in the Knockout approach.
Instead, you can use the onOptionChanged option to handle the event.
See Also
tooltipHidden
Fires when a sparkline's tooltip becomes hidden.
The sparkline's tooltip becomes invisible when a user moves the mouse cursor outside of the widget.
When a tooltip is made hidden, you can perform specific actions by handling this event. To do this, implement a handling function and assign it to the onTooltipHidden option. When implementing a handling function, use the object passed to it as its parameter. This object will provide you with the widget instance and its container.
See Also
tooltipShown
Fires when a sparkline tooltip appears.
The sparkline tooltip appears when a user hovers the mouse cursor over it.
When a tooltip appears, you can perform specific actions by handling this event. To do this, implement a handling function and assign it to the onTooltipShown* option. When implementing this function, use the object passed to it as its parameter. This object will provide you with the widget instance and its container.