CSV에서 가져온 데이터로 스택 막대 차트를 구현하려고합니다. 시리즈 :을 "John, 10,5,3,4,1"과 같은 CSV 파일의 데이터로 업데이트해야합니다. 제발 도와주세요!CSV에서 Highchart 스택 된 막대 데이터
내가 마침내 작동있어
$(function() {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'Stacked bar chart'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
min: 0,
title: {
text: 'Total fruit consumption'
}
},
legend: {
reversed: true
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, 2, 3, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5]
}]
});
});
UPDT하지만 여전히 문제가있다. 막대는 거꾸로되어 있으며 CSV 파일과 동일한 순서로 정확하게 표시해야합니다. 나는 전설에서와 동일한 순서로 적층 된 바 필요
Disconnection,30,30
Site Care,12,12
Documentation,35,35
Lining,22,22
Connection,70,52
: http://i.stack.imgur.com/6EkHg.png
방법처럼 CSV 파서 모습? –