The code is used as an example.
I need to create a pie chart having 4 divisions (site1, site2 ...), each division corresponds to its corresponding load value.
In the above code, I cannot achieve this (I specified the value: ['upload']) ...
What exact value should I indicate?
Thanks..
chart = c3.generate({ data: { json: [ {name: 'www.site1.com', upload: 200}, {name: 'www.site2.com', upload: 100}, {name: 'www.site3.com', upload: 300}, {name: 'www.site4.com', upload: 400}, ], keys: { // x: 'name', // it possible to specify 'x' when category axis value: ['upload'], }, type:'pie' }, axis: { x: { // type: 'category' } } });
c3
Nithin a
source share