Skip to content
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

Merged
merged 6 commits into from
Aug 8, 2019

Conversation

ppisljar
Copy link
Member

@ppisljar ppisljar commented Aug 5, 2019

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 strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@@ -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) {
Copy link
Member Author

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

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@ppisljar ppisljar force-pushed the fix/dateHistogramScaling branch from 5afb87f to 8eb5f84 Compare August 7, 2019 14:55
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ppisljar ppisljar marked this pull request as ready for review August 7, 2019 16:52
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@timroes timroes requested a review from lukeelmers August 8, 2019 15:35
@timroes timroes removed the v7.2.2 label Aug 8, 2019
Copy link
Contributor

@timroes timroes left a 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

@timroes timroes merged commit 06706b5 into elastic:master Aug 8, 2019
timroes pushed a commit to timroes/kibana that referenced this pull request Aug 8, 2019
* fixes scaling logic to check agg type instead schema

* adding selenium test

* updating jest snapshot

* fixing test

* Change test order

* Fix test order
timroes pushed a commit to timroes/kibana that referenced this pull request Aug 8, 2019
* fixes scaling logic to check agg type instead schema

* adding selenium test

* updating jest snapshot

* fixing test

* Change test order

* Fix test order
timroes pushed a commit that referenced this pull request Aug 9, 2019
* fixes scaling logic to check agg type instead schema

* adding selenium test

* updating jest snapshot

* fixing test

* Change test order

* Fix test order
timroes pushed a commit that referenced this pull request Aug 9, 2019
* fixes scaling logic to check agg type instead schema

* adding selenium test

* updating jest snapshot

* fixing test

* Change test order

* Fix test order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line visualization is messed up with Kibana 7.2.1
4 participants