newDataset);
      chart.update();
    }
  },
  {
    name: 'Add Data',
    handler(chart) {
      const data = chart.data;
      if (data.datasets.length &gt; 0) {
        data.labels.push('data #' + (data.labels.length + 1));
        for (let index = 0; index &lt; data.datasets.length; ++index) {
          data.datasets[index].data.push(Utils.rand(0, 100));
        }
        chart.update();
      }
    }
  },
  {
    name: 'Hide(0)',
    handler(chart) {
      chart.hide(0);
    }
  },
  {
    name: 'Show