So I'm using a polar chart and it works great except if the user sets something where the series decreases in categories. e.g.
Series = [
{
points: [{x: 'Calving', y: null}]
},
{
points: [{x: 'Wellness', y: null}]
},
{
points: [{x: 'Type', y: null}]
}
]
Series = [
{
points: [{x: 'Wellness', y: null}]
},
{
points: [{x: 'Type', y: null}]
}
]
I get an error saying that "Cannot read property 'dataSource' of undefined". I'm relatively sure it's iterating over the old array to look for changes, only problem being the array is now smaller.
Html looks like this
<ej-chart #chart *ngIf="chartData.length > 0"
[series]="chartData"
class="polar-chart"
[primaryXAxis]="primaryXAxis"
[commonSeriesOptions]="commonSeriesOptions"
[primaryYAxis]="primaryYAxis"></ej-chart>
Then after some manipulation of chartData I call this.chart.widget.redraw();
Works great with new points and with changes to existing points, reducing points seems to be the issue