Pie Chart Behavior
Open
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
There is another way to accomplish this:
``` javascript
var chart = c3.generate({
data: {
columns: [
['data1', 30],
['data2', 120],
['data3', 20],
],
type : 'pie',
onclick: function (d, i) { console.log("onclick", d, i,chart.data.shown()); },
},
legend: {
item: {
onclick: function (id) {chart.toggle(id);if(chart.data.shown().length===0){chart.toggle();}}
}
}
});
```
change the behavior of legend.
thanks
Contributor guide
Assessment
This issue has not been assessed yet.