# Multiple Plotted Lines on a Line Chart - Canvas

**URL:** <https://discuss.elastic.co/t/multiple-plotted-lines-on-a-line-chart-canvas/198424>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [September 6, 2019, 12:22pm UTC](https://discuss.elastic.co/t/multiple-plotted-lines-on-a-line-chart-canvas/198424 "2019-09-06T12:22:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShaneDaly](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@ShaneDaly](https://discuss.elastic.co/u/ShaneDaly)\
**Post date:** [September 6, 2019, 12:22pm UTC](https://discuss.elastic.co/t/multiple-plotted-lines-on-a-line-chart-canvas/198424/1 "2019-09-06T12:22:43Z")

</div>

Hello,

I am looking to create a line chart in a Canvas workbook with two different lines present on the graph.

```
filters
| esdocs index="e4000*" fields="humidity, temperature, @timestamp" sort="@timestamp, DESC"
| pointseries x="@timestamp" y="humidity"
| plot defaultStyle={seriesStyle lines=3 color="#4fbf48"}
| render

```

I would like to be able to display both temperature and humidity on the same line chart, as well as possibly a threshold line that will be added later.

![sadfa](https://us1.discourse-cdn.com/elastic/original/3X/9/9/99a5eace8274a0839a1feec0aa1e6ea657f76f5e.png)

Is there any way I can do this?

---

<div class="post-metadata">

**Author:** ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)\
**Post date:** [September 13, 2019, 11:23am UTC](https://discuss.elastic.co/t/multiple-plotted-lines-on-a-line-chart-canvas/198424/2 "2019-09-13T11:23:59Z")

</div>

To the analogy of [this example](https://discuss.elastic.co/t/canvas-how-to-make-stacked-area-chart/180399) and [this answer](https://discuss.elastic.co/t/kibana-canvas-line-chart-with-multiple-indices/177455/2) it would be necessary to bring the values into the same field (now they're separate: humidity and temperature) and use the `color` to point to a field which specifies which metric it is (ie. the input needs to be in the long format) .

---

<div class="post-metadata">

**Author:** ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)\
**Post date:** [September 13, 2019, 11:31am UTC](https://discuss.elastic.co/t/multiple-plotted-lines-on-a-line-chart-canvas/198424/3 "2019-09-13T11:31:53Z")

</div>

As for the future, we're working on integrating all the chart types inside Canvas, so plots like that will become easier to set up. One concern here, irrespective of the means, is that temperature and humidity are not using the same measures, so it's not the best to put them on a chart together. The usual recommendation from a data visualization point of view is to have two charts side by side, one for each metric.

---

<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:** [October 11, 2019, 11:31am UTC](https://discuss.elastic.co/t/multiple-plotted-lines-on-a-line-chart-canvas/198424/4 "2019-10-11T11:31:57Z")

</div>

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