Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Scenario trends chart point not clickable when page loaded anonymously #413

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/app/scenario/scenario.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="items-overview content-container">
<div class="container-fluid">

<app-scenario-trends [params]="params"></app-scenario-trends>
<app-scenario-trends [params]="params" [isAnonymous]="isAnonymous"></app-scenario-trends>

<div class="row rr" *ngIf="!isAnonymous">
<div class="col" *ngIf="items$ | async; let items">
Expand Down
Loading