Highcharts出口图表新窗口/标签 [英] Highcharts export chart new window/tab
本文介绍了Highcharts出口图表新窗口/标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试在新标签页中保存/打开Highchart图像。
参考链接:
请咨询。
解决方案
我会发布Paweł的回答,供参考。
$(function(){$('#container')。highcharts({credits:{enabled:false},xAxis:{categories:['Jan ','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月' c']},系列:[{data:[29.9,71.5,106.4,129.2,144.0,176.0,135.6,148.5,216.4,194.1,95.6,54.4]}],导出:{formAttributes:{target:'_blank' }}});});
< script src =https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js>< / script>< script src =http://code.highcharts.com /highcharts.js\"></script><script src =http://code.highcharts.com/modules/exporting.js>< / script>< div id =containerstyle =height:400px; margin-top:1em>< / div>
$(function(){
$('#container')。highcharts({
credit:{
启用:false
},
xAxis:{
类别:['Jan','Feb','Mar','Apr','May' Jun','Jul','Aug','Sep','Oct','Nov','Dec']
},
系列:[{
data :[29.9,71.5,106.4,129.2,144.0,176.0,135.6,148.5,216.4,194.1,95.6,54.4]
}],
exporting:{
formAttributes: {
target:'_blank'
}
}
});
});
I tried the demo on iPad2. It still opens in same window with the URL export.highcharts.com. How can we open/save the image in new tab/window on iPad2?
Been trying to save/open Highchart images in a new tab.
Reference Link:
How to get the exported image without moving from the current window when using mobile devices
Please advice.
解决方案
I'll post Paweł's answer, for reference.
$(function () {
$('#container').highcharts({
credits: {
enabled: false
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}],
exporting: {
formAttributes: {
target: '_blank'
}
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 400px; margin-top: 1em"></div>
$(function () { $('#container').highcharts({
credits: {
enabled: false
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}],
exporting: {
formAttributes: {
target: '_blank'
}
}
});
});
这篇关于Highcharts出口图表新窗口/标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文