Home › Forums › Chart Support › Synchronized charts Angular › Reply To: Synchronized charts Angular
In the code sample that you have shared, syncHandler() is being called using regular functions, for which this keyword will represent the object that called the function, which is chart object in your case. As chart object doesn’t have the definition for charts it is being shown as undefined. Using arrow function to call syncHandler method should work fine in your case as this keyword refers to class AppComponent on using arrow function. Please refer to this tutorial for more information on the same. Also kindly check this StackBlitz demo for updated code.