Highcharts 如何在另一侧指定打印线文字样式而不是默认样式
我用Highcharts创建了一个图表。绘制以在X轴上绘制线。我想在另一侧显示绘图线,而不是默认值 我的代码是Highcharts 如何在另一侧指定打印线文字样式而不是默认样式,highcharts,highstock,Highcharts,Highstock,我用Highcharts创建了一个图表。绘制以在X轴上绘制线。我想在另一侧显示绘图线,而不是默认值 我的代码是 plotLines: [{ value: pur_time, width: 2 , color: '#656568', dashStyle: 'dash', id: 'plotline', lab
plotLines: [{
value: pur_time,
width: 2 ,
color: '#656568',
dashStyle: 'dash',
id: 'plotline',
label: {
text: 'Purchase deadline',
style: {
color: '#656568',
fontWeight: 'bold'
}
}
},{
value: exp_time,
width: 2 ,
color: '#A28F29',
id: 'plotline1',
label: {
text: 'Expiration time',
opposite: true,
style: {
color: '#686A3B',
fontWeight: 'bold'
}
}
}]
这是我实际得到的样本
我期待的是什么样子
尝试打印线标签的
旋转属性(请参阅)
我修改了API文档中的demo fiddle,以符合您的要求:
在这种情况下,我将rotation
设置为270
将其翻转,并将x
值设置为-5
将其推到左侧
我希望这是有帮助的
label: {
text: 'Plot line',
verticalAlign: 'middle',
textAlign: 'center',
rotation: 270,
x: -5
}