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

allowing 0 for extent value #10528

Merged
merged 2 commits into from Feb 28, 2017

Conversation

Projects
None yet
4 participants
@ppisljar
Member

ppisljar commented Feb 23, 2017

allows 0 as min-extent value (the value 0 was ignored before, where 0.000001 would work)

fixed #10468

@@ -156,7 +156,9 @@ export default function AxisConfigFactory() {
get(property, defaults) {

This comment has been minimized.

@thomasneirynck

thomasneirynck Feb 24, 2017

Contributor

this method is getting seriously wicked with all the exit points :)

I'd consider rejiggering a little.

e.g.:

if (typeof defaults === 'undefined' && !_.has(this._values, property)) {
 throw new Error(`Accessing invalid config property: ${property}`);
}

const val = _.get(this._values, property, defaults);
return (val == null && defaults != null) ? defaults : val;
@thomasneirynck

thomasneirynck Feb 24, 2017

Contributor

this method is getting seriously wicked with all the exit points :)

I'd consider rejiggering a little.

e.g.:

if (typeof defaults === 'undefined' && !_.has(this._values, property)) {
 throw new Error(`Accessing invalid config property: ${property}`);
}

const val = _.get(this._values, property, defaults);
return (val == null && defaults != null) ? defaults : val;
@@ -126,8 +126,8 @@ export default function AxisScaleFactory(Private) {
if (this.axisConfig.isOrdinal()) return this.values;
}
const min = this.axisConfig.get('scale.min') || this.getYMin();
const max = this.axisConfig.get('scale.max') || this.getYMax();

This comment has been minimized.

@thomasneirynck

thomasneirynck Feb 24, 2017

Contributor

ow gawd, this tripped me up too...

@thomasneirynck

thomasneirynck Feb 24, 2017

Contributor

ow gawd, this tripped me up too...

@thomasneirynck

nice quick fix

@thomasneirynck thomasneirynck removed their assignment Feb 24, 2017

@weltenwort weltenwort self-requested a review Feb 27, 2017

@ppisljar ppisljar merged commit 44e7248 into elastic:master Feb 28, 2017

1 of 2 checks passed

kibana-ci Build finished.
Details
CLA Commit author is a member of Elasticsearch
Details

elastic-jasper added a commit that referenced this pull request Mar 1, 2017

allowing 0 for extent value
Backports PR #10528

**Commit 1:**
allowing 0 for extent value

* Original sha: 17f72c9
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-23T09:23:48Z

**Commit 2:**
fixing based on review

* Original sha: dbef23a
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-28T10:15:30Z

ppisljar added a commit that referenced this pull request Mar 1, 2017

allowing 0 for extent value (#10630)
Backports PR #10528

**Commit 1:**
allowing 0 for extent value

* Original sha: 17f72c9
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-23T09:23:48Z

**Commit 2:**
fixing based on review

* Original sha: dbef23a
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-28T10:15:30Z

@ppisljar ppisljar deleted the ppisljar:fix/minAxisExtent branch Mar 1, 2017

elastic-jasper added a commit that referenced this pull request Mar 22, 2017

allowing 0 for extent value
Backports PR #10528

**Commit 1:**
allowing 0 for extent value

* Original sha: 17f72c9
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-23T09:23:48Z

**Commit 2:**
fixing based on review

* Original sha: dbef23a
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-28T10:15:30Z

ppisljar added a commit that referenced this pull request Mar 22, 2017

allowing 0 for extent value (#10839)
Backports PR #10528

**Commit 1:**
allowing 0 for extent value

* Original sha: 17f72c9
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-23T09:23:48Z

**Commit 2:**
fixing based on review

* Original sha: dbef23a
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-28T10:15:30Z

elastic-jasper added a commit that referenced this pull request Mar 22, 2017

allowing 0 for extent value
Backports PR #10528

**Commit 1:**
allowing 0 for extent value

* Original sha: 17f72c9
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-23T09:23:48Z

**Commit 2:**
fixing based on review

* Original sha: dbef23a
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-28T10:15:30Z

@epixa epixa added the v5.3.0 label Mar 22, 2017

Dreadnoth added a commit to Dreadnoth/kibana that referenced this pull request Aug 8, 2017

allowing 0 for extent value (#10630)
Backports PR #10528

**Commit 1:**
allowing 0 for extent value

* Original sha: 17f72c9
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-23T09:23:48Z

**Commit 2:**
fixing based on review

* Original sha: dbef23a
* Authored by ppisljar <peter.pisljar@gmail.com> on 2017-02-28T10:15:30Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment