Events and Methods in JQuery Sparkline widget
20 Mar 20184 minutes to read
Methods
redraw()
This methods redraws the entire sparkline. You can call redraw()
whenever you update, add or remove points from the data source or whenever you want to refresh the UI.
// redraw method for sparkline
$("#container").ejSparkline("redraw");
Events
load
The load
event is fired before loading the sparkline.
$("#container").ejSparkline({
//load event for sparkline
load: function (args) {
//Do something
}
});
loaded
The loaded
event is fired after loaded the sparkline.
$("#container").ejSparkline({
//loaded event for sparkline
loaded: function (args) {
//Do something
}
});
tooltipInitialize
Fires before rendering trackball tooltip. You can use tooltipInitialize
event to customize the text displayed in trackball tooltip.
$("#container").ejSparkline({
//ToolTip event for sparkline
tooltipInitialize: function (args) {
//Do something
}
});
seriesRendering
Fires before rendering a series. The seriesRendering
event is fired for each series in Sparkline.
$("#container").ejSparkline({
//seriesRendering event for sparkline
seriesRendering: function (args) {
//Do something
}
});
pointRegionMouseMove
The pointRegionMouseMove
event is fired when mouse is moved over a point.
$("#container").ejSparkline({
//pointRegionMouseMove event for sparkline
pointRegionMouseMove: function (args) {
//Do something
}
});
pointRegionMouseClick
The pointRegionMouseClick
event is fired on clicking a point in sparkline. You can use this event to handle clicks made on points.
$("#container").ejSparkline({
//pointRegionClick event for sparkline
pointRegionMouseClick: function (args) {
//Do something
}
});
sparklineMouseMove
The sparklineMouseMove
is fired on moving mouse over the sparkline.
$("#container").ejSparkline({
//sparklineMouseMove event for sparkline
sparklineMouseMove: function (args) {
//Do something
}
});
sparklineMouseLeave
The sparklineMouseLeave
event is fired on moving mouse outside the sparkline.
$("#container").ejSparkline({
//sparklineMouseLeave event for sparkline
sparklineMouseLeave: function (args) {
//Do something
}
});
Click
The click
event is fired on clicking the sparkline.
//Click event for sparkline
$("#container").ejSparkline({
click: function (args) {
//Do something
}
});
doubleClick
The doubleClick
event is fired on double clicking the sparkline.
//DoubleClick event for sparkline
$("#container").ejSparkline({
doubleClick: function (args) {
//Do something
}
});
rightClick
The rightClick
event is fired on right clicking the sparkline.
//RightClick event for sparkline
$("#container").ejSparkline({
rightClick: function (args) {
//Do something
}
});