# Kibana 5.4.0 - Vertical Bar Data Visualization Issue

**URL:** <https://discuss.elastic.co/t/kibana-5-4-0-vertical-bar-data-visualization-issue/134450>\
**Category:** Kibana\
**Created:** [June 4, 2018, 3:20pm UTC](https://discuss.elastic.co/t/kibana-5-4-0-vertical-bar-data-visualization-issue/134450 "2018-06-04T15:20:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zamir\_Arif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zamir_arif/32/31894_2.png) [@Zamir\_Arif](https://discuss.elastic.co/u/Zamir_Arif)\
**Post date:** [June 4, 2018, 3:20pm UTC](https://discuss.elastic.co/t/kibana-5-4-0-vertical-bar-data-visualization-issue/134450/1 "2018-06-04T15:20:46Z")

</div>

I am able to create index and in discovery tab all the data is being populated shown properly.

```
{
  "_index": "deal-expense",
  "_type": "kafka-connect",
  "_id": "deal-expense+0+63",
  "_version": 2,
  "_score": 1,
  "_source": {
    "EXPENSE_CODE": "NL**20",
    "EXPENSE_CODE_DESCRIPTION": "DO NOT USE ************ - ADAM",
    "NO_OF_DEALS": 17
  }
}

```

Data Visualization Requirement:

There might be multiple indexed documents for every EXPENSE\_CODE

On Y Axis I need to display Max Of NO\_OF\_DEALS and On X Axis I need to display EXPENSE\_CODE

Max Of NO\_OF\_DEALS are not being populated but EXPENSE\_CODE is being populated.

 ![elastic-query](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d7ccd865c7a75a1b4b30da9def69fff88fa328a4.PNG)

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [June 4, 2018, 9:16pm UTC](https://discuss.elastic.co/t/kibana-5-4-0-vertical-bar-data-visualization-issue/134450/2 "2018-06-04T21:16:28Z")

</div>

This worked for me, I wonder if it's related to your index mappings.

Here is my setup:

```auto
DELETE discuss-134450

PUT /discuss-134450
{
  "mappings": {
    "_doc": {
      "properties": {
        "geo": {
          "properties": {
            "EXPENSE_CODE": {
              "type": "keyword"
            },
            "NO_OF_DEALS": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}

POST discuss-134450/_doc
{
  "EXPENSE_CODE": "TEST1",
  "NO_OF_DEALS": 1
}
POST discuss-134450/_doc
{
  "EXPENSE_CODE": "TEST1",
  "NO_OF_DEALS": 1
}
POST discuss-134450/_doc
{
  "EXPENSE_CODE": "TEST1",
  "NO_OF_DEALS": 1
}

POST discuss-134450/_doc
{
  "EXPENSE_CODE": "TEST2",
  "NO_OF_DEALS": 20
}

POST discuss-134450/_doc
{
  "EXPENSE_CODE": "TEST3",
  "NO_OF_DEALS": 50
}
POST discuss-134450/_doc
{
  "EXPENSE_CODE": "TEST3",
  "NO_OF_DEALS": 1
}

```

 ![26](https://us1.discourse-cdn.com/elastic/original/3X/3/2/3222199eb65152a5a4ae030e6f7a6158c18682f3.png)

Can you post your mappings for this index?

Here is an example from DevTools: `GET discuss-134450/_mapping`

---

<div class="post-metadata">

**Author:** ![Zamir\_Arif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zamir_arif/32/31894_2.png) [@Zamir\_Arif](https://discuss.elastic.co/u/Zamir_Arif)\
**Post date:** [June 5, 2018, 9:14am UTC](https://discuss.elastic.co/t/kibana-5-4-0-vertical-bar-data-visualization-issue/134450/3 "2018-06-05T09:14:30Z")

</div>

Thanks for the quick response.

Kibana is creating the index.

```
 {
"_index": ".kibana",
"_type": "index-pattern",
"_id": "deal-exp*",
"_score": 1,
"_source": {
	"title": "deal-exp*",
	"fields": """[
				{
					"name": "expense_code_description.keyword",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": true,
					"analyzed": false,
					"doc_values": true,
					"searchable": true,
					"aggregatable": true
				},{
					"name": "nr_of_deal.keyword",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": true,
					"analyzed": false,
					"doc_values": true,
					"searchable": true,
					"aggregatable": true
				},{
					"name": "expense_code",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": true,
					"analyzed": true,
					"doc_values": false,
					"searchable": true,
					"aggregatable": false
				},{
					"name": "expense_code.keyword",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": true,
					"analyzed": false,
					"doc_values": true,
					"searchable": true,
					"aggregatable": true
				},{
					"name": "expense_code_description",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": true,
					"analyzed": true,
					"doc_values": false,
					"searchable": true,
					"aggregatable": false
				},{
					"name": "_source",
					"type": "_source",
					"count": 0,
					"scripted": false,
					"indexed": false,
					"analyzed": false,
					"doc_values": false,
					"searchable": false,
					"aggregatable": false
				},{
					"name": "nr_of_deal",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": true,
					"analyzed": true,
					"doc_values": false,
					"searchable": true,
					"aggregatable": false
				},{
					"name": "EXPENSE_CODE_DESCRIPTION",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": true,
					"analyzed": true,
					"doc_values": false,
					"searchable": true,
					"aggregatable": false
				},{
					"name": "EXPENSE_CODE",
					"type": "string",
					"count": 1,
					"scripted": false,
					"indexed": true,
					"analyzed": true,
					"doc_values": false,
					"searchable": true,
					"aggregatable": false
				},{
					"name": "NO_OF_DEALS",
					"type": "number",
					"count": 1,
					"scripted": false,
					"indexed": true,
					"analyzed": false,
					"doc_values": true,
					"searchable": true,
					"aggregatable": true
				},{
					"name": "_id",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": false,
					"analyzed": false,
					"doc_values": false,
					"searchable": false,
					"aggregatable": false
				},{
					"name": "_type",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": false,
					"analyzed": false,
					"doc_values": false,
					"searchable": true,
					"aggregatable": true
				},{
					"name": "_index",
					"type": "string",
					"count": 0,
					"scripted": false,
					"indexed": false,
					"analyzed": false,
					"doc_values": false,
					"searchable": false,
					"aggregatable": false
				},{
					"name": "_score",
					"type": "number",
					"count": 0,
					"scripted": false,
					"indexed": false,
					"analyzed": false,
					"doc_values": false,
					"searchable": false,
					"aggregatable": false
				}
	]"""
}

```

}

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c80a0769f5a8d40708d8f23720f409c659e8c42b.PNG)

---

<div class="post-metadata">

**Author:** ![Zamir\_Arif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zamir_arif/32/31894_2.png) [@Zamir\_Arif](https://discuss.elastic.co/u/Zamir_Arif)\
**Post date:** [June 5, 2018, 2:30pm UTC](https://discuss.elastic.co/t/kibana-5-4-0-vertical-bar-data-visualization-issue/134450/4 "2018-06-05T14:30:02Z")

</div>

@tylersmalley I used the index you shared and mapped with my original index and it works.

```
POST _reindex
{
  "source": {
    "index": "deal-expense"
  },
  "dest": {
    "index": "discuss-134450"
  }
} 

```

By default when you add index to kibana it creates the number fields and keywords fields.

My questions are

why do I need to reindex the fields in this case?

When data will be added to original index then it will update the data with re-indexed indices?

---

<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 3, 2018, 2:30pm UTC](https://discuss.elastic.co/t/kibana-5-4-0-vertical-bar-data-visualization-issue/134450/5 "2018-07-03T14:30:19Z")

</div>

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