Using ASPNet Core EJ2 Charts
We are adding a second Line series dynamically using this javascript
function addLineSeries(seriesData, axisLabel) {
var chart = document.getElementById("chart").ej2_instances[0];
chart.removeSeries(1);
chart.addAxes([{
name: 'secondAxis',
title: axisLabel,
opposedPosition: true
}]);
chart.addSeries([{
type: 'Line',
dataSource: seriesData,
xName: 'Date',
yName: 'Value',
yAxisName: "secondAxis",
marker: {
visible: true,
height: 10,
width: 10
}
}]);
}
The second series gets added fine as does the Y Axis, however if we call it a second time for a different data set we need to remove the previous dynamic series using chart.removeSeries(1); that works but we are unable to remove the dynamically added second Y Axis.
How do we remove the second Y Axis?
Where is the documentation for the EJ2 client side library?
Thanks