Skip to content
New issue

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

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

Already on GitHub? # to your account

49 heatmap mitigator name v2 #64

Merged
merged 6 commits into from
Oct 8, 2024
Merged

Conversation

craig-parylo
Copy link
Contributor

Closes #49

Changes:

  • Adds checkbox-controlled mitigator name / code in the heatmap plot
  • Displays values with percentage formatting in the geom_tiles()
  • Lots of logic to optimise x- and y- axes (see below)

x-axis optimisation:

  • Mitigator names are string-wrapped at approx. half the maximum string length - as recommended in issue Show the mitigator name in heatmaps #49 to reduce increase space for the geom_tiles()
  • Legend moved to bottom of plot to increase available horizontal space
  • Scheme names (x-axes) have conditional displays - fewer than 6 schemes and the names are displayed horizontally with string wrap at 20 characters | between 6 and 11 names and they are displayed at 45 degrees with no wrap | 12 or more scheme names and they are rotated at 90 degrees to fit more on the screen
    image

y-axis optimisation:

  • vertical scrolling enabled by setting plot height to prevent ggplot from resizing to fit available space. (fits issue Consider scrollability in cards #51 )
  • plot height is determined on a pro-rata height for each mitigator displayed plus a base height defined by how much the scheme names are rotated
  • dynamic plot height enabled by reactiveValues object and additional observers to monitor state of selections

image

…lot heatmap plot as well as observers to calculate size of the plot and an updated call to plot with the height argument
… names on the x-axis based on how many are to be shown
@craig-parylo craig-parylo requested a review from matt-dray October 4, 2024 20:24
@craig-parylo craig-parylo self-assigned this Oct 4, 2024
…er to track mitigators when toggling names on / off in the heatmap plot
Copy link
Contributor

@matt-dray matt-dray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, thank you for this! These are well thought-out features.

Your dynamic scheme-name labelling solution is a great compromise. I've added a small techdebt issue in #66 to worry about later.

I've also added #65 for us to think about consistency of presentation. I think percentage is the more intuitive choice, as you've used here.

One small thing before approval: can you add a title for the heatmap legend (perhaps my fault for not including one in the first place!)? '80% Prediction Interval' like in the pointrange plot, but we may need to be more descriptive when #10 is completed.

Happy to chat more about these.

@craig-parylo craig-parylo requested a review from matt-dray October 8, 2024 06:59
Copy link
Contributor

@matt-dray matt-dray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@craig-parylo craig-parylo merged commit 2bcd459 into main Oct 8, 2024
@craig-parylo craig-parylo deleted the 49_heatmap_mitigator_name_v2 branch October 8, 2024 07:43
@matt-dray matt-dray added this to the v0.3.0 milestone Nov 11, 2024
@matt-dray matt-dray added enhancement New feature or request should MoSCoW priority labels Nov 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request should MoSCoW priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show the mitigator name in heatmaps
2 participants