# Can I use Vega Lite with multiple indexes?

**URL:** <https://discuss.elastic.co/t/can-i-use-vega-lite-with-multiple-indexes/300960>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [March 29, 2022, 12:10pm UTC](https://discuss.elastic.co/t/can-i-use-vega-lite-with-multiple-indexes/300960 "2022-03-29T12:10:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanhoe-dev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ivanhoe-dev/32/89965_2.png) [@ivanhoe-dev](https://discuss.elastic.co/u/ivanhoe-dev)\
**Post date:** [March 29, 2022, 12:10pm UTC](https://discuss.elastic.co/t/can-i-use-vega-lite-with-multiple-indexes/300960/1 "2022-03-29T12:10:48Z")

</div>

I have a use case which data sources are from two separated indexes, is it possible to plot a single chart from two indexes by vega? Thanks

---

<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 30, 2022, 11:13am UTC](https://discuss.elastic.co/t/can-i-use-vega-lite-with-multiple-indexes/300960/2 "2022-03-30T11:13:08Z")

</div>

It's possible to do this in vega, but not in vega-lite.

In vega, simply pass an array of `{ url: {...}, name: "sourcename" }` objects to `data` and you will be able to use them in the chart.

---

<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 27, 2022, 11:13am UTC](https://discuss.elastic.co/t/can-i-use-vega-lite-with-multiple-indexes/300960/3 "2022-04-27T11:13:55Z")

</div>

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