public init()

in src/visual.ts [454:526]


    public init(options: VisualConstructorOptions) {
        this.visualInitOptions = options;
        this.visualHost = options.host;

        select("body").style(
            "-webkit-tap-highlight-color", "transparent"
        );

        this.rootElement = select(options.element)
            .append("div")
            .classed(MekkoChart.ClassName, true);

        this.behavior = new CustomVisualBehavior([new VisualBehavior()]);

        this.brush = brushX();
        this.yAxisOrientation = axisPosition.left;

        this.svg = this.rootElement
            .append("svg")
            .classed(MekkoChart.RootSvgSelector.className, true);

        this.axisGraphicsContext = this.svg
            .append("g")
            .classed(MekkoChart.AxisGraphicsContextClassName, true);

        this.svgScrollable = this.svg
            .append("svg")
            .classed(MekkoChart.SvgScrollableSelector.className, true);

        this.axisGraphicsContextScrollable = this.svgScrollable
            .append("g")
            .classed(MekkoChart.AxisGraphicsContextClassName, true);

        this.labelGraphicsContextScrollable = this.svgScrollable
            .append("g")
            .classed(MekkoChart.LabelGraphicsContextClass.className, true);

        this.clearCatcher = appendClearCatcher(this.axisGraphicsContextScrollable);

        this.xAxisGraphicsContext = this.axisGraphicsContext
            .append("g")
            .classed(MekkoChart.XAxisSelector.className, true);

        this.y1AxisGraphicsContext = this.axisGraphicsContextScrollable
            .append("g")
            .classed(MekkoChart.YAxisSelector.className, true);

        this.y2AxisGraphicsContext = this.axisGraphicsContextScrollable
            .append("g")
            .classed(MekkoChart.YAxisSelector.className, true);

        this.xAxisGraphicsContext
            .classed(MekkoChart.ShowLinesOnAxisSelector.className, true)
            .classed(MekkoChart.HideLinesOnAxisSelector.className, false);

        this.y1AxisGraphicsContext
            .classed(MekkoChart.ShowLinesOnAxisSelector.className, true)
            .classed(MekkoChart.HideLinesOnAxisSelector.className, false);

        this.y2AxisGraphicsContext
            .classed(MekkoChart.ShowLinesOnAxisSelector.className, true)
            .classed(MekkoChart.HideLinesOnAxisSelector.className, false);

        this.interactivityService = createInteractivityService(this.visualHost);

        let legendParent = select(this.rootElement.node()).append("div").classed("legendParentDefault", true);

        this.legend = createLegend(
            <HTMLElement>legendParent.node(),
            false,
            this.interactivityService,
            true);
    }