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

Scaled date format for date histogram aggregation #12384

Merged
merged 8 commits into from
Jun 20, 2017

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jun 16, 2017

Add getFormat function to date_histogram BucketAggType. The function will return a DateFieldFormatter configured with a scaled date format as specified under advanced settings dateFormat:scaled.

fixes #8076

Release Note:
Format date_histogram aggregation bucket labels with format specified in Advanced Setting's "dateFormat:scaled"

dateformat

@nreese nreese added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v6.0.0-alpha3 labels Jun 16, 2017
Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM pending passing tests.

@nreese
Copy link
Contributor Author

nreese commented Jun 19, 2017

Should TimeBuckets.prototype.getScaledDateFormatter return a cached instance or is it ok to create a new DateFieldFormat instance each time the function is executed?

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Jun 19, 2017

your call. I'm good with what it's now. these aren't called in a tight loop. there's repeated instance-creation, when rendering results, but that's only a single time. e.g. these objects arent' created repeatedly on each frame.

@nreese nreese force-pushed the dateFormat_scaled branch from b607a78 to 4339982 Compare June 19, 2017 16:33
@jimgoodwin
Copy link

@nreese Release Note: paragraph in the description please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:fix v6.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Table Date Histogram doesn't use dateFormat:scaled
5 participants