Highcharts Y-axis title text length is more than chart's height

断了今生、忘了曾经 提交于 2019-12-25 02:49:09

问题


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?

see in jsfiddle


回答1:


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/



来源:https://stackoverflow.com/questions/29918054/highcharts-y-axis-title-text-length-is-more-than-charts-height

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!