[ENHANCEMENT] - Added auto/custom legend sizing on multi-series stat panels - #778
Open
christophrichtersap wants to merge 2 commits into
Open
[ENHANCEMENT] - Added auto/custom legend sizing on multi-series stat panels#778christophrichtersap wants to merge 2 commits into
christophrichtersap wants to merge 2 commits into
Conversation
christophrichtersap
requested review from
jgbernalp
and removed request for
a team
August 24, 2026 11:43
christophrichtersap
force-pushed
the
main
branch
from
August 24, 2026 11:55
9b4d797 to
d5e9ffd
Compare
christophrichtersap
marked this pull request as draft
August 24, 2026 12:14
christophrichtersap
marked this pull request as ready for review
August 24, 2026 12:33
Contributor
|
@christophrichtersap can you please sign your commits? |
…panels - Cells auto-size to fit full series names (no truncation) - Thin scrollbar appears on hover when content overflows - Consistent font sizing across multi-series panels - Add measureTextWidth utility for pixel-accurate layout - Add "Font Size" control under Legend settings with auto default - Fix formatValue import to use @perses-dev/core - Use || instead of ?? after Number() to satisfy oxlint - Fix oxfmt formatting (trailing commas, import order) - Revert imports to match upstream packages Signed-off-by: christophrichtersap <christoph.richter@sap.com>
christophrichtersap
force-pushed
the
main
branch
from
August 25, 2026 21:13
4990d81 to
700d61d
Compare
Contributor
Author
Ty for checking..done. |
jgbernalp
reviewed
Aug 26, 2026
| sparkline?: LineSeriesOption; | ||
| showSeriesName?: boolean; | ||
| valueFontSize?: FontSizeOption; | ||
| legendFontSize?: FontSizeOption; |
Contributor
There was a problem hiding this comment.
In order to persist this information, we need to add these fields to the cue schema. Otherwise they wont be stored in the plugin spec.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes perses/perses#3519
In multi-series stat panels, values rendered with different font sizes and legends appeared at inconsistent heights.
This PR picks the widest value (measured via Canvas) as the sizing reference for all cells same approach Grafana uses. Also unifies legend font sizing across cells and enforces a 12px minimum so labels stay readable
Allows default size or selecting custom px.
Single-series panels are unaffected.
Screenshots
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes