0
我想使用C3 Chart庫繪製標準化圖表。如何使用C3圖表繪製標準化堆棧圖?
我當前的代碼是
var chart = c3.generate({
bindto: '#column-chart-main',
size: {
height: $('.chart-area').height()
},
data: {
rows:
chartFinalData
,
type: 'bar',
labels: {
format: d3.format('%')
},
colors: chartFinalColors,
transition: {
duration: 100
}
},
zoom: {
enabled: true
},
axis: {
y: {
show: false,
max: 1,
min: 0,
padding: {bottom:0}
},
x: {
type: 'category',
categories: chartFinalBrands
},
rotated: setChartType
},
tooltip: {
format: {
value:d3.format('%')
}
},
legend: {
show: $scope.chartTrans.showHideLegends,
position: 'inset',
inset: {
anchor: legendPosition,
x: 10,
y: 10,
step: legendSteps,
}
}
});
上面的代碼生成簡單的塊堆圖表。 但我需要正常化塊堆圖表
我目前的圖表 - current-chart 我需要圖表作爲每 - required-chart
在此先感謝
感謝@mgraham –