-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Control round and decimal places in Gauge Visualization when using aggregate functions like average #91293
Conversation
@elasticmachine merge upstream |
src/plugins/vis_type_vislib/public/vislib/visualizations/point_series/heatmap_chart.js
Show resolved
Hide resolved
src/plugins/vis_type_vislib/public/vislib/visualizations/gauges/meter.js
Outdated
Show resolved
Hide resolved
src/plugins/vis_default_editor/public/components/options/percentage_mode.tsx
Show resolved
Hide resolved
src/plugins/vis_default_editor/public/components/options/percentage_mode.test.tsx
Outdated
Show resolved
Hide resolved
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
src/plugins/vis_default_editor/public/components/options/percentage_mode.tsx
Outdated
Show resolved
Hide resolved
@@ -78,7 +78,10 @@ export const toExpressionAst = async <TVisParams extends VisParams>( | |||
} | |||
} | |||
if (visConfig?.gauge?.percentageMode === true) { | |||
yDimension.format = { id: 'percent' }; | |||
yDimension.format = { |
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.
Just a question because it is not clear to me, don't we need to also do it for heatmap?
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.
We don't use it for heatmap. Only in gauge.
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.
But the percentage mode also exists for heatmaps too 🤔
And something more, I found it to be a great enhancement but I think it is not something that I would label as a feature cc @alexwizp |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
LGTM, I didn't test it again but it seems to work fine.
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @VladLasitsa |
@elasticmachine run elasticsearch-ci/docs |
…gregate functions like average (elastic#91293) * Add field for providing format in percentage mode * Fix CI * Add tests * Fix ci * Fix some remarks * Fix ci * Fix some remarks * Fix ci * Fix width * Fix some remarks * Fix text * Fix i18n * Remove unneeded import * Remove unneeded code Co-authored-by: Kibana Machine <[email protected]>
…gregate functions like average (#91293) (#93014) * Add field for providing format in percentage mode * Fix CI * Add tests * Fix ci * Fix some remarks * Fix ci * Fix some remarks * Fix ci * Fix width * Fix some remarks * Fix text * Fix i18n * Remove unneeded import * Remove unneeded code Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
… ilm/rollup-v2-action * 'ilm/rollup-v2-action' of github.com:elastic/kibana: [Security Solution][Case][Bug] Only add rule object for alert comments (#92977) [Security Solution][Case] Show the current connector name in case view (#93018) [Security Solution] Remove unused mock data (#92357) Adds mapping to the signals for the indicator rules that were missing (#92928) skip flaky suite (#85208) Cleanup spaces plugin (#91976) Control round and decimal places in Gauge Visualization when using aggregate functions like average (#91293) Added alerting ui mock for jest test (#92604) Remove "beta" label from URL Drilldown as it is now GA (#92859)
Are there plans to implement this feature for gauges that display raw aggregations rather than percentages? |
It would be nice to be able to control decimal places for arc-style gauges, but I guess that's not happening any time soon. |
Closes: #89404
Summary
Previously we don't have possibility to provide format pattern when use
percentage mode
in some visualizations. We can change pattern only globally using advanced settings. It is not user-friendly. Because of this I added a new input field which allow to set pattern for visualization in percentage mode. If you don't set some pattern will be use default pattern. Now we have three type of visualizations which use percentage mode. I updated all of them:Below you can see how it works with my changes:
Release notes
Adds possibility to provide format pattern in
percentage mode
in metric, heatmap and gauge visualizations.Checklist
Delete any items that are not applicable to this PR.