score:3

Accepted answer

just include <script src="https://code.highcharts.com/modules/exporting.js"></script>

you can enable or disable it by adding buttonoptions. defaults to true

highcharts.chart('container', {
    navigation: {
        buttonoptions: {
            enabled: true
        }
    }
});

highcharts.chart('container', {
  chart: {
    type: 'column',
    events: {
      load: function() {
        var series = this.series[0];
        setinterval(function() {
          newvalue = math.random() * 100;
          series.update({
            data: [newvalue],
          }, true)
        }, 1000);
      }
    }
  },
  title: {
    text: 'monthly average rainfall'
  },
  subtitle: {
    text: 'source: worldclimate.com'
  },
  xaxis: {
    categories: [
      'jan'
    ],
    crosshair: true
  },
  yaxis: {
    min: 0,
    title: {
      text: 'rainfall (mm)'
    }
  },
  tooltip: {
    headerformat: '<span style="font-size:10px">{point.key}</span><table>',
    pointformat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
      '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
    footerformat: '</table>',
    shared: true,
    usehtml: true
  },
  plotoptions: {
    column: {
      pointpadding: 0.2,
      borderwidth: 0
    }
  },
  series: [{
    name: 'tokyo',
    data: [49.9]

  }, {
    name: 'new york',
    data: [83.6]

  }, {
    name: 'london',
    data: [48.9]

  }, {
    name: 'berlin',
    data: [42.4]

  }]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="height: 400px; margin-top: 1em"></div>


Related Query

More Query from same tag