-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
fixes scaling logic to check agg type instead schema #42574
Conversation
@@ -157,8 +157,8 @@ export const dateHistogramBucketAgg = new BucketAggType({ | |||
|
|||
const scaleMetrics = interval.scaled && interval.scale < 1; | |||
if (scaleMetrics && aggs) { | |||
const all = _.every(aggs.bySchemaGroup.metrics, function (agg) { | |||
return agg.type && agg.type.isScalable(); | |||
const all = _.every(aggs.filter(agg => agg.type && agg.type.type === 'metric'), function (agg) { |
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 could use aggs.byTypeType.metric
here but we want to get rid of using indexed array in aggs
💔 Build Failed |
Pinging @elastic/kibana-app-arch |
5afb87f
to
8eb5f84
Compare
💚 Build Succeeded |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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.
Tested on Chrome Linux, Code LGTM
* fixes scaling logic to check agg type instead schema * adding selenium test * updating jest snapshot * fixing test * Change test order * Fix test order
* fixes scaling logic to check agg type instead schema * adding selenium test * updating jest snapshot * fixing test * Change test order * Fix test order
Summary
Fixes axis scaling to only apply to specific metrics that have scaling enabled.
Fixes #42335
Release notes: axis scaling was fixed to only apply to metrics with scaling enabled.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
[ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)