我想在 Highmap 的 map 容器中创建一个按钮。我看到许多示例都与使用导出的 Highcharts 相关联。有人可以帮我举个 Highmaps(世界或某个特定国家/地区)的例子吗? 更具体地说,使用 mapbubble 时不会创建按钮。
我的样本:Link
exporting: {
buttons: {
customButton: {
x: -62,
onclick: function () {
alert('Clicked');
},
symbol: 'circle'
}
}
}
最佳答案
要创建按钮,您可以使用与 Highcharts 中使用的代码相同的代码 - Highcharts: replace custom button image on hover
如果您想在上下文菜单(导出菜单)中创建按钮,那么您可以在图表的选项中设置它们,例如 exporting.buttons
.
示例:http://jsfiddle.net/6umj6veL/
编辑:不要忘记包含导出模块;)
<script src="https://code.highcharts.com/modules/exporting.js"></script>
关于javascript - Highmaps - 使用导出创建自定义按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36573961/