From eedb6a17d1ed38467ac875922a9b29f13dbdfe79 Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Sat, 30 Oct 2021 01:56:57 +0300 Subject: [PATCH] cut ovelaying labels #10 & move segments on panning #6 --- client/src/components/hastic_pod/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/components/hastic_pod/index.ts b/client/src/components/hastic_pod/index.ts index 1b3605d..931ba6c 100644 --- a/client/src/components/hastic_pod/index.ts +++ b/client/src/components/hastic_pod/index.ts @@ -23,6 +23,8 @@ export class HasticPod extends LinePod { private _labelBrush: boolean; private _deleteBrush: boolean; + protected segmentsContainer; + constructor( el: HTMLElement, udc: UpdateDataCallback, @@ -186,6 +188,9 @@ export class HasticPod extends LinePod { protected renderSegments() { const segments = this._segmentSet.getSegments(); + this.segmentsContainer = this.metricContainer + .append('g') + .attr('class', 'segmentsContainer') for (const s in segments) { this.renderSegment(segments[s]); } @@ -197,7 +202,7 @@ export class HasticPod extends LinePod { const w = this.xScale(segment.to) - x; const h = this.height - const r = this.chartContainer + const r = this.segmentsContainer .append('rect') .attr('x', x) .attr('y', y) @@ -210,6 +215,8 @@ export class HasticPod extends LinePod { private async _updateRange(range: AxisRange[]) { // in assumption that range have been changed + console.log('update range.....'); + console.log(range) this.fetchData(); }