c3js / c3js/c3

[Pie Charts] Destroying chart while the chart is animating causes null error.

Open
#2,187 2 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

* **c3 v0.4.17**:
* **d3 3.5.17**:
* **Chrome**:
* **Mac OSX**:

When .destroy() is called on a pie chart while it is animating (you have to be lucky and time this one accurately), you can get a null pointer exception. Because .destroy() sets every property of $$ to null, near-future calls to stuff like $$.data.targets or $$.config.data_types will throw a null error since $$.data and $$.config are set to null.

![screen shot 2017-08-03 at 3 19 57 pm](https://user-images.githubusercontent.com/4667949/31158615-ccc755ee-a877-11e7-869d-eff2768baba1.png)

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.