Kibana: x-axis labels for "date range" aggregations are unusable

Created on 2 Feb 2017  路  26Comments  路  Source: elastic/kibana

When creating any "date range" visualization, labels are always vertical, always attempt to show the full date, and are always cut off.

screen shot 2017-02-01 at 8 13 03 pm

As far as I can tell, it behaves the same way as in Kibana 4, except there the labels were horizontal, so it's not a major regression, but something we should still address.

screen shot 2017-02-01 at 8 05 37 pm

A couple of thoughts:

  • Ideally, we should have a more sane default (show the ranges themselves horizontally?)
  • But more often than not it makes sense to mark these ranges with custom labels. For instance, in a business scenario you may be looking at months or quarters, so we should allow someone to enter a custom label for the range, such as "2017Q1", much like we do for filters in the Filter agg.
Visualizations KibanaApp bug v5.4.0

All 26 comments

this was fixed with the Point Series improvements.

e.g.:
image

Hi tbragin,

even i am also looking for your second thought. Did you find any workaround?

@vijaygoturi Looks like this should be fixed in 5.4. If you upgrade to latest minor version of Kibana (5.6.x) and find it's still a problem, you should file a new issue.

@tbragin I am working on 5.6 version and still not able to custom label the data range.

@alexfrancoeur @ppisljar @thomasneirynck Are you able to repro? Do you want a new issue filed, or reopen this one?

the only thing introduced by 5.4 is the ability to rotate the labels (have them either horizontally or vertically).

we did not introduce an option to generate custom labels.

Atleast how can blank the date range ? I do not wish to show the range along the x-axis.

kibana

that is possible, either hide the labels or hide whole axis:

screenshot-localhost-5601 2017-11-06 07-15-16-577

@ppisljar I need the labels along the x-axis points. But, I want to hide the date range that is appearing due to sub-bucket added for the date range. On unchecking the options, only the labels along the axis are hidded, not the date range label.

could you post a screenshot of your aggregation setup ? (the data tab in editor)

@ppisljar
image

image

Even if i specify something in custom label, it only changes the end part of the label and not the date range. I wish to avoid the display of the date range

could you try to use Split Bucket Split Series instead of Split Chart ? (your first bucket aggregation)
or do you have a specific reason to use Split Chart ?

@ppisljar There is no split bucket option under Add Sub Buckets.

I want to filter the records for the past 12 weeks from the current date. So I used split chart

sorry, i meant split series

@ppisljar Thanks. I am getting what I needed along the x-axis, but the range is now appearing along the y-axis labels.

image
Can I avoid the date range along the y-axis , and replace with some meaningful custom labels without the range?

Moreover after adding the split series, whatever the color codes that i am adding to the graphs are not getting correctly reflected in the shared iframe.

i am not really sure what you mean by the range on y axis labels ...
but you could hide the y axis labels all together (probably not what you are after)
the other thing next to the y axis is title ... which is based on the metric used, but you can always override it under the y-axis settings for each of the y axes.

@ppisljar My overridden values appear at the end of the date range
image

The one in the black circle is the custom label.

this looks like a bug specific to date range agg .... could you open a separate issue for it ? thanks!

Is there any category of bug for this?

just assign it to me and i'll make sure the right labels are assigned.

@ppisljar How can i assign it to you?

Date range appears along side the custom label in "Split Series" sub-bucket #14786

@ppisljar Another issue is the color codes that are assigned during visualization are not getting reflected in the shared iframe

@vijaygoturi I assigned to @ppisljar and added the appropriate labels. I believe
your most recent comment may be related to https://github.com/elastic/kibana/issues/13653.

Just to confirm, this issue has been re-opened because we currently do not allow you to customize the x-axis date label. @thomasneirynck @ppisljar is this as simple as adding support for the date formatter function in painless?

The dates are formatted by the vislib, we would need to add support for formatting there.
from the code perspective it should be quite simple. if we get a format provided we would just apply it there. We need to figure out how to expose this in UI however.

As a bandaid, couldn't we add a dropdown with a number of common date formatting options? We won't allow for full customization (to start) but instead common date formats. This could be placed directly under x-axis and serve as a quick win for us.

screen shot 2017-11-07 at 12 49 36 pm

I think the various bugs and issues here have been resolved by now, and the remaining issue is open separately: https://github.com/elastic/kibana/issues/13784

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ginja picture Ginja  路  3Comments

stacey-gammon picture stacey-gammon  路  3Comments

timroes picture timroes  路  3Comments

MaartenUreel picture MaartenUreel  路  3Comments

ctindel picture ctindel  路  3Comments