나는 이것이 버그라고 생각하지만이 경우 간단한 해결 방법은 왼쪽 여백을 설정하는 것입니다. 예를 들어이 바이올린을 참조하십시오 http://jsfiddle.net/zc1Lc5c6/6/
바이올린 코드 :
$(function() {
$('#container').highcharts({
title: "",
chart: {
spacing: [5, 5, 5, 5],
marginLeft: 32
},
legend: {
layout: "horizontal",
align: "right",
verticalAlign: "top",
itemDistance: 10,
symbolHeight: 8,
symbolPadding: 1,
padding: 0,
margin: 20,
itemMarginBottom: 3
},
plotOptions: {
series: {
dataLabels: {
enabled: false
},
marker: {
symbol: "circle",
radius: 4,
states: {
hover: {
radiusPlus: 1
}
}
},
showInLegend: true
},
line: {
states: {
hover: {
halo: {
size: 8
}
}
}
}
},
series: [{
type: "column",
name: "First column",
data: [5, 2, 13, 3, 3, 6, 2, 3, 2, 1, 5, 2, 1]
}, {
type: "line",
name: "First line",
data: [3, 1, 7, 1, 1, 5, 1, 2, 1, 1, 3, 1, 0],
yAxis: 1,
showInLegend: false
}, {
type: "column",
name: "Second column",
data: [7, 1, 2, 6, 2, 6, 4, 2, 3, 3, 6, 2, 3]
}, {
type: "line",
name: "Second line",
data: [3, 0, 2, 3, 1, 3, 2, 2, 3, 1, 3, 2, 2],
yAxis: 1,
showInLegend: false
}],
yAxis: [{
visible: true,
tickPosition: "inside",
offset: 0,
title: {
text: "# tasks",
align: "high",
textAlign: "left",
rotation: 0,
offset: 0,
margin: 0,
y: -5,
x: -7
},
labels: {
align: "right",
y: -5
}
}, {
visible: true,
tickPosition: "inside",
offset: 0,
type: "linear",
title: {
text: "# completed",
align: "high",
textAlign: "left",
rotation: 0,
offset: 0,
margin: 0,
y: 12,
x: -7
},
labels: {
align: "right",
y: 12
}
}],
xAxis: {
labels: {
y: 16
},
categories: [
"2016 W31",
"2016 W32",
"2016 W33",
"2016 W34",
"2016 W35",
"2016 W36",
"2016 W37",
"2016 W38",
"2016 W39",
"2016 W40",
"2016 W41",
"2016 W42",
"2016 W43"
]
}
});
});
대신 사용자 지정 레이블 또는 자막을 사용합니다. 회전 = 0이면 여유 공간이 생기지 않으며 쉽게 배치 할 수 있습니다. http://jsfiddle.net/zc1Lc5c6/4/ – morganfree
팁 주셔서 감사하지만 내 차트에서 marginLeft를 설정하여 문제를 해결했습니다. 이 바이올린보기 : http://jsfiddle.net/zc1Lc5c6/6/ – Nejc