From 543bee6df6906e6909f41cba6fc43ce68a24a480 Mon Sep 17 00:00:00 2001 From: Ludek Novy <13610612+ludeknovy@users.noreply.github.com> Date: Wed, 11 Sep 2024 12:06:06 +0200 Subject: [PATCH] Add isAnonymous input to ScenarioTrendsComponent (#413) Extended ScenarioTrendsComponent to accept the isAnonymous input parameter. Adjusted the onPointSelect method to respect this isAnonymous flag, ensuring point selection handling changes based on anonymity. --- src/app/scenario/scenario-trends/scenario-trends.component.ts | 3 ++- src/app/scenario/scenario.component.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/scenario/scenario-trends/scenario-trends.component.ts b/src/app/scenario/scenario-trends/scenario-trends.component.ts index c844e7c..4cc383c 100644 --- a/src/app/scenario/scenario-trends/scenario-trends.component.ts +++ b/src/app/scenario/scenario-trends/scenario-trends.component.ts @@ -16,6 +16,7 @@ import { normalizeOverviewData } from "../../utils/normalizeOverviewData"; }) export class ScenarioTrendsComponent implements OnInit { @Input() params; + @Input() isAnonymous: boolean; Highcharts: typeof Highcharts = Highcharts; updateAggregatedScenarioTrendsChartFlag = false; updateLabelScenarioTrendsChartFlag = false; @@ -159,7 +160,7 @@ export class ScenarioTrendsComponent implements OnInit { } onPointSelect(event) { - if (event && event.point && event.point) { + if (event && event.point && !this.isAnonymous) { // Label series have item id amended to open correct detail, it's needed for a case when a labels do not match, eg: // label2 start at point 0, but label2 starts at point 1, it leads to off by N issues. // It's not needed for aggregated trend chart, as that is column chart and only one point can be clicked. diff --git a/src/app/scenario/scenario.component.html b/src/app/scenario/scenario.component.html index 2d1c575..13e1ddf 100644 --- a/src/app/scenario/scenario.component.html +++ b/src/app/scenario/scenario.component.html @@ -31,7 +31,7 @@
- +