Highcharts 导出按钮未显示(包括库等)
Highcharts export button not showing (included the libraries etc)
我已经尝试过几次使用其他可用的示例,但仍然没有成功
这是代码 https://jsfiddle.net/mrbfqay6/
P.S:您只需要在第一个输入字段中添加一个随机数,然后单击提交生成图表。谢谢
function renderChart(){
图表 = 新 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'
}
]
});
}
您已经为 exporting
定义了两次选项:
chart = Highcharts.chart({
exporting: {
"enabled": true
},
...,
exporting: {
enabled: false
},
...
});
这导致禁用导出。你只需要启用它。
现场演示: https://jsfiddle.net/BlackLabel/na5rc2s9/
API参考:https://api.highcharts.com/highcharts/exporting.enabled
我已经尝试过几次使用其他可用的示例,但仍然没有成功 这是代码 https://jsfiddle.net/mrbfqay6/ P.S:您只需要在第一个输入字段中添加一个随机数,然后单击提交生成图表。谢谢
function renderChart(){
图表 = 新 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'
}
] });
}
您已经为 exporting
定义了两次选项:
chart = Highcharts.chart({
exporting: {
"enabled": true
},
...,
exporting: {
enabled: false
},
...
});
这导致禁用导出。你只需要启用它。
现场演示: https://jsfiddle.net/BlackLabel/na5rc2s9/
API参考:https://api.highcharts.com/highcharts/exporting.enabled