Currently, I am using Angular 4.3.6 along with TypeScript 2.4.2 for my project. The issue that I am facing involves reading data from a socket and attempting to add it to the dataprovider.
I came across an example at:
While implementing a serial chart, queueing the data changes worked perfectly. However, when transitioning to a stock chart, an error occurred as follows:
ERROR TypeError: Cannot set property 'dataContext' of undefined
at b.parseStockData (amstock.js:formatted:232)
at b.updateData (amstock.js:formatted:145)
at b.afterWrite (amstock.js:formatted:91)
at b.write (amstock.js:formatted:52)
at b.validateNow (amstock.js:formatted:1143)
at index.js:335
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:392)
at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run (zone.js:142)
at NgZone.webpackJsonp.../../../core/@angular/core.es5.js.NgZone.runOutsideAngular (core.es5.js:3844)
at AmChartsService.webpackJsonp.../../../../@amcharts/amcharts3-angular/es2015/index.js.AmChartsService.updateChart (index.js:333)
The error specifically occurs in the updateChart function while parsing stock data. Here is the relevant section of my code where the issue arises:
[Your modified code here]