Methods

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.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default"></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function SparkLineMethod(){
        var sparkObj = $("#default").data("ejSparkLine");
        sparkObj.redraw();
    };

    Events

    load

    Fires before loading the sparkline.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" load = {Load}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function Load(){
        // Do Something
    };

    loaded

    Fires after loaded the sparkline.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" loaded = {Loaded}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function Loaded(){
        // Do Something
    };

    tooltipInitialize

    Fires before rendering trackball tooltip. You can use this event to customize the text displayed in trackball tooltip.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" tooltipInitialize ={TooltipInitialize}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function TooltipInitialize(){
        // Do Something
    };

    seriesRendering

    Fires before rendering a series. This event is fired for each series in Sparkline.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" seriesRendering = {SeriesRendering}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function SeriesRendering(){
       // Do Something
    };

    pointRegionMouseMove

    Fires when mouse is moved over a point.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" pointRegionMouseMove = {PointRegionMouseMove}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function PointRegionMouseMove(){
        // Do Something
    };

    pointRegionMouseClick

    Fires on clicking a point in sparkline. You can use this event to handle clicks made on points.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" pointRegionMouseClick = {PointRegionMouseClick}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function PointRegionMouseClick(){
       // Do Something
    };

    sparklineMouseMove

    Fires on moving mouse over the sparkline.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" sparklineMouseMove = {SparklineMouseMove}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function SparklineMouseMove(){
        // Do Something
    };

    sparklineMouseLeave

    Fires on moving mouse outside the sparkline.

  • html
  • <div id="line"></div>
  • javascript
  • ReactDOM.render(
        <EJ.Sparkline id="default" sparklineMouseLeave = {SparklineMouseLeave}></EJ.Sparkline>,
    	document.getElementById('line')
    );
    
    function SparklineMouseLeave(){
        // Do Something
    };