[ENHANCEMENT] timeserieschart: add per-query stack override#670
Open
SoWieMarkus wants to merge 1 commit into
Open
[ENHANCEMENT] timeserieschart: add per-query stack override#670SoWieMarkus wants to merge 1 commit into
SoWieMarkus wants to merge 1 commit into
Conversation
Signed-off-by: Markus Wieland <markus.wieland@sap.com>
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
Adds a per-query
stackoverride to the Time Series Chart plugin, allowing individual queries to opt in or out of stacking regardless of the global visual stack setting. This mirrors the behavior of Grafana/Plutono, where stacking can be controlled at the series level.What changed:
stack?: boolfield toQuerySettingsOptionsin the model, CUE schema, and Go SDKStackSwitch in theQuerySettingsEditorgetTimeSeries()indata-transform.tsto prefer the per-querystackflag over the globalvisual.stack === 'all'when setgetCommonTimeScaleandgetTimeSeriesValuesimports from@perses-dev/componentsto@perses-dev/coreOpen question:
The drawing order of stacked series depends on the order queries are defined. This could be relevant now since time series can overlap. But if they are not stacked it's the same. So just a thought. A dedicated
zIndexfield inQuerySettingsOptionscould give explicit control over this - though it only matters at higher opacity values anyway.Also in Grafana / Plutono the Stacking Option is a boolean. I didn't want to adjust that since that would be a breaking change, but might also be something to consider.
Screenshots
Query 1 excluded from stacking.
Query 1 included again in stacking.
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes