Highchart 气泡图:将 Y 轴值显示为数字范围
Highchart bubble-chart : Show Y-Axis value as numeric range
我有一张气泡图,需要将 Y 轴价格值显示为“1-10”、“11-20”、“21-30”等价格范围
但是我做不到。
我怎样才能做到这一点?
您好 ppotaczek,非常感谢您的快速回复。我正在尝试使用以下屏幕截图实现气泡图。
Please refer this screen-shot
谢谢
您可以简单地使用 formatter
函数:
yAxis: {
labels: {
tickInterval: 25,
formatter: function() {
if (this.value > 0) {
return this.value - 24 + ' - ' + (this.value);
}
return this.value;
}
},
}
现场演示:https://jsfiddle.net/BlackLabel/3rqdn5pj/
API参考:
https://api.highcharts.com/highcharts/yAxis.tickInterval
https://api.highcharts.com/highcharts/yAxis.labels.formatter
我有一张气泡图,需要将 Y 轴价格值显示为“1-10”、“11-20”、“21-30”等价格范围
但是我做不到。
我怎样才能做到这一点?
您好 ppotaczek,非常感谢您的快速回复。我正在尝试使用以下屏幕截图实现气泡图。
Please refer this screen-shot
谢谢
您可以简单地使用 formatter
函数:
yAxis: {
labels: {
tickInterval: 25,
formatter: function() {
if (this.value > 0) {
return this.value - 24 + ' - ' + (this.value);
}
return this.value;
}
},
}
现场演示:https://jsfiddle.net/BlackLabel/3rqdn5pj/
API参考:
https://api.highcharts.com/highcharts/yAxis.tickInterval
https://api.highcharts.com/highcharts/yAxis.labels.formatter