# Can timelion's title be a result of a query?

**URL:** <https://discuss.elastic.co/t/can-timelions-title-be-a-result-of-a-query/255285>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [November 13, 2020, 4:21am UTC](https://discuss.elastic.co/t/can-timelions-title-be-a-result-of-a-query/255285 "2020-11-13T04:21:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wang\_Hay\_Ng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wang_hay_ng/32/52105_2.png) [@Wang\_Hay\_Ng](https://discuss.elastic.co/u/Wang_Hay_Ng)\
**Post date:** [November 13, 2020, 4:21am UTC](https://discuss.elastic.co/t/can-timelions-title-be-a-result-of-a-query/255285/1 "2020-11-13T04:21:38Z")

</div>

i have a timelion graph displaying an on off switch's status, which returns a 1/0 value, i also have a scripted field that returns on/off string base on the value, i know i can showit with a plain text visualization, but is it possible to show the string in the timelion graph or even make the title based on a query result and display dynamically?

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [November 26, 2020, 4:41pm UTC](https://discuss.elastic.co/t/can-timelions-title-be-a-result-of-a-query/255285/2 "2020-11-26T16:41:04Z")

</div>

If with `showing the string in the timelion graph` you mean to show the On and Off string on the vertical axis instead of showing 0 and 1 I think the only possible way is to change the field format in the index-pattern management page using a static lookup

 ![Screenshot 2020-11-26 at 17.37.28](https://us1.discourse-cdn.com/elastic/original/3X/4/8/481923d377ad06343dadd5fd11c18dc0fd117cbf.png)

Remember to put a single space string for the `Value for unknown key` so that any value different from 0 or 1 that appear on the axis is not shown.

This is an example using a standard line chart with a similar configuration

 ![Screenshot 2020-11-26 at 17.39.17](https://us1.discourse-cdn.com/elastic/original/3X/c/9/c9a834323d42114d1afe4a37ef2b0eefde159bc3.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:** [December 24, 2020, 4:41pm UTC](https://discuss.elastic.co/t/can-timelions-title-be-a-result-of-a-query/255285/3 "2020-12-24T16:41:12Z")

</div>

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