有什么方法可以将 highcharts 的 dataLabels 设置为不重叠较小的尺寸?
我有一个图表是 similar to this one但我想要实现的是:
- 交替使用 Y 值(数据标签:15、40 等。)
- 避免文本重叠,而不是数字我有:“长文本”以 iPhone 尺寸重叠
有没有不指定dataLabels
的x
和y
位置的其他选项?
{
"x": 1400457600000,
"y": 15,
"dataLabels": {
"x": 25,
"y": -5,
"style": {
"color": "#000000"
}
}
}
最佳答案
您可以使用 this检测碰撞的示例。
events: {
load: function() {
StaggerDataLabels(this.series);
},
redraw: function() {
var series = this.series;
setTimeout(function() {
StaggerDataLabels(series);
}, 1000);
}
},
关于javascript - highcharts 响应式数据标签显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23739935/