in src/visual.ts [178:221]
constructor(options: VisualConstructorOptions) {
if (window.location !== window.parent.location) {
require("core-js/stable");
}
this.events = options.host.eventService;
this.visualHost = options.host;
this.localizationManager = this.visualHost.createLocalizationManager();
this.tooltipServiceWrapper = createTooltipServiceWrapper(
this.visualHost.tooltipService,
options.element);
this.layout = new VisualLayout(null, {
top: 10,
right: 10,
bottom: 15,
left: 10
});
let svg: Selection<any> = this.svg = d3.select(options.element)
.append("svg")
.classed(AsterPlotVisualClassName, true)
.style("position", "absolute");
this.colorPalette = options.host.colorPalette;
this.colorHelper = new ColorHelper(this.colorPalette);
this.mainGroupElement = svg.append("g");
this.mainLabelsElement = svg.append("g");
this.behavior = new AsterPlotWebBehavior();
this.clearCatcher = appendClearCatcher(this.mainGroupElement);
this.slicesElement = this.mainGroupElement
.append("g")
.classed(AsterPlot.AsterSlices.className, true);
this.interactivityService = createInteractivitySelectionService(options.host);
this.legend = createLegend(
options.element,
options.host && false,
this.interactivityService,
true);
}