如何使 x 轴上的 pointInterval 在 x 轴与其本身之间有一些空间,因为在我的情况下,pointInterval 是旋转的,它是连接到 x 轴的一些内容。我尝试添加填充但徒劳。
labels: {
rotation: (chartType == 3 ? 0 : -60),
align: 'right',
style: {
fontSize: '14px',
fontFamily: 'proxima-nova,helvetica,arial,sans-seri',
whiteSpace: 'nowrap',
padding:'[100px 100px 100px 100px]'
}
}
Run Code Online (Sandbox Code Playgroud)
一般情况下可以分别设置useHTML: true和paddingLeft/Right/Top/Bottom。请参阅: http: //jsfiddle.net/3bQne/1030/
注意:该解决方案不适用于导出的图表。
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
xAxis: {
categories: ['01/02/2012', '01/03/2012', '01/04/2012', '01/05/2012', '01/06/2012', '01/07/2012'],
labels: {
rotation: -60,
align: 'right',
useHTML: true,
style: {
fontSize: '14px',
fontFamily: 'proxima-nova,helvetica,arial,sans-seri',
whiteSpace: 'nowrap',
paddingLeft: '10px',
paddingRight: '10px',
paddingTop: '10px',
paddingBottom: '10px',
}
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0]
}]
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14648 次 |
| 最近记录: |