resetDrilldownLevel

Sets the current drill-down level for Drilldown Charts.

  • To return to a previous level, set the value to a number less than the current level.
  • To return to the root chart, set the value to 0.

Setting the value to a number greater than the current level will have no effect.

Example - use resetDrilldownLevel to get back to the root Chart

<button id="reset">Reset Drilldown</button>
<div id="chart"></div>
<script>
  $("#reset").click(function() {
    var chart = $("#chart").getKendoChart();
    chart.resetDrilldownLevel(0);
  });

  $("#chart").kendoChart({
    series: [{
      type: 'column',
      name: 'Total Sales By Company',
      field: 'sales',
      categoryField: 'company',
      drilldownField: 'details',
      data: [{
          company: 'Company A',
          sales: 100,
          details: {
              name: 'Company A Sales By Product',
              type: 'column',
              field: 'sales',
              categoryField: 'product',
              data: [{
                product: 'Product 1',
                sales: 80
              }, {
                product: 'Product 2',
                sales: 20
              }]
          }
      }, {
          company: 'Company B',
          sales: 200,
          details: {
              name: 'Company A Sales By Product',
              type: 'column',
              field: 'sales',
              categoryField: 'product',
              data: [{
                product: 'Product 1',
                sales: 40
              }, {
                product: 'Product 2',
                sales: 160
              }]
          }
      }]
    }]
  });
</script>
In this article