constructor()

in src/visual.ts [194:244]


    constructor(options: VisualConstructorOptions) {
        this.visualHost = options.host;

        this.events = options.host.eventService;

        this.localizationManager = this.visualHost.createLocalizationManager();

        this.interactivityService = createInteractivitySelectionService(this.visualHost);
        this.behavior = HistogramBehavior.CREATE();

        this.colorHelper = new ColorHelper(this.visualHost.colorPalette);

        this.tooltipServiceWrapper = createTooltipServiceWrapper(
            options.host.tooltipService,
            options.element
        );

        this.root = d3.select(options.element)
            .append("svg")
            .classed(Visual.ClassName, true);

        this.clearCatcher = appendClearCatcher(this.root);

        this.main = this.root.append("g");

        this.columns = this.main
            .append("g")
            .classed(Visual.Columns.className, true);

        this.axes = this.main
            .append("g")
            .classed(Visual.Axes.className, true);

        this.axisX = this.axes
            .append("g")
            .classed(Visual.Axis.className, true)
            .classed(Visual.XAxis.className, true);

        this.axisY = this.axes
            .append("g")
            .classed(Visual.Axis.className, true)
            .classed(Visual.YAxis.className, true);

        this.legend = this.main
            .append("g")
            .classed(Visual.Legends.className, true);

        this.labelGraphicsContext = this.main
            .append("g")
            .classed(Visual.LabelGraphicsContext.className, true);
    }