我正在尝试在 x 轴标签和 Highcharts 中的图表之间创建距离。我尝试使用“距离”和“填充”,但没有成功。
chart: {
type: 'column'
},
title: {
text: 'Data input as column arrays'
},
data: {
columns: [
[null, 'Apples', 'Pears', 'Oranges'], // categories
['Blue', 1, 4, 3], // first series
['Black', 5, 4, 2] // second series
]
},
xAxis: {
categories: [
'First Category',
'Second Category',
'Third Category',
],
labels: {
style: {
fontFamily: 'openSans',
fontSize: '16px',
color: '#000000',
},
}
}
这是 jsfiddle: http://jsfiddle.net/aaq4zww5/2/
谢谢!
最佳答案
选项1:使用xAxis
中的偏移
:
xAxis: {
...
offset: 10,
},
选项2:在xAxis->labels
下使用y
:
labels: {
...
y: 25,
},
检查jsfiddle .
关于javascript - x 轴标签与 Highcharts 中图表之间的距离,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35935406/