score:9
Which version of chart.js are you running because if you reinstalled it its a high chance you are running version 3 of the lib which is at the moment still not compatible with the wrapper so you will have to install the latest version 2 release of chart.js (2.9.4)
score:-1
First
npm uninstall react-chartjs
then
npm i react-chartjs-2@2.9.0
score:3
Yes, thanks now this solution also work for me,
I was using chart.js with a version of >3.x
then I have downgrade the version to 2.9.4 then it worked for me.
Yarn Command
yarn add react-chartjs-2
yarn add chart.js@2.9.4
Source: stackoverflow.com
Related Query
- TypeError: Cannot read property 'defaults' of undefined when using the react wrapper of chartjs
- Cannot read property 'length' of undefined for ChartJS when I use it inside React
- Getting "Uncaught TypeError: Cannot read properties of undefined (reading 'map')" when using Chartjs inside react axios method
- Cannot read property 'map' of undefined when looking at an array with no index
- js error: while trying to display graph using chart.js: Uncaught TypeError: Cannot read property 'call' of undefined
- I'm getting the error "TypeError: Cannot read property 'extend' of undefined" when trying to import chartjs-plugin-datalabels
- Chart Js Cannot read property 'length' of undefined
- Uncaught TypeError: Cannot read property 'offsetWidth' of undefined - chart.js
- Chartjs cannot read property datasets of undefined
- Cannot read property 'labels' of undefined
- Chart.js Cannot read property 'fontSize' of undefined
- TypeError: Cannot read property 'legend' of undefined | Angular + ng2-charts
- ChartJS: Uncaught TypeError: Cannot read property 'call' of undefined
- Uncaught TypeError: Cannot read property 'draw' of undefined
- Ionic/Chart.js - Cannot read property 'nativeElement' of undefined
- chartjs - multi axis line chart - cannot read property 'min' of undefined
- Updating Chart.js with JSON, cannot read property 'length' of undefined
- chartjs & asp.net: Cannot read property 'labels' of undefined
- Angular / ng2-charts: Fetching json data in chart object showing: Cannot read property 'length' of undefined
- Uncaught TypeError: Cannot read property 'draw' of undefined : Angular chart js
- Cannot read property 'reactiveProp' of undefined in vue-chartjs
- react-chartjs integration error. Cannot read property 'xLabels' of undefined
- Chartjs + Vue.js - Cannot read property '_meta' of undefined
- chartjs; cannot read property '0' of undefined
- Chart.js Cannot read property 'apply' of undefined
- Chart JS Error : Uncaught TypeError: Cannot read property 'top' of undefined
- react-chartjs error Cannot read property 'Chart' of undefined
- Uncaught TypeError: Cannot read property 'draw' of undefined for object scale
- ERROR TypeError: Cannot read property 'testMethod' of undefined
- Uncaught (in promise) TypeError: Cannot read property 'length' of undefined in chartjs with Vuejs
More Query from same tag
- How can i add min and max range horizontal line in angular-chart.js
- Chart js old chart data not clearing
- Chart.js with JSON data error
- How to use chart.js script to draw multiple pie Charts
- Chart.js Cannot read property 'fontSize' of undefined
- chart.js - Second bar, with another label and different colors
- how to change color of dots in graph using chart.js
- Using Chart.js with angular and systemjs: "Chart is not defined"
- chart js with angular2 loading dynamic data only after zoomin
- charts.js stacked bar with polymer's wrapper chart-elements
- Hover/click area in filled line chart in chart.js
- inject a bar chart into a webpage via content script
- Adding data to line chart using addData() method in Chart.js
- Different labels needed for second line graph, chart js
- I need help on Optimization of Laravel Controller
- chart js download to png with canvas.toDataURL() not working in IE and firefox
- ChartJS scale ticks with scatter plot
- How to Update 2 dataset for 2 lines in a CharJS line graph?
- Chartjs 3.5.0 - Radar Chart - Converting the labels to images
- Custom tooltip styling in Chart.js
- ChartJS Pie Chart How default just show 2 legend datas
- chart.js draw custom grid lines
- Charts.Js with Asp.Net Webforms Does Not Work
- Chart.js group data by month\year
- Levels is overlapping in angular-chart.js
- get yLabel value onclick chart js
- chart.js stacked graph that overlaps
- zoom and pan on charts in angular
- Why is here a number?
- chart annotations not showing in Angular 2