# Text in Line Chart - Canvas Kibana

**URL:** <https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [March 4, 2019, 9:56pm UTC](https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801 "2019-03-04T21:56:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deyvis\_Valladares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deyvis_valladares/32/41534_2.png) [@Deyvis\_Valladares](https://discuss.elastic.co/u/Deyvis_Valladares)\
**Post date:** [March 4, 2019, 9:56pm UTC](https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801/1 "2019-03-04T21:56:05Z")

</div>

Hi Team,

Could you help me in this case?

I try to put labels in my line chart, but I don't now how move the text to over the line.

Thanks.

 ![Img01](https://us1.discourse-cdn.com/elastic/original/3X/6/4/6411ffbce514b3ce7cb91add0474e812def7e111.png) ![Img02](https://us1.discourse-cdn.com/elastic/original/3X/9/1/913bc9659f7e09fa6c5de325029b0dea61b6a67d.png)

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [March 5, 2019, 7:16pm UTC](https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801/2 "2019-03-05T19:16:45Z")

</div>

Hi @Deyvis_Valladares,

You should be able to do this by applying some custom CSS in Canvas:

1. Select your element.
2. Under `Element style` on the layer settings panel, click the `+` icon to add CSS.
3. Add your custom CSS to reposition the labels (hint: they all have a `valueLabel` class applied).
4. Click `Apply Stylesheet`.

I'd imagine you are looking for something along these lines:

```auto
.canvasRenderEl .valueLabel {
  margin-top: -5px;
}

```

Or if you prefer to use the expression editor, add a `css` argument to the `render` function:

```auto
css=".canvasRenderEl .valueLabel { margin-top: -5px; }"

```

Thanks,

Luke

---

<div class="post-metadata">

**Author:** ![Deyvis\_Valladares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deyvis_valladares/32/41534_2.png) [@Deyvis\_Valladares](https://discuss.elastic.co/u/Deyvis_Valladares)\
**Post date:** [March 5, 2019, 8:00pm UTC](https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801/3 "2019-03-05T20:00:03Z")

</div>

Thanks Luke!!

Perfect, I have a good graph. But, I have an any question more...How can I see the "key" value in Wordpad? for example, you told me "valueLabel", What about more have? for example: legend, axis X or axis Y, etc.

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [March 6, 2019, 10:40pm UTC](https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801/4 "2019-03-06T22:40:18Z")

</div>

We don't currently have a documented list of "officially" supported classnames for you to use in your custom CSS, so my recommendation would be to use the developer tools in your browser to get an idea as to what you can modify.

For example, if you want to change the legend, you can inspect the DOM in your browser around the legend, and find the corresponding classname for use in your stylesheet.

---

<div class="post-metadata">

**Author:** ![Deyvis\_Valladares](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deyvis_valladares/32/41534_2.png) [@Deyvis\_Valladares](https://discuss.elastic.co/u/Deyvis_Valladares)\
**Post date:** [March 8, 2019, 8:59pm UTC](https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801/5 "2019-03-08T20:59:12Z")

</div>

Thanks Luke!

---

<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:** [April 5, 2019, 9:00pm UTC](https://discuss.elastic.co/t/text-in-line-chart-canvas-kibana/170801/6 "2019-04-05T21:00:57Z")

</div>

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