# Stacked horizontal graph showing percentage counts of multiple “Terms”

**URL:** https://discuss.elastic.co/t/stacked-horizontal-graph-showing-percentage-counts-of-multiple-terms/208304
**Category:** Kibana
**Created:** [November 18, 2019, 11:50am UTC](https://discuss.elastic.co/t/stacked-horizontal-graph-showing-percentage-counts-of-multiple-terms/208304 "2019-11-18T11:50:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rahul\_saini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_saini/32/56969_2.png) [@rahul\_saini](https://discuss.elastic.co/u/rahul_saini)
#### Post date: [November 18, 2019, 11:50am UTC](https://discuss.elastic.co/t/stacked-horizontal-graph-showing-percentage-counts-of-multiple-terms/208304/1 "2019-11-18T11:50:14Z")

</div>

Hello,

I've a survey data which collects metrics with values between 1-5.  
This survey will be filled by many users say by 200. Something like:

**User 1:**  
Ease of use (1-5): 4  
Durability (1-5): 2  
Features (1-5): 3

**User 2:**  
Ease of use (1-10): 3  
Durability (1-10): 1  
Features (1-10): 2  
etc..

So json format is like this:

> ```
> {
> name: user1,
> ease_of_use: 4,
> durability: 3
> }
> 
> ```

I want to show this data in a stacked horizontal bar visualization for 200 users with percentage distribution of all Metrics.

Something like this:

 ![Clipart](https://us1.discourse-cdn.com/elastic/original/3X/c/c/ccde960a1df4b8a284fdf629da4c016a9f799b2f.png)

I'm new to Kibana and when I'm trying to show these counts, and add first metrics of `Ease of use`, it shows something like this:

 ![Snipping](https://us1.discourse-cdn.com/elastic/original/3X/8/8/888444a13d535788642c2a45db3270a48c5a8adb.png)

Kindly suggest, what do I need to do?

_Thanks_

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [November 19, 2019, 3:41am UTC](https://discuss.elastic.co/t/stacked-horizontal-graph-showing-percentage-counts-of-multiple-terms/208304/2 "2019-11-19T03:41:42Z")

</div>

So, it took me a while to think about but I think I got it. If you translate it to a vertical bar chart it's easier to figure out.  
in Vertical bar chart you would have:

- count of unique users as the metric on the Y-axis.
- a split by Terms on the categories (ease\_of\_use, durability, etc) on the X-axis
- and then a Split Series with another Terms aggregation on the survey value.  
this all is based on a document format like this:

```auto
{
name: user1,
survey_category: ease_of_use,
survey_response: 4
}

```

and so on for each user and each of the survey category. I know it's not the most logical format at first sight, but this will make the queries work within Kibana.

If anybody can suggest a better method and a better document format, i'll be curious to see it as well.

---

<div class="post-metadata">

### Author: ![rahul\_saini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahul_saini/32/56969_2.png) [@rahul\_saini](https://discuss.elastic.co/u/rahul_saini)
#### Post date: [November 19, 2019, 8:09am UTC](https://discuss.elastic.co/t/stacked-horizontal-graph-showing-percentage-counts-of-multiple-terms/208304/3 "2019-11-19T08:09:17Z")

</div>

> [@Marius\_Dragomir](#):
>
> - this all is based on a document format like this:
> 
> ```auto
> {
> name: user1,
> survey_category: ease_of_use,
> survey_response: 4
> }
> 
> ```

Actually, it is more like this:  
{  
name: user1,  
ease\_of\_use: 4,  
durability: 3  
}

Updated my question.

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [November 19, 2019, 12:24pm UTC](https://discuss.elastic.co/t/stacked-horizontal-graph-showing-percentage-counts-of-multiple-terms/208304/4 "2019-11-19T12:24:46Z")

</div>

Then it's kind of hard to get what you want, although you can try it in Canvas.

---

<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 17, 2019, 12:24pm UTC](https://discuss.elastic.co/t/stacked-horizontal-graph-showing-percentage-counts-of-multiple-terms/208304/5 "2019-12-17T12:24:50Z")

</div>

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