Load JSON into PIE Chart
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
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's possible to specify 'x' when category axis
value: ['upload'],
},
type:'pie'
},
axis: {
x: {
// type: 'category'
}
}
});
//This code is taken as an example..
I need to generate a pie chart having 4 divisions (site1,site2...)each division correspond to its respective upload value.
In the above code i am not able to achieve this(I have specified value:['upload'])...
what is the exact value i have to specify?
Thanks..
Contributor guide
Research direction
Start with the c3.generate example in the issue and review the chart library's JSON data and pie-chart documentation or examples. Confirm the required data and keys configuration, then verify that the four site names produce four pie divisions with their corresponding upload values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- d3, javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100