如何在 Highcharts 的 Y 轴上添加千位分隔符?
这就是我所拥有的:
yAxis: [{ // Primary yAxis
labels: {
最佳答案
除了@jfrej suggested :
yAxis
使用 {value}
和 xAxis
:
yAxis
format xAxis
format {point.y}
and/or {point.x}
:
tooltip.pointFormat
tooltip.pointFormat
with valueSuffix
extension {x}
and/or {y}
:
plotOptions.series.dataLabels
, 格式化所有点series.data.dataLabels
, 格式化特定点因此,由于您正在格式化 yAxis
,{value}
应该可以按预期工作:
yAxis: {
labels: {
format: '{value:,.0f} €'
}
}
https://stackoverflow.com/questions/19810931/