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

Show bucket size for Time Series Visual Builder on X-Axis #11639

Merged

Conversation

simianhacker
Copy link
Member

This PR add an x-axis label to the Time Series visualization for the Time Series Visual Builder that displays the interval size. For something with 10000 milliseconds it will display 'per 10 seconds'. This also changes the date format of the tooltip to display seconds.

Before:

image

After:

image

@simianhacker simianhacker added Feature:TSVB TSVB (Time Series Visual Builder) Feature:Visualizations Generic visualization features (in case no more specific feature label is available) review v5.5.0 v6.0.0 labels May 6, 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.

really nice addition, it really improves comprehension, I agree.

LGTM, but I'd also consider removing some of the duplication in computing the units.

y: 'years'
};
export function getAxisLabelString(interval) {
const units = _.pluck(_.clone(relativeOptions).reverse(), 'value')
Copy link
Contributor

Choose a reason for hiding this comment

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

There's some duplication of this. units is a global constant, and we also use it in parse_relative_parts.js.

I would extract the units-array and the unitLookup-map to a different module, and pull it in where needed. E.g. add the units-array and the lookup table to the time_units module.

Copy link
Member Author

Choose a reason for hiding this comment

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

The painful part of trying to use time_units.js is that it's setting a constant for Angular and the code that uses this is in React.

Copy link
Contributor

Choose a reason for hiding this comment

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

fair enough

@thomasneirynck thomasneirynck removed their assignment May 12, 2017
@simianhacker simianhacker merged commit 9c9cad3 into elastic:master May 17, 2017
simianhacker added a commit that referenced this pull request May 17, 2017
* Adding seconds to the timeseries tooltip

* Adding x-axis label to show the bucket size
@simianhacker
Copy link
Member Author

Backported to 5.x with 98de700

snide pushed a commit to snide/kibana that referenced this pull request May 30, 2017
)

* Adding seconds to the timeseries tooltip

* Adding x-axis label to show the bucket size
@simianhacker simianhacker deleted the seconds-to-timeseries-tooltip branch April 17, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:TSVB TSVB (Time Series Visual Builder) Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:enhancement review v5.5.0 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants