# Canvas line with multiple items on Y axes

**URL:** <https://discuss.elastic.co/t/canvas-line-with-multiple-items-on-y-axes/190364>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [July 13, 2019, 9:59pm UTC](https://discuss.elastic.co/t/canvas-line-with-multiple-items-on-y-axes/190364 "2019-07-13T21:59:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [July 13, 2019, 9:59pm UTC](https://discuss.elastic.co/t/canvas-line-with-multiple-items-on-y-axes/190364/1 "2019-07-13T21:59:41Z")

</div>

Hello,

I would like to create a chart that would look like this: [http://prntscr.com/oenqlp](http://prntscr.com/oenqlp). However I did not find a way to add multiple elements to the Y axes. Is there a possiblity?

Regard

---

<div class="post-metadata">

**Author:** ![tims](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tims/32/46750_2.png) [@tims](https://discuss.elastic.co/u/tims)\
**Post date:** [July 15, 2019, 3:27pm UTC](https://discuss.elastic.co/t/canvas-line-with-multiple-items-on-y-axes/190364/2 "2019-07-15T15:27:25Z")

</div>

Hi @zozo6015, it would be helpful to see your expression but this is definitely possible.

Here's an example using timelion, you'll see that I have multiple queries, each representing a different time series. In the UI you can tweak the look of each series by adding a new "Series style" under Chart style.

```auto
filters
| timelion 
  query=".es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:critical\"', timefield=created_at.time).cusum().subtract(.es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:critical\"', timefield=closed_at.time).cusum()).label('Critical'),

.es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:high\"', timefield=created_at.time).cusum().subtract(.es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:high\"', timefield=closed_at.time).cusum()).label('High'),

.es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:medium\"', timefield=created_at.time).cusum().subtract(.es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:medium\"', timefield=closed_at.time).cusum()).label('Medium'),

.es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:low\"', timefield=created_at.time).cusum().subtract(.es(q='is_pullrequest:false AND labels:\"Team:Canvas\" AND labels:\"impact:low\"', timefield=closed_at.time).cusum()).label('Low')
"
| pointseries x="@timestamp" y="value"
| plot defaultStyle={seriesStyle lines=1 fill=1} yaxis=true seriesStyle={seriesStyle}
| render

```

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [July 15, 2019, 4:26pm UTC](https://discuss.elastic.co/t/canvas-line-with-multiple-items-on-y-axes/190364/3 "2019-07-15T16:26:50Z")

</div>

Perfect, I'll give it a try. Will come back with the results or different questions.

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [July 16, 2019, 8:52am UTC](https://discuss.elastic.co/t/canvas-line-with-multiple-items-on-y-axes/190364/4 "2019-07-16T08:52:20Z")

</div>

I have tried to modify the expression like this:

```
filters
| essql 
  query="select round(system.cpu.system.pct*100, 2) as system, \"@timestamp\" from \"metricbeat-*\" where system.cpu.user.pct is NOT null order by \"@timestamp\"",
  query="select round(system.cpu.user.pct*100, 2) as user, \"@timestamp\" from \"metricbeat-*\" where system.cpu.user.pct is NOT null order by \"@timestamp\"",
  query="select round(system.cpu.nice.pct*100, 2) as nice, \"@timestamp\" from \"metricbeat-*\" where system.cpu.user.pct is NOT null order by \"@timestamp\"",
  query="select round(system.cpu.iowait.pct*100, 2) as iowait, \"@timestamp\" from \"metricbeat-*\" where system.cpu.user.pct is NOT null order by \"@timestamp\""
| pointseries x="@timestamp" y="user"
| plot defaultStyle={seriesStyle lines="2" points="2" color="#b83c6f" stack=1}
| render

```

but it does not seam to work, what am I doing wrong?

---

<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:** [August 13, 2019, 8:52am UTC](https://discuss.elastic.co/t/canvas-line-with-multiple-items-on-y-axes/190364/5 "2019-08-13T08:52:25Z")

</div>

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