c3js / c3js/c3

Version 0.7 onwards: Uncaught TypeError: Cannot read property 'call' of undefined

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

First load is ok but as soon as i load the second chart from a button click event and call the c3.generate again i get this error.

I use webpack with VUEJS, if i downgrade to version 0.6 there is no issue.

**Can you fix bug below please?**

c3.js:7691 Uncaught TypeError: Cannot read property 'call' of undefined
at ChartInternal.getRatio (c3.js:7691)
at ChartInternal.textForArcLabel (c3.js:5649)
at SVGTextElement.eval (text.js:14)
at Selection.eval [as each] (each.js:6)
at Selection.eval [as text] (text.js:21)
at ChartInternal.redrawArc (c3.js:5967)
at ChartInternal.redraw (c3.js:1848)
at ChartInternal.initWithData (c3.js:1538)
at ChartInternal.init (c3.js:1270)
at new Chart (c3.js:82)

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by calling c3.generate for a second chart from the button event in the webpack/VueJS setup. Start at ChartInternal.getRatio in c3.js:7691 and follow its call from textForArcLabel in text.js; done means the second chart loads without the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3js, javascript, webpack
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.