Kibana Chart x-axis customization issue


#1

I have a vertical bar chart.
X-axis is the Date Histogram Aggregation on timestamp. Interval is Daily.
However, the labels are automatically generated and not matching the column very well.
Is there a way to change that?
For example, first column should be aligned to (shown as) July 2nd and last column should be July 12th.


(Nathan Reese) #2

You can adjust the advanced setting dateFormat:scaled to specify the interval label. Advanced settings can by adjusted by first selecting "Management" on the left and then selecting "Advanced Settings".

By default the value for dateFormat:scaled is

[
  ["", "HH:mm:ss.SSS"],
  ["PT1S", "HH:mm:ss"],
  ["PT1M", "HH:mm"],
  ["PT1H", "YYYY-MM-DD HH:mm"],
  ["P1DT", "YYYY-MM-DD"],
  ["P1YT", "YYYY"]
]

For example, you can adjust the day intervals format by changing ["P1DT", "YYYY-MM-DD"] to ["P1DT", "MM-DD"] to just view the month and day


#3

Thanks. This only changes the intervals format. However, it's still not aligned.
For example, the first column should be aligned to 07-02.
the last one should be aligned to 07-13 (07-13 is not even displayed, actually)
Because if you hover over the columns, the first one is for July 02, and the last one is for July 13th.


(Nathan Reese) #4

I am not sure if that is possible. You can open a feature request to track the issue


#5

Thanks. Looks like, if I use Monthly as Interval, it's not aligned correctly too.
The columns are for May June July data respectively. However, they are not aligned correctly.


#6

Also follow up with 2 questions.

1 In IE11, the x-axis lables are not displayed at all. Is this a known issue?

2 ["", "HH:mm:ss.SSS"],
["PT1S", "HH:mm:ss"],
["PT1M", "HH:mm"],
["PT1H", "YYYY-MM-DD HH:mm"],
["P1DT", "YYYY-MM-DD"],
["P1YT", "YYYY"]

Would you mind explain what does the first row-empty string mean? and why PT1H and P1DT are named differently? Shouldn't it be PT1D?


#7

Hello, any answers for the followup questions?


(system) #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.