Skip to content
Advertisement

Highcharts export button not showing (included the libraries etc)

I have tried several times using other examples available but still no luck here’s the code https://jsfiddle.net/mrbfqay6/ P.S: you just need to add a random amount in first input field and then click submit to generate graph. Thanks

function renderChart(){

chart = new Highcharts.Chart({

chart: {
  renderTo: 'container',
  type: 'column',
  marginRight: 20,
  events: {
    load: function() {
      // nothing to do here right now
    }
  }
},
title: {
  text: 'Some random data'
},
xAxis: {
  tickPixelInterval: 50
},
yAxis: {
  title: {
    text: 'Value'
  }
},
exporting: {"enabled":true},
tooltip: {
  formatter: function() {
    return '<b>' + this.series.name + '</b><br/>' +
      Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
      Highcharts.numberFormat(this.y, 2);
  }
},
legend: {
  enabled: true
},
exporting: {
  enabled: false
}, plotOptions: {
    column: {
        stacking: 'normal',
      
    }
},
series: [{
name: ' Amortization',
data:amort_data,

 
}
,{
  name: 'Saving',
  data: wow_saving,
  stack:'wow'

},
{
  name: 'Financing',
  data: lease_data,
  stack: 'wow'


}

] });

}

Advertisement

Answer

You have defined options for exporting twice:

    chart = Highcharts.chart({
      exporting: {
        "enabled": true
      },
      ...,
      exporting: {
        enabled: false
      },
      ...
    });

Which results in disabled exporting. You just need to enable it.


Live demo: https://jsfiddle.net/BlackLabel/na5rc2s9/

API Reference: https://api.highcharts.com/highcharts/exporting.enabled

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement