Chart getVisibleSeries errors

Hi,

Since we migrated to Syncfusion Angular v25, we started receiving background errors with <ejs-charts, and when they happen, there are a lot of them.


The error is as outlined below:

TypeError
:Cannot read properties ofundefined(reading 'length')
    at Chart.getVisibleSeries (ej2-charts.es5.js:13824:80)
    at Chart.onPropertyChanged (ej2-charts.es5.js:14045:45)
    at Base.dataBind (ej2-base.es5.js:5440:18)
    at Component.dataBind (ej2-base.es5.js:7531:35)
    at Base.setProperties (ej2-base.es5.js:5386:18)
    at ComponentBase.ngAfterContentChecked (component-base.js:312:46)
    at ChartComponent.ngAfterContentChecked (syncfusion-ej2-angular-charts.mjs:1169:22)
    at callHook (core.mjs:2508:18)
    at callHooks (core.mjs:2467:17)
    at executeCheckHooks (core.mjs:2399:5)

We are using @syncfusion/ej2-angular-charts@25.2.6

Has any of you experienced this before?

Thank you!


1 Reply

SB Swetha Babu Syncfusion Team September 2, 2024 09:59 AM UTC

Hi Simon,


Greetings from Syncfusion.


We have created an angular application to replicate the reported scenario. But we are unable to replicate the same. We have rendered the line series and on button click, we have changed the color of the series to replicate the reported scenario. Please find the below tested sample link for your reference.


Sample link: https://stackblitz.com/edit/angular-gtfrgn-zpp6fu?file=src%2Fapp.component.html


Code Snippet:


public changeColor() {

        this.chart.series[0].fill = "red";

    }

 


Screenshot:


Before Update:

Image_9849_1725271101159


After Update:


Image_9148_1725271156798


Please let us know whether you are customizing the series. If so, what customization is done? Please modify the above sample to replicate the same. It will be helpful for us to analyze further and assist you better.


Regards,

Swetha


Loader.
Up arrow icon