Zooming

Sunburst chart provides zooming (drill down) experience with animation for both mouse and touch enabled devices. It allows you to virtualizing the large sets of data into minimum data view.The zooming is achieved by using the property of zoomSettings

The following code shows how to initialize the zooming.

  • javascript
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module  sunburstComponent {
    
    $(function () {
    
    var sample = new ej.datavisualization.SunburstChart($("#Sunburst"),{
              
              //..
              zoomSettings: { enable: true },	           
             //..
    
            });
        });
    }

    Zooming toolbar

    By default, zooming toolbar will be enabled while zooming the segment.It contains both back and reset option.
    You can align the zooming toolbar position by using toolbarHorizontalAlignment and toolbarVerticalAlignmentproperty.

  • javascript
  • $(function () {
    
    var sample = new ej.datavisualization.SunburstChart($("#Sunburst"),{
              
              //..
              zoomSettings: {enable: true,toolbarHorizontalAlignment: "left"},	           
             //..
    
            });
        });