Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private initializeChart() {
switch (this.chartType) {
case ChartType.Bar:
this.chart = bar();
this.chartSelector = '.bar-chart';
this.chartClickSelector = '.bar-chart .bar';
this.tooltipContainerSelector = '.bar-chart .metadata-group';
break;
case ChartType.Brush:
this.chart = brush();
this.chartSelector = '.brush-chart';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Bullet:
this.chart = bullet();
this.chartSelector = '.bullet-chart';
this.chartClickSelector = '.bullet-chart .range, .bullet-chart .measure, .bullet-chart .marker-line';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Donut:
this.chart = donut();
this.chartSelector = '.donut-chart';
this.chartClickSelector = '.donut-chart .arc';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.GroupedBar:
this.chart = groupedBar();
this.chartSelector = '.grouped-bar';
this.chartClickSelector = '.grouped-bar .bar';
this.tooltipContainerSelector = '.grouped-bar .metadata-group';
break;
ChartComponent.prototype.initializeChart = function () {
switch (this.chartType) {
case ChartType.Bar:
this.chart = bar();
this.chartSelector = '.bar-chart';
this.chartClickSelector = '.bar-chart .bar';
this.tooltipContainerSelector = '.bar-chart .metadata-group';
break;
case ChartType.Brush:
this.chart = brush();
this.chartSelector = '.brush-chart';
this.chartClickSelector = ''; // No click selector.
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Bullet:
this.chart = bullet();
this.chartSelector = '.bullet-chart';
this.chartClickSelector = '.bullet-chart .range, .bullet-chart .measure, .bullet-chart .marker-line';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.Donut:
this.chart = donut();
this.chartSelector = '.donut-chart';
this.chartClickSelector = '.donut-chart .arc';
this.tooltipContainerSelector = ''; // No tooltip selector.
break;
case ChartType.GroupedBar:
this.chart = groupedBar();
this.chartSelector = '.grouped-bar';
this.chartClickSelector = '.grouped-bar .bar';
this.tooltipContainerSelector = '.grouped-bar .metadata-group';
break;