hiding column after load {..., unload: true} blanks bar chart
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
* **C3 version**: 0.4.18
* **D3 version**: 3.5.17
* **Browser**: Chrome 62
* **OS**: Win 7 64-bit
Similar issue to #1127 , except here I unload in the load function, and any hide/show/toggle operation _afterwards_ blanks the chart
https://jsfiddle.net/0zem6duy/1/
```
var chart = c3.generate({
bindto: "#chart",
data: {
columns: [
['data1', -30, 200, 200, 400, -150, 250],
['data2', 130, 100, -100, 200, -150, 50],
],
type: 'bar',
},
grid: {
y: {
lines: [{value:0}]
}
}
});
setTimeout(function () {
chart.load ({
columns: [
['data1', -320, 200, 200, 400, -150, 250],
['data3', 130, 100, -100, 200, -150, 50],
],
unload: true
});
chart.hide(['data1']);
}, 1000);
```
If I move the hide operation slightly later on, it works, so it looks like another timing/transition issue
https://jsfiddle.net/w3xku9c2/1/
Contributor guide
Assessment
This issue has not been assessed yet.