Skip to content

Commit

Permalink
fix: refresh baseline reference if series removed
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase committed Dec 2, 2024
1 parent b3b0d38 commit 758d62b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,14 @@ export class TimeseriesChartComponent implements OnInit, OnDestroy {
const allPointsData: { point: {}, state: models.timeseriesChartItemState }[] = Object.keys(chartStates).map(
wkt => ({ point: cache[wkt], state: chartStates[wkt] })
);
if(this.baseData) {
const missingBaseSeries = Object.keys(chartStates).findIndex(
wkt => {return chartStates[wkt].seriesNumber === this.baseData.seriesNumber});
console.log(missingBaseSeries)
if(missingBaseSeries === -1) {
this.baseData = null;
}
}
this.data = allPointsData;
this.formulaOverflow = this.isOverflowing();
this.initChart(this.data)
Expand Down

0 comments on commit 758d62b

Please sign in to comment.