Skip to content

Conversation

nmdefries
Copy link
Collaborator

@nmdefries nmdefries commented Dec 1, 2021

Description

Move legend title suppression and plot height to plotly::layout section to make sure the settings are applied correctly.

theme(legend.title = element_blank()) in calls to ggplot should prevent the legend from being labelled, but after converting to a plotly plot using ggplotly, the legend titles reappear and, for the score plot, are doubled. This seems to be related to a package update, although I haven't been able to reproduce the working version. For example, the public dashboard running off of a 2-month old build displays correctly, but a new build off of main exhibits the problem.

Since plotly has a history of incorrectly displaying ggplot settings, just put legend title suppression into plotly settings directly.

Closes #209.

Changes

  • server.R: Set plot height and legend.title in plotly::layout.

@nmdefries nmdefries requested a review from krivard December 1, 2021 22:05
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

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

seems legit

@nmdefries nmdefries merged commit 2af3a3c into add-template-refactor-back-plus-patches Dec 2, 2021
@nmdefries nmdefries deleted the fix-legend-labels branch December 2, 2021 17:08
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.

2 participants