c3js / c3js/c3

Weird behavior using chart.toggle() and legend labels.

Open
#1,799 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

To reproduce the issue I've issued the `chart.toggle()` method. All datasets are hidden. This is right.
But now, I manually clicked any dataset in the legend. It's toggled. This is right again, but if I issue the `chart.toggle()` in this state, the legend doesn't get modified.

I've been able to solve this using this:

``` javascript
chart.toggle();
chart.legend.hide();
chart.legend.show();
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.