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
datatrails: synchronize the range of the y axis for all breakdown panels #84781
Conversation
11ba953
to
f8201bb
Compare
c8b2775
to
39aa817
Compare
const vizPanel = PanelBuilders.timeseries() | ||
.setTitle(option.label!) | ||
.setData( | ||
new SceneQueryRunner({ | ||
maxDataPoints: 300, | ||
datasource: trailDS, | ||
queries: [ | ||
{ | ||
refId: 'A', | ||
expr: expr, | ||
legendFormat: `{{${option.label}}}`, | ||
}, | ||
], | ||
}) | ||
) | ||
.setHeaderActions(new SelectLabelAction({ labelName: String(option.value) })) | ||
.setUnit(unit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is extrapolated out into a vizPanel
reference so we can change the options.
Due to the ambiguous type, we must us onOptionsChange
in an activation handler.
// By including the specific refIds, the BreakdownScene can | ||
// compare refIds to find a match |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this isn't necessary, now that I've removed the code that determines min and max from the main vizPanel queries.
if (breakdownData.type !== FieldType.number) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should also ensure units match? or is this guaranteed?
prolly dont want latency on Y min/maxed with bytes on Y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Units are guaranteed to match. Each panel gets the same query with a slightly different label filter.
@@ -78,7 +69,7 @@ function percentileQuery(percentile: number, groupings: string[] = []) { | |||
const percent = percentile / 100; | |||
|
|||
return { | |||
refId: 'A', | |||
refId: `Percentile${percentile}`, | |||
expr: `histogram_quantile(${percent}, ${baseQuery(groupings)})`, | |||
legendFormat: `${percentile}th Percentile`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really hope this function is never used with a number that ends in {1, 2, 3}
@leeoniya , do you think in the future it might be possible for the underlying panel:
|
like all-zeros or all-nulls? we added #64477 a while back for this purpose.
there are ongoing discussions about how to handle too-long tooltips. we have an internal |
if you want to exclude from everywhere in the viz you might just be better off diy filtering these fields out before sending to the panel. you can still use this reducer matcher if you want to save 5 LoC 🤷 |
It turns out that enabling the |
8103c7b
to
2e83acb
Compare
❌ Failed to run Playwright plugin e2e tests. |
2b0f441
to
94b8cb4
Compare
94b8cb4
to
6c54d22
Compare
6c54d22
to
2631056
Compare
What is this feature?
Special notes for your reviewer:
Please check that: