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

**URL:** <https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [December 2, 2018, 2:27pm UTC](https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050 "2018-12-02T14:27:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isilve28](https://avatars.discourse-cdn.com/v4/letter/i/41988e/32.png) [@Isilve28](https://discuss.elastic.co/u/Isilve28)\
**Post date:** [December 2, 2018, 2:27pm UTC](https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050/1 "2018-12-02T14:27:12Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![bryan\_stuhlsatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryan_stuhlsatz/32/49123_2.png) [@bryan\_stuhlsatz](https://discuss.elastic.co/u/bryan_stuhlsatz)\
**Post date:** [December 3, 2018, 5:54am UTC](https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050/2 "2018-12-03T05:54:33Z")

</div>

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"  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![bryan\_stuhlsatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryan_stuhlsatz/32/49123_2.png) [@bryan\_stuhlsatz](https://discuss.elastic.co/u/bryan_stuhlsatz)\
**Post date:** [December 3, 2018, 5:56am UTC](https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050/3 "2018-12-03T05:56:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Isilve28](https://avatars.discourse-cdn.com/v4/letter/i/41988e/32.png) [@Isilve28](https://discuss.elastic.co/u/Isilve28)\
**Post date:** [December 3, 2018, 8:48am UTC](https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050/4 "2018-12-03T08:48:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bryan\_stuhlsatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryan_stuhlsatz/32/49123_2.png) [@bryan\_stuhlsatz](https://discuss.elastic.co/u/bryan_stuhlsatz)\
**Post date:** [December 5, 2018, 6:17am UTC](https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050/5 "2018-12-05T06:17:05Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 2, 2019, 6:17am UTC](https://discuss.elastic.co/t/timelion-graphs-per-day-over-a-week-selected-in-kibana-time-picker/159050/6 "2019-01-02T06:17:07Z")

</div>

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