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.add(series1);
this.chart.series.add(series2);
} else if (seriesType === "Line") {
const series1 = new IgxScatterLineSeriesComponent();
series1.name = "series1";
series1.title = "Rich Countries";
series1.markerType = MarkerType.Circle;
series1.dataSource = SampleScatterStats.getCountriesWithHighIncome();
series1.showDefaultTooltip = true;
series1.xMemberPath = "population";
series1.yMemberPath = "gdpTotal";
series1.xAxis = this.xAxis;
series1.yAxis = this.yAxis;
const series2 = new IgxScatterLineSeriesComponent();
series2.name = "series2";
series2.title = "Poor Countries";
series2.markerType = MarkerType.Circle;
series2.dataSource = SampleScatterStats.getCountriesWithLowIncome();
series2.showDefaultTooltip = true;
series2.xMemberPath = "population";
series2.yMemberPath = "gdpTotal";
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 === "Spline") {
const series1 = new IgxScatterSplineSeriesComponent();
series2.name = "series2";
series2.title = "Poor Countries";
series2.markerType = MarkerType.Circle;
series2.dataSource = SampleScatterStats.getCountriesWithLowIncome();
series2.showDefaultTooltip = true;
series2.xMemberPath = "population";
series2.yMemberPath = "gdpTotal";
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 IgxScatterLineSeriesComponent();
series1.name = "series1";
series1.title = "Rich Countries";
series1.markerType = MarkerType.Circle;
series1.dataSource = SampleScatterStats.getCountriesWithHighIncome();
series1.showDefaultTooltip = true;
series1.xMemberPath = "population";
series1.yMemberPath = "gdpTotal";
series1.xAxis = this.xAxis;
series1.yAxis = this.yAxis;
const series2 = new IgxScatterLineSeriesComponent();
series2.name = "series2";
series2.title = "Poor Countries";
series2.markerType = MarkerType.Circle;
series2.dataSource = SampleScatterStats.getCountriesWithLowIncome();
series2.showDefaultTooltip = true;