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

Set min/max properly in histogram converter #1686

Merged
merged 3 commits into from
Oct 17, 2014

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Oct 15, 2014

When an indexPattern is not time-based, the chart.ordered.min and chart.ordered.max as still being set using the timefilter. This fixes that by reading the data in that case.

@spalger spalger added the review label Oct 15, 2014
@rashidkpc
Copy link
Contributor

+        if (captureXRange) {
+          chart.ordered.min = chart.ordered.min === void 0 ? datum.x : Math.min(chart.ordered.min, datum.x);
+          chart.ordered.max = chart.ordered.max === void 0 ? datum.x : Math.max(chart.ordered.max, datum.x);
+        }

This is calculating min/max when it isn't passed. We shouldn't need to pass min/max at all, the vislib should be able to calculate these values.

@rashidkpc rashidkpc added WIP and removed review labels Oct 15, 2014
@spalger spalger added review and removed WIP labels Oct 15, 2014
@spalger
Copy link
Contributor Author

spalger commented Oct 16, 2014

@stormpython @jthomassie Can one of you guys take a look at my vislib changes?

@jthomassie
Copy link

@spenceralger looks good to me

rashidkpc added a commit that referenced this pull request Oct 17, 2014
Set min/max properly in histogram converter
@rashidkpc rashidkpc merged commit 3341aef into elastic:master Oct 17, 2014
@spalger spalger deleted the time_based_histogram_bounds branch December 12, 2014 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants