Highcharts-如何在样式模式下包装y轴标题

时间:2020-10-15 17:04:07

标签: highcharts

有人可以帮我包装y轴标题吗(我正在使用样式模式)? 这是一个示例:https://jsfiddle.net/sabira/6s3wa0m7/

Highcharts.chart('container', {

    chart: {
        styledMode: true,
        type: 'column'
    },

    title: {
        text: 'test'
    },

    yAxis: [{
        className: 'highcharts-color-0',
        title: {
            text: 'very long title text here very long title text here very long title text here very long title text here '
        }
    }],

    plotOptions: {
        column: {
            borderRadius: 5
        }
    },

    series: [{
        data: [1, 3, 2, 4]
    }, {
        data: [324, 124, 547, 221],
    }]

});

1 个答案:

答案 0 :(得分:0)

使用以下CSS样式:

    .highcharts-axis-title {
        width: 200px;
        white-space: normal !important;
    }

实时演示: https://jsfiddle.net/BlackLabel/gqud6c0L/

相关问题