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
330 stars 81 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 1 year ago

smitsonani77 commented 1 year 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 1 year 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.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.