# Multiple plot lines Vega Lite Kibana

**URL:** <https://discuss.elastic.co/t/multiple-plot-lines-vega-lite-kibana/268242>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [March 24, 2021, 4:37pm UTC](https://discuss.elastic.co/t/multiple-plot-lines-vega-lite-kibana/268242 "2021-03-24T16:37:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![usman1](https://avatars.discourse-cdn.com/v4/letter/u/c67d28/32.png) [@usman1](https://discuss.elastic.co/u/usman1)\
**Post date:** [March 24, 2021, 4:37pm UTC](https://discuss.elastic.co/t/multiple-plot-lines-vega-lite-kibana/268242/1 "2021-03-24T16:37:44Z")

</div>

I am trying to create a two line graph with both of the lines using quantitative attributes. Following is an example of the data I have:

```auto
[
    {"TIMESTAMP" : "15/07/2020 13:58", "A" : 61, "B" : 70}, 
    {"TIMESTAMP" : "15/07/2020 13:59", "A" : 51, "B" : 60},
    {"TIMESTAMP" : "15/07/2020 14:00", "A" : 67, "B" : 80}, 
    {"TIMESTAMP" : "15/07/2020 14:01", "A" : 52, "B" : 40}, 
]

```

Now, I want to create a line graph in Vegalite which has two lines plotting A and B on the same y axis. I have found a work around using different symbols but what if we want to plot it from the record as above?

Note: I have gone through [this documentation](https://vega.github.io/vega-lite/docs/line.html#documentation-overview) but all the examples use a symbol attribute which tells the category of the feature.

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [March 24, 2021, 5:01pm UTC](https://discuss.elastic.co/t/multiple-plot-lines-vega-lite-kibana/268242/2 "2021-03-24T17:01:34Z")

</div>

You can do this using layers ([Layering views | Vega-Lite](https://vega.github.io/vega-lite/docs/layer.html))

Check out this example:

> **[Editor/IDE for Vega and Vega-Lite](https://vega.github.io/editor/#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykBaADZ04JAKyUAVhDYA7EABoQAEzjQATjRyZ289AGVMbKAGsABDk1Q1ZtgDMzYswBU4sMwGE2CHElk0bNlJ1FxoEOEpFFSRMFFRQYiRBBjU0AG1QZwBJAFkAUX1nAEEcgAU0EABGMQIABgB2AgAmWpazSoBmVDEADiiitAA2SqUAITR62oBfBUzcguKyiuq6xpa2zu6ATn60MRGQcdRB6dmQbPzCkvL0FYbm1tr2gBZUWtrd4-qxtB7TucuixuVRq93WT0qr1qlU+YiaP1Qz2mAF0ZiBBEgAJ5wdTpUDIdQmCrCWRwKJwWRQNjKGiyMhoUAADwZIDsAUEygqFwW1yimExODJ6DY6hpsiSIDRmJZbLgHIqAyU-MFFQAjgw-DpYjpSJKlFTBCKWYlkkKQOo4JyptazgSiegSWSlBSqWL6fEQMyPbL5ehuVclkqBWaRWKJVKZezOehxkGVeh1Zq6DEaLq0QajR6TSkKkxTZLraigA)**
>
> The Vega editor is a web application for authoring and testing Vega and Vega-Lite visualizations. It includes a number of example specifications that showcase both the visual encodings and interaction techniques.

---

<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 21, 2021, 5:01pm UTC](https://discuss.elastic.co/t/multiple-plot-lines-vega-lite-kibana/268242/3 "2021-04-21T17:01:53Z")

</div>

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