Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.chart.series.clear();
this.chart.series.add(series1);
this.chart.series.add(series2);
} else if (seriesType === "Line") {
const series1 = new IgxLineSeriesComponent();
series1.name = "series1";
series1.markerType = MarkerType.Circle;
series1.valueMemberPath = "USA";
series1.title = "USA";
series1.xAxis = this.xAxis;
series1.yAxis = this.yAxis;
series1.thickness = 2;
const series2 = new IgxLineSeriesComponent();
series1.name = "series1";
series2.markerType = MarkerType.Circle;
series2.valueMemberPath = "RUS";
series2.title = "Russia";
series2.xAxis = this.xAxis;
series2.yAxis = this.yAxis;
series2.thickness = 2;
this.chart.series.clear();
this.chart.series.add(series1);
this.chart.series.add(series2);
} else if (seriesType === "Point") {
const series1 = new IgxPointSeriesComponent();
series1.name = "series1";
series1.yAxis = this.yAxis;
const series2 = new IgxColumnSeriesComponent();
series2.name = "series2";
series2.valueMemberPath = "RUS";
series2.title = "Russia";
series2.xAxis = this.xAxis;
series2.yAxis = this.yAxis;
this.chart.series.clear();
this.chart.series.add(series1);
this.chart.series.add(series2);
} else if (seriesType === "Line") {
const series1 = new IgxLineSeriesComponent();
series1.name = "series1";
series1.markerType = MarkerType.Circle;
series1.valueMemberPath = "USA";
series1.title = "USA";
series1.xAxis = this.xAxis;
series1.yAxis = this.yAxis;
series1.thickness = 2;
const series2 = new IgxLineSeriesComponent();
series1.name = "series1";
series2.markerType = MarkerType.Circle;
series2.valueMemberPath = "RUS";
series2.title = "Russia";
series2.xAxis = this.xAxis;
series2.yAxis = this.yAxis;
series2.thickness = 2;