|
|
|
@ -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,10 +91,13 @@ export class LinePod extends ChartwerkPod<LineTimeSerie, LineOptions> {
|
|
|
|
|
this._renderDots([data[idx]], idx); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.renderXAxis(); |
|
|
|
|
this.renderYAxis(); |
|
|
|
|
this.renderGrid(); |
|
|
|
|
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 { |
|
|
|
|