|
|
|
@ -65,8 +65,7 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
|
|
|
|
|
.y(d => this.yScale(d[1])); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public appendData(data: [number, number][]): void { |
|
|
|
|
|
|
|
|
|
public appendData(data: [number, number][], shouldRerender = true): void { |
|
|
|
|
for(let idx = 0; idx < this.series.length; ++idx) { |
|
|
|
|
if(this.series[idx].visible === false) { |
|
|
|
|
continue; |
|
|
|
@ -92,11 +91,14 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
|
|
|
|
|
this._renderDots([data[idx]], idx); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(shouldRerender) { |
|
|
|
|
const rightBorder = _.last(data)[0]; |
|
|
|
|
this.state.xValueRange = [this.state.getMinValueX(), rightBorder]; |
|
|
|
|
this.renderXAxis(); |
|
|
|
|
this.renderYAxis(); |
|
|
|
|
this.renderGrid(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_renderDots(datapoints: number[][], serieIdx: number): void { |
|
|
|
|
this.metricContainer.selectAll(null) |
|
|
|
|