# Customize Lens's graphs

**URL:** <https://discuss.elastic.co/t/customize-lenss-graphs/286702>\
**Category:** Kibana\
**Created:** [October 14, 2021, 9:29am UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702 "2021-10-14T09:29:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kadhem](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@Kadhem](https://discuss.elastic.co/u/Kadhem)\
**Post date:** [October 14, 2021, 9:29am UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/1 "2021-10-14T09:29:26Z")

</div>

Hi, i'm using Lens charts in Kibana. i want to display a graph where **Y axis** is the timestamp and **X axis** is the values of My field . But Lens enable me to use a simple Function **"Value"**  
is there any solution? I don't want to use any of their functions. I'm using 7.15 version  
 ![val](https://us1.discourse-cdn.com/elastic/original/3X/c/a/ca97020fe8b942cbc3ec8e11fd4e9d737ff9bffa.png)

Thanks

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [October 14, 2021, 12:31pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/2 "2021-10-14T12:31:09Z")

</div>

try using a "bar horizontal" to get the time on the Y axis. you could try putting the `# of records` metric in the horizontal axis and a break down by the field? would help to see an example of the visualization you were looking to make....every visualization needs at least one metric

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f601ef2194b1f254b17252aa6b020b3e40d2d044.png)

---

<div class="post-metadata">

**Author:** ![Kadhem](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@Kadhem](https://discuss.elastic.co/u/Kadhem)\
**Post date:** [October 14, 2021, 12:57pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/3 "2021-10-14T12:57:15Z")

</div>

this is what i want to have ( i did it in canvas kibana) but now i want either to copy it into dashboard kibana or drow it directly from there  
 ![result](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4b727236aacc66f10994f4b2ace3044675a25104.png)

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [October 14, 2021, 1:06pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/4 "2021-10-14T13:06:12Z")

</div>

Maybe I misunderstood your original question - If you just want the "value" then try the `Last Value` option on your metric to return the value directly from the data

---

<div class="post-metadata">

**Author:** ![Kadhem](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@Kadhem](https://discuss.elastic.co/u/Kadhem)\
**Post date:** [October 14, 2021, 1:31pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/5 "2021-10-14T13:31:37Z")

</div>

thank you this working but one last question. I have a field in the same document called "Primary channel " it's an integer. i want to have kind of link between this graph and the value of "Primary\_Channel" so whenever the value changes (i may have 12 known values ) the color of the bars changes as well to make it easy for user to detect the changes between different values.  
How to do it please?

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [October 14, 2021, 1:45pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/6 "2021-10-14T13:45:36Z")

</div>

This feature is in our backlog, i've added a link to your request to the issue in github [[Lens] Support categorical coloring by name · Issue #101942 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/101942)

---

<div class="post-metadata">

**Author:** ![Kadhem](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@Kadhem](https://discuss.elastic.co/u/Kadhem)\
**Post date:** [October 14, 2021, 3:30pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/7 "2021-10-14T15:30:31Z")

</div>

so how am I supposed to configure the break\_down filter to get the bars colored depending on the field **"Primary\_Channel"** I'm beginner i don't know how to set it right

 ![verif](https://us1.discourse-cdn.com/elastic/original/3X/3/b/3bc965df763bd6e734f795d96887ef0f42c91092.png)

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [October 14, 2021, 9:36pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/8 "2021-10-14T21:36:40Z")

</div>

pick "top values" for the field and pick the number of bars you want

---

<div class="post-metadata">

**Author:** ![Kadhem](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@Kadhem](https://discuss.elastic.co/u/Kadhem)\
**Post date:** [October 15, 2021, 7:57am UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/9 "2021-10-15T07:57:00Z")

</div>

i tried it but in vain when i select the field it's value is displayed correctly (value = 1 ) but the bars presenting the Y axis disappear as you can see here

 ![problem](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc6c62fd39ad97751d8590fa9305f10a0e0b520c.png)

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [October 15, 2021, 2:36pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/10 "2021-10-15T14:36:12Z")

</div>

sorry but I don't know what else I can help you with. Your documents must have both the "last value" of that field you picked AND a value for your channel keyword to break down like this. Might help to see how things work with the sample data that comes with Kibana...and definitely use "Discover" to get a feel for your data.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/f/3fc9644c39c49ca10edad4b55c499b650937e1ee.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:** [November 12, 2021, 2:36pm UTC](https://discuss.elastic.co/t/customize-lenss-graphs/286702/11 "2021-11-12T14:36:35Z")

</div>

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