Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Chart selection: timeframe in the overlay is not updated #608

Closed
GustavAT opened this issue Feb 17, 2020 · 1 comment · Fixed by #610
Closed

Chart selection: timeframe in the overlay is not updated #608

GustavAT opened this issue Feb 17, 2020 · 1 comment · Fixed by #610
Assignees
Labels
bug A broken behaviour that was working previously has-pr P3 Important issue that needs to be resolved

Comments

@GustavAT
Copy link

Bug Report

Expected Behavior

After setting the chart selection programatically, the timeframe in the selection overlay should be updated accordingly.

Current Behavior

If having an existing selection and setting the selection programatically through the value property, the timeframe in the selection overlay still has the old value.

The value gets updated after hovering the chart.

Steps to Reproduce

  1. Select any range in the chart (i.e. by hand)
  2. Set the selection programatically to some other value

You can paste the following snippets to the chart-demo.component.

<button (click)="setTimeframe()">set timeframe</button>
setTimeframe(): void {
  this.lastTimeframe = [
    this.lastTimeframe[0] - 100_000,
    this.lastTimeframe[1] + 100_000,
   ];
   this.dtChartRange.value = this.lastTimeframe;
}

Context (Environment)

We have to add the selection based on some filters after loading data. This should override a selection done by previously by the user.

Used Versions:

  • node: 12.4.0
  • npm: 6.13.7
  • typescript: 3.4.3
  • angular: 8.0.0
  • @angular/cdk: 8.0.0
  • @dynatrace/barista-components: 5.2.0

Attachments

selection-overlay-not-updated

@GustavAT GustavAT added the bug A broken behaviour that was working previously label Feb 17, 2020
@tomheller tomheller added the P3 Important issue that needs to be resolved label Feb 17, 2020
@tomheller
Copy link
Collaborator

tomheller commented Feb 17, 2020

@GustavAT, thank you for reporting this one.
Bug is reproducable in our dev application and demos application.
After an initial investigation, it seems that the change detection does not trigger on the overlay. ChangeDetection seems to be disconnected from the ranges.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A broken behaviour that was working previously has-pr P3 Important issue that needs to be resolved
Projects
None yet
2 participants