Defaults creating error
See original GitHub issueI’m trying to use the { defaults } provided by your wrapper but when I pass these into a <Bar /> I get all kinds of errors. (I am not yet modifying these defaults)
My Code
import { Bar, defaults } from 'react-chartjs-2';
// component level
<Bar redraw data={this.props.chartData} height={300} options={defaults} />
Error in console
core.controller.js:443 Uncaught TypeError: Cannot set property '_data' of undefined
at Chart.Controller.update (core.controller.js:443)
at Chart.Controller.resize (core.controller.js:306)
at eval (core.controller.js:224)
at eval (core.helpers.js:982)
update @ core.controller.js:443
resize @ core.controller.js:306
(anonymous) @ core.controller.js:224
(anonymous) @ core.helpers.js:982
scale.radialLinear.js:113 Uncaught (in promise) TypeError: Cannot read property 'callback' of undefined
at ChartElement.convertTicksToLabels (scale.radialLinear.js:113)
at ChartElement.update (core.scale.js:94)
at getMinimumBoxSize (core.layoutService.js:144)
at Object.helpers.each (core.helpers.js:23)
at Object.update (core.layoutService.js:155)
at Chart.Controller.updateLayout (core.controller.js:381)
at Chart.Controller.initialize (core.controller.js:250)
at new Chart.Controller (core.controller.js:231)
at new Chart (core.js:7)
at ChartComponent.renderChart (index.js:212)
Version Chartjs: v2.4.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:40
Top Results From Across the Web
Default Error Handling - Micro Focus
These runtime errors are called exceptions. They indicate that something did not go as expected in a script. They can be generated automatically...
Read more >How to change the default error message on custom form?
Solved: Can you please let me know how to change this error message on save to a customised one? or just hide ?...
Read more >Customizing a Default Error Message (Sun Identity Manager ...
The Identity Manager Service Provider's default error messages are located in the IDMXMessages.properties file. You can customize these default error messages ...
Read more >Error: Creating default object from empty value (laravel)
This is the error: enter image description here. This is My Controller: public function update(Request $request, $id) { $request->validate([ ...
Read more >MVC - Error Handling - How to create default custom error page
Simple example that shows how to create default error page where user will be redirected if unexpected error happensMore info with ready to ......
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
got the same issue. solve it by change the
"chart.js": "^2.9.4",
in your package.json then delete node modules folder, then in terminal runnpm install
.I was having the same issue, i fixed it going back to version “chart.js”: “^2.9.4” and keeping “react-chartjs-2”: “^2.11.1” @isailaoctavian