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

Histogram: Fix 'combine' option & legend rendering #84026

Merged
merged 3 commits into from Mar 6, 2024

Conversation

leeoniya
Copy link
Contributor

@leeoniya leeoniya commented Mar 6, 2024

we currently reuse PlotLegend in Histogram panel, which expects field.state.origin that maps back to original frame, otherwise it renders no series. bizarrely, it causes VizLayout to not call its render prop, and does not render the viz at all. even more strange is that a null legend does not cause the viz rendering failure.

repro steps are easy:

  1. make a new histogram panel with testdata data source
  2. bump the series count to 3
  3. toggle the combine option in panel edit

without this PR the panel renders nothing due to PlotLegend having no items.

@leeoniya leeoniya self-assigned this Mar 6, 2024
@leeoniya leeoniya requested a review from a team as a code owner March 6, 2024 18:10
@leeoniya leeoniya requested review from Develer and removed request for a team March 6, 2024 18:10
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.0.x milestone Mar 6, 2024
@leeoniya leeoniya added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Mar 6, 2024
@leeoniya leeoniya enabled auto-merge (squash) March 6, 2024 18:16
Copy link
Contributor

@nmarrs nmarrs left a comment

Choose a reason for hiding this comment

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

Confirmed fix locally, nice! 🍅

@leeoniya leeoniya merged commit 8b9bc9a into main Mar 6, 2024
18 checks passed
@leeoniya leeoniya deleted the leeoniya/histogram-combine-fix branch March 6, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend area/legend area/panel/histogram no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants