[英]how to find title in highcarts
I want to add new item to printing menu. 我想将新项目添加到打印菜单。 You can see my work bottom.
您可以在底部看到我的工作。 Please, help me about this topic.
请帮我这个话题。
var url = chart.title.textStr.replace(/ /g, '-').toLowerCase();
var left = (screen.width/2)-(750/2);
var top = (screen.height/2)-(600/2);
return window.open('itemExport.jsp?Id='+url, 'Export', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+900+', height='+600+', top='+top+', left='+left);
You can get chart title by using chart.options.title.text
您可以使用
chart.options.title.text
获取图表标题
and this title add to exporting menu as 并且此标题添加为导出菜单为
Highcharts.getOptions().exporting.buttons.contextButton.menuItems.push({
text: chart.options.title.text,
onclick: function() {
alert('OK');
/*call custom function here*/
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.