An error message was encountered as follows:
ERROR TypeError: Cannot read property '15' of undefined
at ChartElement.getPixelForValue (Chart.js:14599)
at ChartElement.updateElement (Chart.js:5930)
at ChartElement.addElementAndReset (Chart.js:3781)
at ChartElement.insertElements (Chart.js:4068)
at ChartElement.resyncElements (Chart.js:4059)
at ChartElement.buildOrUpdateElements (Chart.js:3806)
at Chart.update (Chart.js:9630)
This issue arises when executing chart.update()
on an Angular 8 ChartJS chart. It occurs under specific conditions and interestingly, prior to chart.update()
, the chart
variable appears normal without any errors.
Any thoughts on what might be causing the property '15'
error and how I could begin debugging this problem?
UPDATE:
I am able to replicate the error with property '0'
through property '5'
, indicating that it is not isolated to property '15'
but still within the same function.