0
我遵循參考和this answer的說明,但沒有成功。C3堆疊圖表維護數據訂單
我有一個堆疊的條形圖,我希望堆棧中的數據以它在數據中的順序出現,但它得到了重新排序,我無法弄清楚如何防止它。
這裏是jsfiddle。
下面的代碼
var chartOptions = {
element: 'chart',
data: {
"rows":[["0-1","2-3","4-5","6","7"],[25,56,14,2,1],[6,66,27,0,0],[0,70,30,0,0],[27,54,14,5,0],[0,54,30,8,8],[29,64,7,0,0]],
"type":"bar",
"groups":[["0-1","2-3","4-5","6","7"]],
"order":null
},
axis: {
"x":{
"type":"category",
"categories":["Whole List","committed","community","congregation","core","crowd"]
},
"y":{
"padding":{
"top":0
}
}
},
stacked: true,
size: {"height":300}
}
var chart = c3.generate(chartOptions);
我想該系列是在爲了0-1,2-3,4-5,等等