Public Methods and Events in ASP.NET Core Sparkline
7 Jul 20223 minutes to read
redraw()
Redraws the entire sparkline. You can call this method whenever you update, add or remove points from the data source or whenever you want to refresh the UI.
<ej-spark-line id="SparkLine">
</ej-spark-line>
var line = $("#SparkLine").data("ejSparkLine");
line.redraw();
Events
load
Fires before loading the sparkline.
<ej-spark-line id="SparkLine" load="Load">
</ej-spark-line>
<script type="text/javascript">
function Load(args) {
// Do Something
}
</script>
loaded
Fires after loaded the sparkline.
<ej-spark-line id="SparkLine" loaded="Loaded">
</ej-spark-line>
<script type="text/javascript">
function Loaded(args) {
// Do Something
}
</script>
tooltipInitialize
Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip.
<ej-spark-line id="SparkLine" tooltip-initialize="TooltipInitialize">
</ej-spark-line>
<script type="text/javascript">
function TooltipInitialize(args) {
// Do Something
}
</script>
seriesRendering
Fires before rendering a series. This event is fired for each series in Sparkline.
<ej-spark-line id="SparkLine" series-rendering="SeriesRendering">
</ej-spark-line>
<script type="text/javascript">
function SeriesRendering(args) {
// Do Something
}
</script>
pointRegionMouseMove
Fires when mouse is moved over a point.
<ej-spark-line id="SparkLine" point-region-mouse-move="PointRegionMouseMove">
</ej-spark-line>
<script type="text/javascript">
function PointRegionMouseMove(args) {
// Do Something
}
</script>
pointRegionMouseClick
Fires on clicking a point in sparkline. You can use this event to handle clicks made on points.
<ej-spark-line id="SparkLine" point-region-mouse-click="PointRegionMouseClick">
</ej-spark-line>
<script type="text/javascript">
function PointRegionMouseClick(args) {
// Do Something
}
</script>
sparklineMouseMove
Fires on moving mouse over the sparkline.
<ej-spark-line id="SparkLine" spark-line-mouse-move="SparkLineMouseMove">
</ej-spark-line>
<script type="text/javascript">
function SparkLineMouseMove(args) {
// Do Something
}
</script>
sparklineMouseLeave
Fires on moving mouse outside the sparkline.
<ej-spark-line id="SparkLine" spark-line-mouse-leave="SparkLineMouseLeave">
</ej-spark-line>
<script type="text/javascript">
function SparkLineMouseLeave(args) {
// Do Something
}
</script>