Skip to content

Conversation

@abelyakin
Copy link
Contributor

Description

Summary
Implemented series sorting functionality for the Status History panel to group series with the same name together, improving data visualization clarity.

Problem
When displaying multiple series with identical names (e.g., "kafka-1") from different Prometheus queries in the Status History panel, the series were displayed in random order, making it difficult to visually correlate related data points.

Solution
Added sorting configuration option to the Status History panel schema with "asc" | "desc" values
Implemented series sorting logic to group series by name alphabetically
Series with the same name from different queries are now displayed consecutively

Screenshots

2025-07-14_12-29

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.

@abelyakin abelyakin force-pushed the status-history-sorting branch 3 times, most recently from 64b17b6 to 4705252 Compare July 14, 2025 14:26
Signed-off-by: Alexander Belyakin <21216343+abelyakin@users.noreply.github.com>
@abelyakin abelyakin force-pushed the status-history-sorting branch from 4705252 to a1e5811 Compare July 14, 2025 14:30
@jgbernalp
Copy link
Contributor

@abelyakin mind resolving the conflicts so we can merge this?, thnx. Again sorry for the delay on the response.

@abelyakin abelyakin requested review from shahrokni and removed request for a team January 14, 2026 08:55
@abelyakin abelyakin force-pushed the status-history-sorting branch from bc6c3a6 to b1e417f Compare January 14, 2026 09:00
Signed-off-by: Alexander Belyakin <21216343+abelyakin@users.noreply.github.com>
@abelyakin
Copy link
Contributor Author

@jgbernalp sorry fro delay. updated PR.


kind: "StatusHistoryChart"
spec: {
sorting: "asc"
Copy link
Contributor

Choose a reason for hiding this comment

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

is the sorting option available in grafana in some way? or is not and we default to "asc"

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIS there's no equivalent on Grafana side

Copy link
Contributor Author

Choose a reason for hiding this comment

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

grafana doesn't have such option but it looks like it sorts series by default under the hood.

value={value.legend}
onChange={handleLegendChange}
/>
<SortSelector value={value.sorting} onChange={handleSortChange} />
Copy link
Contributor

Choose a reason for hiding this comment

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

It currently looks like the new control belongs to the Legend category, while it doesnt

image

Could you add a split by having a "Visual" header like we have in other cases e.g here:

image

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice idea! moved to separate group

Signed-off-by: Alexander Belyakin <21216343+abelyakin@users.noreply.github.com>
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.

3 participants