# Plot a line with different colours for evening than for morning

**URL:** <https://discuss.elastic.co/t/plot-a-line-with-different-colours-for-evening-than-for-morning/269687>\
**Category:** Kibana\
**Created:** [April 9, 2021, 8:57am UTC](https://discuss.elastic.co/t/plot-a-line-with-different-colours-for-evening-than-for-morning/269687 "2021-04-09T08:57:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Facu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/facu/32/86844_2.png) [@Facu](https://discuss.elastic.co/u/Facu)\
**Post date:** [April 9, 2021, 8:57am UTC](https://discuss.elastic.co/t/plot-a-line-with-different-colours-for-evening-than-for-morning/269687/1 "2021-04-09T08:57:38Z")

</div>

Hi All!

Would it be possible to plot a line, or two lines, which will change the color depending on the time of the day I am plotting. Like grey in the afternoon and red in the morning using Timelion ?

I'm doing something like this and I would like to have 1 colour for the morning (from 0am: 9 am) and another color for the rest of the day.

`.es(timefield='@timestamp').label("Score").lines(fill=1,width=0.5).color(gray).yaxis(2, max=1,label="Score")`

Thanks in advance!

---

<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:** [May 7, 2021, 8:57am UTC](https://discuss.elastic.co/t/plot-a-line-with-different-colours-for-evening-than-for-morning/269687/2 "2021-05-07T08:57:38Z")

</div>

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