使用 highchart,有没有办法根据特定的 x/y 轴值添加标签?
使用 highchart's labels ,我能够在给定位置以像素为单位写入文本,但我需要从轴给出一个值作为位置。
例如,在 this jsFiddle 中我想将标签位置设置为“六月”,就像情节线一样。
我该怎么做?
labels: {
items : [{
html : 'Summer starts here !' ,
style : {
left: '10px',
//I need to set the left position as an xValue : the timestamp for the summer start.
top: '100px'
}
}]
}
最佳答案
你的plotLine可以有一个标签,看看:http://api.highcharts.com/highcharts#xAxis.plotLines.label
关于highcharts - xAxis 值上的 Highcharts 位置标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16108641/