in src/barChart.ts [306:338]
constructor(options: VisualConstructorOptions) {
this.host = options.host;
this.element = options.element;
this.selectionManager = options.host.createSelectionManager();
this.locale = options.host.locale;
this.selectionManager.registerOnSelectCallback(() => {
this.syncSelectionState(this.barSelection, <ISelectionId[]>this.selectionManager.getSelectionIds());
});
this.tooltipServiceWrapper = createTooltipServiceWrapper(this.host.tooltipService, options.element);
this.svg = d3Select(options.element)
.append('svg')
.classed('barChart', true);
this.barContainer = this.svg
.append('g')
.classed('barContainer', true);
this.xAxis = this.svg
.append('g')
.classed('xAxis', true);
this.initAverageLine();
const helpLinkElement: Element = this.createHelpLinkElement();
options.element.appendChild(helpLinkElement);
this.helpLinkElement = d3Select(helpLinkElement);
this.handleContextMenu();
}