private buildTimeScale()

in packages/timebrush/src/TimeBrush.ts [309:342]


    private buildTimeScale() {
        this.svg = d3.select(this.element[0]).append("svg");

        this.defs = this.svg.append("defs");
        this.clip = this.defs.append("clipPath")
            .attr("id", "clip")
            .append("rect");

        this.context = this.svg.append("g")
            .attr("class", "context");

        this.legend = this.svg.append("g")
            .attr("class", "legend");

        this.yAxis = this.context.append("g")
            .attr("class", "y axis");

        this.bars = this.context.append("g")
            .attr("class", "bars");

        this.xAxis = this.context.append("g")
            .attr("class", "x axis");

        this.yOrigin = this.context.append("line")
            .attr("class", "y-origin-line");

        const brushed = debounce(() => {
            const dateRange: any[] = this.brush.empty() ? [] : this.brush.extent();
            this._range = <any>dateRange;
            this.events.raiseEvent("rangeSelected", dateRange);
        }, DEBOUNCE_TIME);

        this.brush = d3.svg.brush().on("brush", brushed);
    }