Highcharts - 如何防止长标题与溢出的字幕断行

时间:2013-04-08 20:44:10

标签: highcharts

我有三种语言的高图,数据填充数据。一些翻译的标题将打破并填充两行。没有任何预防措施,这将溢出字幕:

title: {
    text: 'The quick brown fox jumps over the lazy dog and even more',
    style: {
        width: '320px'
    }
},
subtitle: {
    text: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr'
}, 

请参阅此示例:http://jsfiddle.net/puhtu/

如果主标题分为两行,是否有办法动态移动字幕?

2 个答案:

答案 0 :(得分:0)

它看起来像一个bug,所以我已经向我们的开发者https://github.com/highslide-software/highcharts.com/issues/1704

报告了它

答案 1 :(得分:0)

虽然不久前,以下修正了它,因为这仍然是一个问题:

            title: {
                text: "Hello very strange world where people tend to make long chart titles",
                style: {
                    fontSize: '1.9vmin',
                    fontWeight: 'bold',
                    color: '#1381bc',
                    lineHeight: '15em' //This line did the trick
                },
                align: 'left',
                x: 30,
                y: 10
            },