有时候我的观点很接近,我的高图隐藏了我的标签。是否有一个选项来避免这种情况(图表来自定期刷新的数据)
在示例中,指向" A TEST"和" B - 请给我看看"靠近在一起会导致重叠。图表会自动隐藏B的标签,但是我希望它显示(图表不应该超过大约3个点,因此杂乱不应该成为问题)
http://jsfiddle.net/4jb4gusj/1/
$(function () {
$('#container').highcharts({
chart: {type: 'scatter'},
title: {text: 'title'},
subtitle: {text: 'subtitle'},
xAxis: {
min: 2,
max: 5,
type: 'linear',
title: {
text: 'Weight'
}
},
yAxis: {
title: {
text: 'Height'
},
min: 110,
max: 170
},
legend: {
Layout : 'vertical'
},
tooltip: {
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x:%e. %b}: {point.y:.2f} m'
},
plotOptions: {
scatter: {
dataLabels: {
formatter: function() {
return this.series.name ;
},
enabled: true
},
marker: {
radius: 5,
states: {
hover: {
enabled: true,
lineColor: 'rgb(100,100,100)'
}
}
},
states: {hover: {marker: {enabled: false}}},
tooltip: {
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x} cm, {point.y} kg'
}
}
},
series: [{
name: "A TEST ", data: [[3.91, 140.63]]
}, {
name: "B - PLEASE SHOW ME",
data: [[3.65, 143.68]]
}, {
name: "C TEST ",
data: [[2.69, 172.94]]
}
]
});
});