# How to build a Vega tree using csv data stored in my index

**URL:** <https://discuss.elastic.co/t/how-to-build-a-vega-tree-using-csv-data-stored-in-my-index/215717>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [January 20, 2020, 11:04am UTC](https://discuss.elastic.co/t/how-to-build-a-vega-tree-using-csv-data-stored-in-my-index/215717 "2020-01-20T11:04:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 12, 2020, 8:28am UTC](https://discuss.elastic.co/t/how-to-build-a-vega-tree-using-csv-data-stored-in-my-index/215717/2 "2020-02-12T08:28:40Z")

</div>

Your spec is just containing the data part, it's not mapping this data to any visual output.

To get started with vega there is lot's of documentation available, e.g. on the vega website: [http://vega.github.io/](http://vega.github.io/). Google also gave me this example for a vega tree, might be a good starting point: [https://bl.ocks.org/ijlyttle/c535a3172c9f7fabf316e18d5ab7b086](https://bl.ocks.org/ijlyttle/c535a3172c9f7fabf316e18d5ab7b086) . For a complex chart like this I recommend starting to build it in the vega editor with inline dummy data, and once everything's working there, moving it into Kibana and connecting it to the real data set. Otherwise you have to deal with both Elasticsearch querying and vega charting at once.

To learn more about how to query elasticsearch within a vega spec in Kibana check out the documentation: [https://www.elastic.co/guide/en/kibana/current/vega-querying-elasticsearch.html](https://www.elastic.co/guide/en/kibana/current/vega-querying-elasticsearch.html)

---

_[View the full topic](https://discuss.elastic.co/t/how-to-build-a-vega-tree-using-csv-data-stored-in-my-index/215717)._
