如何在highcharts中查看ip地址
示例代码
我需要修复yAxis标签和工具提示
电流输出:
5G </跨度> + ——————- + | | 3G | o锟
小提琴演示
$(function () { $('#container').highcharts({ chart: { type: 'scatter', inverted: true }, xAxis: { categories: ['1.1.1.1 ', '2.2.2.2', '3.3.3.3'] }, series: [{ data: [29.9, 71.5, 106.4] }] }); });
你可以使用 标签格式化程序
yAxis: { labels: { formatter: function () { return num2ip(this.value); } } }
您可以按如下方式格式化工具提示,即使用catch this.key 引用气泡图中的第三个值
this.key
tooltip: { formatter: function () { return '<b>' + num2ip(this.y) + ':' + this.x + '</b> - <b>' + this.key + '</b>' ; } },
演示@ jsFiddle