# Kibana vega viz plug-in:multiple aggregations: how-to?

**URL:** https://discuss.elastic.co/t/kibana-vega-viz-plug-in-multiple-aggregations-how-to/121893
**Category:** Kibana
**Created:** [February 28, 2018, 4:36pm UTC](https://discuss.elastic.co/t/kibana-vega-viz-plug-in-multiple-aggregations-how-to/121893 "2018-02-28T16:36:08Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![nyuriks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nyuriks/32/26171_2.png) [@nyuriks](https://discuss.elastic.co/u/nyuriks)
#### Post date: [March 2, 2018, 1:10am UTC](https://discuss.elastic.co/t/kibana-vega-viz-plug-in-multiple-aggregations-how-to/121893/2 "2018-03-02T01:10:15Z")

</div>

@nielsen-at-cgt Vega-Lite does not have a good built-in handling of nested data results, so I would advise you use [composite aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-composite-aggregation.html).  
See an example in the video linked from the recent [Vega blog post](https://www.elastic.co/blog/custom-vega-visualizations-in-kibana).

If you need to process nested data, you can use full Vega language instead - the ["group" mark](https://vega.github.io/vega/docs/marks/) can be used to draw pre-faceted data.

---

_[View the full topic](https://discuss.elastic.co/t/kibana-vega-viz-plug-in-multiple-aggregations-how-to/121893)._
