Warning: Failed prop type: Cannot read property 'line' of undefined
See original GitHub issueAttempting to use this library with no luck. When I add the following code to one of my components…
import { Line as LineChart } from 'react-chartjs-2'
render() {
<LineChart data={data} />
)
I get this error message:
Warning: Failed prop type: Cannot read property ‘line’ of undefined
Has anyone come across this and figured out a solution?
I’m using:
"chart.js": "^2.7.2",
"react-chartjs-2": "^2.7.4",
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top Results From Across the Web
React : Warning: Failed prop type: Cannot read property 'apply ...
When you are using requiredIf , the first parameter should be the expected type. But it should not have the isRequired part.
Read more >Failed prop type: Cannot read property 'line' of undefined ...
Attempting to use this library with no luck. When I add the following code to one of my components... import { Line as...
Read more >How to Read React Errors (fix 'Cannot read property of ...
This error usually means you're trying to use .map on an array, but that array isn't defined yet. That's often because the array...
Read more >React TypeError: Cannot read property 'props' of undefined
The "Cannot read property 'props' of undefined" error occurs when a class method is called without having the correct context bound to the...
Read more >React TypeError: Cannot read property function of undefined
Your browser can't play this video. Learn more. Switch camera ... Solved: React TypeError: Cannot read property function of undefined.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am using following version from both lib
I had the same problem which I fixed updating the chart.js dependency. v2.3.7 is the current version by now.
run
npm install chart.js@2.3.7 --save