Timelion - graphs per day over a week selected in kibana time picker

(Isilve28) #1

Hello !

I need to create a dashboard which will always take days from monday to friday in kibana time picker.

I want to build 5 timelion graphs to display daily events over selected week in order to compare them.

ex : for the selected week range, I want a timelion graph for monday, another for tuesday, and so on !

A solution is to select last day of the week in the time picker, and use offsets for the 4 other graphs, but this will cause some issues with an alredy build pie chart splitted by days over the week and I can't design pie charts with vega for the moment ... So I really want to keep time range from monday to friday.

Any ideas to resolve this issue ? Thanks in advance for reading !

(Bryan Stuhlsatz) #2

One thought, is you could add a query dsl filter for each visualization to only show a specific day.
Ex. of a query dsl to embed in each visualization would be below. Replace timestamp with the field that has your date. Mon = 1, Tue = 2, etc.

"query": {
"script": {
"script": "doc['timestamp'].date.dayOfWeek == 4"

(Bryan Stuhlsatz) #3

Another thought would be to add another field that you can filter and aggregate on. The new field would be like day_of_week. You would add this field in at time of data ingestion. Then use it in your visualizations to show only that day of the week.

(Isilve28) #4

Hi @bryan_stuhlsatz,

Thanks for replying !
Unfortunately Timelion does not support scripted query at the moment. But I will check if I can did this in vega and still have only the day I picked displayed on the time axis.

(Bryan Stuhlsatz) #5

Right. Timelion does not have this option for filtering at the top. You can do this for pie, line, and other chart types because they include the filter at the top. Might be easier to create the day of week field or have a line/bar chart for each day of the week :slight_smile:

(system) closed #6

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