c3js / c3js/c3

Unload doesn't work when some targets are hidden

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

Description

When doing a chart.load({ ..., unload: ['a', 'b', 'c']}), everything works as expected if 'a', 'b' and 'c' are not hidden. If one of them is the chart is not rendered.

Steps to reproduce (I'm using version 0.4.10):

``` javascript
var data = {
bindto: selector,
data: {
json: json,
keys: {
x: 'date',
value: ['a', 'b', 'c']
},
...
}
};
var chart = c3.generate(data);
chart.hide('c');
chart.load({
json: json,
keys: {
x: 'date',
value: ['d','e']
},
unload: ['a', 'b', 'c']
});
```

New data doesn't load, and old data is removed (including lines, legend, etc...). If i remove the chart.hide('c'), it does load.

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.