highcharts - Highcharts - 如何以样式模式包装 y 轴标题
问题描述
有人可以帮我包装 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],
}]
});
解决方案
使用以下 CSS 样式:
.highcharts-axis-title {
width: 200px;
white-space: normal !important;
}