# Simple Timelion series code quality over time

**URL:** <https://discuss.elastic.co/t/simple-timelion-series-code-quality-over-time/146571>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [August 29, 2018, 6:48pm UTC](https://discuss.elastic.co/t/simple-timelion-series-code-quality-over-time/146571 "2018-08-29T18:48:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbwest](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbwest/32/32631_2.png) [@dbwest](https://discuss.elastic.co/u/dbwest)\
**Post date:** [August 29, 2018, 6:48pm UTC](https://discuss.elastic.co/t/simple-timelion-series-code-quality-over-time/146571/1 "2018-08-29T18:48:23Z")

</div>

Hi I want to visualize code quality over time.

I have this

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/0/507c87e9628692539bb7aa870a96b9ef26ffafd4.png)

Here is my current Timelion expression. I just want a graph over time of code\_quality\_report.score going up and down.

```
.es(q=branch:cl_preprod, metric=max:code_quality_report.score).label('cl_preprod').title('Code Quality Over Time')
```

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 30, 2018, 11:56am UTC](https://discuss.elastic.co/t/simple-timelion-series-code-quality-over-time/146571/2 "2018-08-30T11:56:47Z")

</div>

Hey @dbwest

What happens if you add `timefield=Time` to your expression? (Substitute "Time" with the name of your timestamp field, I based that off of your screenshot above)

---

<div class="post-metadata">

**Author:** ![dbwest](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbwest/32/32631_2.png) [@dbwest](https://discuss.elastic.co/u/dbwest)\
**Post date:** [August 30, 2018, 5:03pm UTC](https://discuss.elastic.co/t/simple-timelion-series-code-quality-over-time/146571/3 "2018-08-30T17:03:58Z")

</div>

> [@dbwest](#):
>
> ```auto
> .es(q=branch:cl_preprod, metric=max:code_quality_report.score).label('cl_preprod').title('Code Quality Over Time')
> 
> ```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/0/30707086bed138ddc23e4f569a9628033dfaab75.png)

Looking for something more like this line chart I made:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a01de61c05da3cb35913a42a917c41ad0570f5fc.png)

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 30, 2018, 5:51pm UTC](https://discuss.elastic.co/t/simple-timelion-series-code-quality-over-time/146571/4 "2018-08-30T17:51:57Z")

</div>

You may have to adjust the time interval from `auto` to something more specific. Here's what I was able to come up with using the following:

```auto
.es(q=branch:cl_preprod, timefield=time, metric=max:code_quality_report.score).label('cl_preprod').title('Code Quality Over Time')

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/3/1318abae030a6ade7e68b8f02873da0889b03f14.png)

---

<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:** [September 27, 2018, 5:51pm UTC](https://discuss.elastic.co/t/simple-timelion-series-code-quality-over-time/146571/5 "2018-09-27T17:51:57Z")

</div>

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