How to set on x axis an time range by hour?

I want to set in interval by hour on axis x and a time range that count one month. i want to see two lines that show log in two different days in determinated hours .

this an example: on x axis an interval by hour but i want to set the time on line not in the time piker. Because there are a lot of free space and i want to see line up line. one line = one day, y axis = count and x axis range time from 14:00 to 21:00.
thanks for your answere

hi @erion,

That's an interesting problem.

I would create two scripted fields that gets the hour for those two days as a numerical value.

That way you chart will not be bound by the time-picker (which uses the default date-field from your index pattern).

Then you can plot two lines, one for each of these days.

To write a scripted-field, see following links:

Thank you very mutch Thomas, It worked!

hi @thomasneirynck,
the scripted field worked in visualize, but when i try to use it in timelion query like this: .es(index="apache_elastic", q="@timestamp:[2017-03-22|| TO 2017-03-22||+23h/h]", timefield="hours_range"), show me null graph. the scripted field call "hours_range". Can you help me?

Hi Erion,

Timelion can't use scripted fields.

thank you very much... have a good day

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