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

Model overview: use unique key to avoid heatmap color mismatch #1517

Merged
merged 6 commits into from
Jun 27, 2022

Conversation

romanlutz
Copy link
Contributor

Description

There's (what I suspect to be) a bug in highcharts that makes certain colors (like the one we use for N/A cells) stay even when the underlying data of the heatmap changes. This was discovered by @tongyu-microsoft.

The solution is to make sure the key we pass is not reused so that we force highcharts to regenerate the entire heatmap. For that purpose, this PR uses a key consisting of the first letters of all cohorts and first letters of all selected metrics. If either of those dimensions of the heatmap change it should regenerate the heatmap. Theoretically, a collision of this primitive "hash function" is possible. It is rather unlikely, though, and seems to only matter if one of the cells has N/A content.

Checklist

  • I have added screenshots above for all UI changes.
  • I have added e2e tests for all UI changes.
  • Documentation was updated if it was needed.

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2022

Codecov Report

Merging #1517 (a439a75) into main (df1a7e2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1517   +/-   ##
=======================================
  Coverage   87.27%   87.27%           
=======================================
  Files         108      108           
  Lines        5108     5108           
=======================================
  Hits         4458     4458           
  Misses        650      650           
Flag Coverage Δ
unittests 87.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df1a7e2...a439a75. Read the comment docs.

1 similar comment
@romanlutz romanlutz enabled auto-merge (squash) June 27, 2022 16:29
@romanlutz romanlutz merged commit 6d2328b into main Jun 27, 2022
@romanlutz romanlutz deleted the romanlutz/add_new_cohorts_to_model_overview branch June 27, 2022 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants