c3js / c3js/c3

Uncaught TypeError: Cannot read property 'data' of null when loading data on donut chart

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

Description

I get this error when moving my mouse on a donut chart that is in the process of loading data:
`Uncaught TypeError: Cannot read property 'data' of null c3.js:4695`
It looks like the tooltip is trying to be drawn while data is being loaded, and this error is thrown because the data (d) is not ready yet.

Except from c3.js:4695:

``` javascript
c3_chart_internal_fn.convertToArcData = function (d) {
return this.addName({
id: d.data.id,
value: d.value,
ratio: this.getArcRatio(d),
index: d.index
});
};
```

Can you stop the drawing of tooltips while data is being loaded?

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.