HighCharts:如何对齐水平yAxis标题 [英] HighCharts: How to aligned horizontal yAxis title
本文介绍了HighCharts:如何对齐水平yAxis标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有2张不同的yAxis标题的图表。我需要这些标题是水平的,并对齐到右侧(在Y线的左侧)。
I have 2 chart with different yAxis title. I need the titles to be horizontal and align to the right (on the left side of the Y line).
标题align仅适用于垂直居中。 (和我需要我的标题在中间)
The title align worked only on the vertical centered. (and I need my titles to be in the middle)
我尝试添加文本对齐到样式没有成功。
I tried adding text-align to the style with no success.
yAxis: {
"title": {
"style": {
"textAlign": "right"
}
}
}
很想听听关于如何工作的想法
Would love to hear ideas on how to work around this problem.
推荐答案
你会喜欢这个,没有文档选项textAlign,但不是风格,但是标题属性。例如: http://jsfiddle.net/g7kUc/1/
You're gonna like this, there is not documented option "textAlign" but not under style, but title property. For example: http://jsfiddle.net/g7kUc/1/
yAxis: {
"title": {
"text": "test",
"textAlign": "right"
}
}
这篇关于HighCharts:如何对齐水平yAxis标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文