# How to Rotate X Tick Label in Canvas/CSS?

**URL:** <https://discuss.elastic.co/t/how-to-rotate-x-tick-label-in-canvas-css/197179>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [August 28, 2019, 5:38pm UTC](https://discuss.elastic.co/t/how-to-rotate-x-tick-label-in-canvas-css/197179 "2019-08-28T17:38:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos.limaElaw](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@Carlos.limaElaw](https://discuss.elastic.co/u/Carlos.limaElaw)\
**Post date:** [August 28, 2019, 5:38pm UTC](https://discuss.elastic.co/t/how-to-rotate-x-tick-label-in-canvas-css/197179/1 "2019-08-28T17:38:43Z")

</div>

Hi, there!

I'm trying to rotate the X Tick Label using CSS, but without sucess

This is my chart:

 ![chart_rotate](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2af51eb5fac5030fe21425a083b7a3b9d006e24d.png)

And the expression:

> filters  
> | essql  
> query="SELECT acao, count(id\_do\_processo) AS conta FROM "mercado\_157\_processos"  
> WHERE NOT(acao IS null)  
> GROUP BY acao  
> ORDER BY conta DESC"  
> | staticColumn "total" value={math "sum(conta)"}  
> | mapColumn "percentual" fn={math "conta/total" | formatNumber "0.00%"}  
> | pointseries x="acao" y="conta" text="percentual" color="acao" size="acao"  
> | plot defaultStyle={seriesStyle bars="1" fill=1} palette={palette "#FFFF00" "#0000FF" gradient=true}  
> font={font family="Open Sans, Helvetica, Arial, sans-serif" size=10 align="center" color="#000000" weight="bold" underline=false italic=false} legend=false xaxis=true yaxis=true  
> | render  
> css=".flot-x-axis .flot-tick-label { white-space: nowrap; transform: translate(-9px, 0) rotate(-60deg); text-indent: -100%; transform-origin: top right; text-align: right !important;  
> }"

What am I doing wrong?

Version: Kibana 7.1.1

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [August 28, 2019, 8:03pm UTC](https://discuss.elastic.co/t/how-to-rotate-x-tick-label-in-canvas-css/197179/2 "2019-08-28T20:03:22Z")

</div>

I was able to get _close_ to what you are requesting. You may be able to use this as a starting point:

```css
.flot-x-axis div {
    white-space: nowrap;
    transform: rotate(-90deg);
    text-indent: -100%;
    transform-origin: top center;
    text-align: right !important;
    top: 280px !important;
}

```

---

<div class="post-metadata">

**Author:** ![Carlos.limaElaw](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@Carlos.limaElaw](https://discuss.elastic.co/u/Carlos.limaElaw)\
**Post date:** [August 29, 2019, 1:01pm UTC](https://discuss.elastic.co/t/how-to-rotate-x-tick-label-in-canvas-css/197179/3 "2019-08-29T13:01:13Z")

</div>

Thanks, Wylie! Yes, that's it!

---

<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 26, 2019, 1:01pm UTC](https://discuss.elastic.co/t/how-to-rotate-x-tick-label-in-canvas-css/197179/4 "2019-09-26T13:01:15Z")

</div>

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