# Visualize Custom Time from a Scripted Field

**URL:** <https://discuss.elastic.co/t/visualize-custom-time-from-a-scripted-field/318272>\
**Category:** Kibana\
**Created:** [November 6, 2022, 5:53pm UTC](https://discuss.elastic.co/t/visualize-custom-time-from-a-scripted-field/318272 "2022-11-06T17:53:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.bas](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@g.bas](https://discuss.elastic.co/u/g.bas)\
**Post date:** [November 6, 2022, 5:53pm UTC](https://discuss.elastic.co/t/visualize-custom-time-from-a-scripted-field/318272/1 "2022-11-06T17:53:01Z")

</div>

Hello I am new to Kibana and would like to create my own visual representation where the horizontal axis represents time which is derived from one of my runtime fields. The field is called Duration and is in milliseconds (Double).  
On the vertical axis I want it to show me the types at the appropriate times, so you can see which type took how much time and if there are types that take more time after a while.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9f314b5683e59350dbc137c6a187f3a37ab0741a.png)  
If u need further Information Let me know and Thanks in forward. ;D

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [November 7, 2022, 4:42pm UTC](https://discuss.elastic.co/t/visualize-custom-time-from-a-scripted-field/318272/2 "2022-11-07T16:42:51Z")

</div>

Hi @g.bas. You should be able to define the axes in a Lens visualization. I would use a line chart and put the Duration on the y-axis, the @timestamp on the x-axis, and have a breakdown on the type field.

---

<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:** [December 5, 2022, 4:42pm UTC](https://discuss.elastic.co/t/visualize-custom-time-from-a-scripted-field/318272/3 "2022-12-05T16:42:59Z")

</div>

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