For example, if you want to use number value, then you need only "useVal": "yes". in many chart, non percent value are default.
you want to use percentage value for the bar chart, then need both "percentVal": "yes", and "useVal": "yes". like following code. ( default value of stacked% and pie are percent )
<canvas id="hoge"></canvas>
<script>
var conf = {
"title": "useVal: yes for bar",
"type": "line",
"width": 400,
"height": 320,
"useVal": "yes"
};
var data = [
["月",1,2,3,4,5,6,7,8],
["ウーロン",20,23,12,20,42,50,43,56],
["コーヒー",52,50,44,50,60,55,68,80]
];
ccchart
.init('hoge0-1', {
"config": conf
"data": data
})
</script>
| |
<canvas id="hoge"></canvas>
<script>
var conf = {
"title": "use percentage value",
"type": "line",
"width": 400,
"height": 320,
"useVal": "yes",
"percentVal": "yes"
};
var data = [
["月",1,2,3,4,5,6,7,8],
["ウーロン",20,23,12,20,42,50,43,56],
["コーヒー",52,50,44,50,60,55,68,80]
];
ccchart
.init('hoge0-2', {
"config": conf
"data": data
})
</script>
|