Time (y-axis) vs Date (x-axis ) Visualize

Hi All ,

I am planning to create a Dashboard for report monitoring . i need to compare the completion date vs completion time for certain period. i have tried using all the options there is no option gives Time (for Ex : HH or MM ) parameter in Y-axis . all Y-axis options are aggregation -- like count min max or avg ...

is there any way i can create a graph with time parameter on Y-axis and date as X-axis.

my parameters are
complete-time Apr 30, 2020 @ 05:37:25.908
timestamp Apr 30, 2020 @ 05:37:26.603 .

any help will be greatly appreciated.

You could create a "scripted field" in the index pattern under Kibana Management > Index Patterns. Choose the index pattern for your data, then click on the "scripted fields" tab. Create a new field.

There are two ways to accomplish this. If you just want the hour then the script looks like


If you want the minute of the day then the script looks like

(doc['complete-time'].value.getHour() * 60) + doc['complete-time'].value.getMinute()

Once you have the scripted field setup, you can use it in the visualization like any other field. Look at the "top hit" aggregation if you want to just visualize the "last" raw value OR you could use "max".

The only caveat is TSVB doesn't support scripted fields, we are working on a solution for that.

Hi chris,
i have created scripted field

when i try to use top hit the Aggregate with list box is empty . the field is defined as date and not a string but still it shows empty.

and i tried with max some how y axis is showing jan 1 1970 time stamp for all instead of HH

right now it showing different format instead of 9PM its showing jan 1,1970 @ 9
local time zone is CST and KIbana one is UTC
Not sure where it went wrong ...

I should have mentioned, set the field type for the scripted field to a number. That will allow you to aggregate it like any other metric.

thanks Alot it worked Chris. thanks for your support.

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