highcharts极坐标图添加最大刻度线
如果你看看这个,你会发现我有:highcharts极坐标图添加最大刻度线,highcharts,Highcharts,如果你看看这个,你会发现我有: tickPositions: [0, 1, 2, 3, 4, 5] 但只有0-4的记号出现。如何显示最大刻度“5”? 我可以隐藏“0”而不弄乱图表吗 您必须将yAxis更新为 yAxis: { min: 0, tickPositions: [0, 1, 2, 3, 4, 5], showLastLabel: true, //displays last label labels: { y: 15, //displays labels
tickPositions: [0, 1, 2, 3, 4, 5]
但只有0-4的记号出现。如何显示最大刻度“5”?
我可以隐藏“0”而不弄乱图表吗
您必须将yAxis更新为
yAxis: {
min: 0,
tickPositions: [0, 1, 2, 3, 4, 5],
showLastLabel: true, //displays last label
labels: {
y: 15, //displays labels below ring
formatter: function() {
console.log(this.value)
var value = this.axis.defaultLabelFormatter.call(this);
return (this.value === 0 ? ' ' : value); //hides 0 value
}
}
},
演示哇,我怎么会错过“showLastLabel”。我知道我通读了API文档。非常感谢。