apexcharts / ng-apexcharts

ng-apexcharts is an implementation of apexcharts for angular. It comes with one simple component that enables you to use apexcharts in an angular project.
MIT License
310 stars 78 forks source link

I am facing this issue recently when I resize the window the chart works properly or else its not working in angular #274

Open smitsonani77 opened 11 months ago

smitsonani77 commented 11 months ago
          I am facing this issue recently when I resize the window the chart works properly or else its not working in angular

Originally posted by @sujith-sairam in https://github.com/apexcharts/vue-apexcharts/issues/185#issuecomment-1632220316

marcioggs commented 10 months ago

This happened to me when I was updating the series variable content:

<eui-apex-chart
   [chart]="chart"
   [series]="series">
</eui-apex-chart>
series: ApexAxisChartSeries = [{ data: [] }];

loadChartSeries() {
   this.series[0].data = [/* some data */];
}

It works well if I replace series instead:

series: ApexAxisChartSeries = [];

loadChartSeries() {
   this.series= [{ data: [/* some data */] }];
}

Probably related to how the component expects new values via ngOnChanges.