Highcharts Y轴标题文字长度超过了图表的高度 [英] Highcharts Y-axis title text length is more than chart's height
本文介绍了Highcharts Y轴标题文字长度超过了图表的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个图表。在这个图表中,高度是 400px
,但是我的Y轴标题文本很长,所以文本的某些部分不显示。所以我能做什么?
a>
解决方案
您可以在标题上设置宽度并调整边距。
yAxis:{
title:{
enabled:true,
text:'Custom with< b>简单< / b> < i>标记< / i>自定义< b>简单< / b> < i>标记< / i>自定义< b>简单< / b> < i>标记< / i>自定义< b>简单< / b> < i> markup< / i>',
保证金:40,
风格:{
宽度:200,
fontWeight:'普通'
}
$ b 示例: http://jsfiddle.net/EUSVQ/12/
I am working on highcharts. In my code, sometimes Y-axis title text is more than chart's height.
Ex. I am create one chart. In this chart, height is 400px
but my Y-axis title text is long so some part of the text is not display. so what can i do?
解决方案 You can set width on title and adapt margin.
yAxis: {
title: {
enabled: true,
text: 'Custom with <b>simple</b> <i>markup</i>Custom with <b>simple</b> <i>markup</i>Custom with <b>simple</b> <i>markup</i>Custom with <b>simple</b> <i>markup</i>',
margin: 40,
style: {
width: 200,
fontWeight: 'normal'
}
}
},
Example: http://jsfiddle.net/EUSVQ/12/
这篇关于Highcharts Y轴标题文字长度超过了图表的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文