Skip to content

[BUGFIX] StatChart: wrap multi-series stats in multiple columns - #814

Open
colivi wants to merge 2 commits into
perses:mainfrom
colivi:feat/statchart-multi-series-two-col
Open

colivi wants to merge 2 commits into
perses:mainfrom
colivi:feat/statchart-multi-series-two-col

Conversation

@colivi

@colivi colivi commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Relates to perses/perses#4382

Description

Multi-value StatCharts laid all series on one horizontal row (overflow scroll).

Maximizes space wrt number of elements to fill so panels that have multiple sub-panels to display stay readable.

Screenshots

N/A until deployed on Argos; change is layout-only in "StatChartPanel.tsx".

Checklist

  • "[FEATURE]" title
  • DCO signoff

@colivi
colivi requested a review from a team as a code owner September 12, 2026 12:33
@colivi
colivi requested review from Gladorme and removed request for a team September 12, 2026 12:33
@colivi
colivi force-pushed the feat/statchart-multi-series-two-col branch from 4c4a804 to 1e02ef9 Compare September 12, 2026 12:35
@colivi colivi changed the title fix(statchart): wrap multi-series stats in two columns [BUGFIX](statchart): wrap multi-series stats in two columns Sep 12, 2026
@colivi
colivi force-pushed the feat/statchart-multi-series-two-col branch from af4ec03 to a22e99c Compare September 12, 2026 12:44
@shahrokni
shahrokni self-requested a review September 14, 2026 08:50
@colivi colivi changed the title [BUGFIX](statchart): wrap multi-series stats in two columns [BUGFIX](statchart): wrap multi-series stats in multiple columns Sep 14, 2026
@AntoineThebaud AntoineThebaud changed the title [BUGFIX](statchart): wrap multi-series stats in multiple columns [BUGFIX] StatChart: wrap multi-series stats in multiple columns Sep 14, 2026
@colivi
colivi force-pushed the feat/statchart-multi-series-two-col branch from 0652b65 to 1f274ba Compare September 15, 2026 08:25
Keep a single row when cells stay wide enough. Otherwise wrap into a
near-square grid (column count from series count and available width)
so many values use the panel efficiently without tiny one-row cells.

Add unit tests for multiSeriesLayout. Flatten nested ternaries for oxlint.

Signed-off-by: colivi <charles.olivi@gmail.com>
@colivi
colivi force-pushed the feat/statchart-multi-series-two-col branch from 1f274ba to d75e16f Compare September 15, 2026 08:26

@shahrokni shahrokni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️
Please hold this one.
We have already a PR from another contributor being reviewed and is in final stage.

@colivi

colivi commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Hi @shahrokni,

OK we’ll hold #814 in favor of #812 for the moment.

When orientation is auto, does the layout wrap into multiple rows based on panel width and the number of series (keeping each tile at least a minimum readable width)?

=> That’s the behavior we need for dense multi-series stats.

We’ll re-test Argos multi-series stats after merge and if gaps remain we will open a follow-up.
Thanks

@shahrokni

Copy link
Copy Markdown
Contributor

Hi @shahrokni,

OK we’ll hold #814 in favor of #812 for the moment.

When orientation is auto, does the layout wrap into multiple rows based on panel width and the number of series (keeping each tile at least a minimum readable width)?

=> That’s the behavior we need for dense multi-series stats.

We’ll re-test Argos multi-series stats after merge and if gaps remain we will open a follow-up. Thanks

You can take a look at this output.
The very first one (in the screenshot) shows your requirement I think. If not, let me know

When orientation is auto, does the layout wrap into multiple rows based on panel width and the number of series (keeping each tile at least a minimum readable width)?

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