# Vertical bar chart issue in kibana

**URL:** <https://discuss.elastic.co/t/vertical-bar-chart-issue-in-kibana/57714>\
**Category:** Kibana\
**Created:** [August 10, 2016, 2:29pm UTC](https://discuss.elastic.co/t/vertical-bar-chart-issue-in-kibana/57714 "2016-08-10T14:29:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [August 10, 2016, 2:29pm UTC](https://discuss.elastic.co/t/vertical-bar-chart-issue-in-kibana/57714/1 "2016-08-10T14:29:17Z")

</div>

HI Team,  
I'm facing very new issue while creating bar chart in visualization. I want to create grouped bar. when i passing the input its not creating correctly. This are my inputs,

1st bucket Split bars,  
Aggregation type - Filter  
Filter 1 Condition - "A"  
Filter 2 Condition - "A" or "B"  
2nd bucket x-Axis  
sub aggregation type- Terms  
Field - Name  
size - 5

when i apply this it creating grouped bar correctly for first 4 only. 5 bar is not grouped and when i click and apply name filter of 5 bar it shows both filter1 and filter 2 value.. Why its mesh up like this and one more i have given top 5 but its show another one more bar in the graph. Please find the below image,  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/c/c924482cef69e6d81bce7ca0694c4bd2d11fe77a.png)

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [August 11, 2016, 12:02am UTC](https://discuss.elastic.co/t/vertical-bar-chart-issue-in-kibana/57714/2 "2016-08-11T00:02:14Z")

</div>

I am going to guess that the keys of the buckets in your `"A"` results don't exactly line up to the keys of the buckets in your `"A" or "B"` results. When you gave `size: 5` in your sub-aggregation, that makes it so the "A" filter is limited to 5, and your `"A" or "B"` results are limited to 5. It looks like out of that, 4 keys do correspond across both filters, but 1 key only exists in your `"A"` filter, and another key only exists in your `"A" or "B"` filter.

I can pretty much reproduce this with some test Apache log data, in the master branch of Kibana:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/5/5d4e0eea934e054681b7cd732ddf35cd2d45e719.png)

Now if I look in the "spy" panel and copy the aggregation DSL, and put it into Console (previously known as Sense), I get this:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/4/45e0642751e7be75da5bf3acb8f07f7e33637017.png)

Here's my actual response data:

```auto
"aggregations": {
    "2": {
      "buckets": {
        "\"A\"": {
          "3": {
            "doc_count_error_upper_bound": 0,
            "sum_other_doc_count": 1092,
            "buckets": [
              {
                "key": "\"Mozilla/5.0 (compatible; Ezooms/1.0; help@moz.com)\"",
                "doc_count": 736
              },
              {
                "key": "\"Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)\"",
                "doc_count": 609
              },
              {
                "key": "\"Mozilla/5.0 (compatible; MJ12bot/v1.4.4; http://www.majestic12.co.uk/bot.php?+)\"",
                "doc_count": 593
              },
              {
                "key": "\"Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)\"",
                "doc_count": 550
              },
              {
                "key": "\"Wotbox/2.01 (+http://www.wotbox.com/bot/)\"",
                "doc_count": 278
              }
            ]
          },
          "doc_count": 3858
        },
        "\"A\" or \"B\"": {
          "3": {
            "doc_count_error_upper_bound": 30,
            "sum_other_doc_count": 2242,
            "buckets": [
              {
                "key": "\"Mozilla/5.0 (compatible; Ezooms/1.0; help@moz.com)\"",
                "doc_count": 738
              },
              {
                "key": "\"Tiny Tiny RSS/1.11 (http://tt-rss.org/)\"",
                "doc_count": 662
              },
              {
                "key": "\"Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)\"",
                "doc_count": 610
              },
              {
                "key": "\"Mozilla/5.0 (compatible; MJ12bot/v1.4.4; http://www.majestic12.co.uk/bot.php?+)\"",
                "doc_count": 594
              },
              {
                "key": "\"Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)\"",
                "doc_count": 553
              }
            ]
          },
          "doc_count": 5399
        }
      }
    }
  }

```

Now if you look at each inner-level bucket, they are each limited to 5, but which 5 they are isn't a complete overlap. It looks like that is what is happening in your case.

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [August 11, 2016, 6:28am UTC](https://discuss.elastic.co/t/vertical-bar-chart-issue-in-kibana/57714/3 "2016-08-11T06:28:35Z")

</div>

How to over come this? Because when i click the single keys bar it applying filter by use name i can find the both Filter 1 and filter 2 but if i remove the filter which i applied it show single key in diagram,

![](https://us1.discourse-cdn.com/elastic/original/2X/8/82ed15e23fd0bffb61481542c56965d26bb23c53.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:** [July 6, 2017, 1:41pm UTC](https://discuss.elastic.co/t/vertical-bar-chart-issue-in-kibana/57714/4 "2017-07-06T13:41:25Z")

</div>


