# Visualization of data

**URL:** <https://discuss.elastic.co/t/visualization-of-data/107598>\
**Category:** Kibana\
**Created:** [November 14, 2017, 5:17pm UTC](https://discuss.elastic.co/t/visualization-of-data/107598 "2017-11-14T17:17:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![javidr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javidr/32/136982_2.png) [@javidr](https://discuss.elastic.co/u/javidr)\
**Post date:** [November 14, 2017, 5:17pm UTC](https://discuss.elastic.co/t/visualization-of-data/107598/1 "2017-11-14T17:17:51Z")

</div>

Hi

I am starting with Kibana, so the questions i will raise should be very basic. Apologies for that. Any reference or doc is welcome 🙂

I have a json that has different levels nested. For example

{ "A": [  
{ "colour: "red", "name": "John"},  
{ "colour: "white", "name": "Mark"},  
{ "colour: "blue", "name": "Mike"},  
{ "colour: "red", "name": "Ann"},  
]  
}

I am trying to display in a pie chart the different colours. I expect to see a section with white (1), another with blue (1), and another with red (2)

How can i display this? I am displaying by count, and i have 3 sectors, one for each colour

Thanks

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [November 14, 2017, 8:21pm UTC](https://discuss.elastic.co/t/visualization-of-data/107598/2 "2017-11-14T20:21:17Z")

</div>

Kibana doesn't really support Elasticsearch's nested field type, so if those are really nested documents that might be an issue. If you're just trying to split a pie chart by the `A.colour` field and want a slice that represents the count that represents the count of documents with `A.colour === 'red'` and so on then you would want to use the `terms` aggregation type on the `A.colour` field. Can you show a screenshot of what you've got going so far?

---

<div class="post-metadata">

**Author:** ![javidr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javidr/32/136982_2.png) [@javidr](https://discuss.elastic.co/u/javidr)\
**Post date:** [November 14, 2017, 8:37pm UTC](https://discuss.elastic.co/t/visualization-of-data/107598/3 "2017-11-14T20:37:12Z")

</div>

My json is as stupid as this

{  
"name": "javi",  
"cars":  
[  
{  
"make": "ferrari", "model": "f40"  
},  
{  
"make": "ferrari", "model": "f50"  
},  
{  
"make": "honda", "model": "civic"  
},  
{  
"make": "nissan", "model": "almera"  
},  
{  
"make": "ferrari", "model": "f1-2017"  
},  
{  
"make": "mercedes", "model": "class A"  
},  
{  
"make": "Seat", "model": "Ibiza"  
}  
]  
}

I want to display with a vertical bar that Javi has 3 ferraris, 1 honda, 1 mercedes, 1 nissan and 1 seat

I have attached the graph... not too much luck by now. I have 7 bars for each occurence

 ![13](https://us1.discourse-cdn.com/elastic/original/3X/7/1/719bf663ed3311742269f8806b117b05a9ea399a.png)

---

<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:** [December 12, 2017, 8:37pm UTC](https://discuss.elastic.co/t/visualization-of-data/107598/4 "2017-12-12T20:37:12Z")

</div>

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