# Create visualization in Kibana

**URL:** <https://discuss.elastic.co/t/create-visualization-in-kibana/250109>\
**Category:** Kibana\
**Created:** [September 27, 2020, 9:41pm UTC](https://discuss.elastic.co/t/create-visualization-in-kibana/250109 "2020-09-27T21:41:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![malsioufi](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@malsioufi](https://discuss.elastic.co/u/malsioufi)\
**Post date:** [September 27, 2020, 9:41pm UTC](https://discuss.elastic.co/t/create-visualization-in-kibana/250109/1 "2020-09-27T21:41:09Z")

</div>

I have a csv file with data structure something like this  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/2/925e435b68a81da21226d4dfab159c427825c56f.png)

I managed to ingest this data to elasticsearch via the import interface in Kibana. and now I have an index "example" with a related index pattern and the documents look something like this

![image](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1a1a7e1fe2609653c5613eecaf68499d31d2bca1.png)

I am trying to visualize this data in a heatmap something like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/f/df13c7fe57d8232d5b2a291ff4bc2ccf91e94928.png)

Is that doable in Kibana? where one variable is on y-axis and the other variables are on x-axis and the values are shown as a heatmap. If not, what is another way to visualize this data in Kibana?

I am using the latest version of Elasticsearch and Kibana (7.9.2).

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [September 30, 2020, 9:10am UTC](https://discuss.elastic.co/t/create-visualization-in-kibana/250109/2 "2020-09-30T09:10:26Z")

</div>

This is possible, but you would have to split up the individual documents for each cell:

```auto
{ "v0": "A", "key": "v1", "value": 1 }

```

```auto
{ "v0": "A", "key": "v2", "value": 1 }

```

```auto
{ "v0": "A", "key": "v3", "value": 1 }

```

```auto
{ "v0": "B", "key": "v1", "value": 2 }

```

...

Then you can use a "terms" operation on the v0 field for the y axis and a terms operation on the "key" field for the x axis

---

<div class="post-metadata">

**Author:** ![malsioufi](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@malsioufi](https://discuss.elastic.co/u/malsioufi)\
**Post date:** [October 2, 2020, 7:06am UTC](https://discuss.elastic.co/t/create-visualization-in-kibana/250109/3 "2020-10-02T07:06:47Z")

</div>

Thanks flash1293 for the proposed solution, I think this is the only way to do it for now, but I was more into a solution that does not push me to change the structure of my data, thanks!

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [October 2, 2020, 7:22am UTC](https://discuss.elastic.co/t/create-visualization-in-kibana/250109/4 "2020-10-02T07:22:35Z")

</div>

You might be able to achieve a similar visualization without changing your data structure by using vega: [https://www.elastic.co/guide/en/kibana/current/vega-graph.html](https://www.elastic.co/guide/en/kibana/current/vega-graph.html)

It allows you to specify your Elasticsearch query manually, then takes a vega spec to turn it into a chart. It's very flexible but has a pretty steep learning curve.

---

<div class="post-metadata">

**Author:** ![malsioufi](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@malsioufi](https://discuss.elastic.co/u/malsioufi)\
**Post date:** [October 2, 2020, 11:55am UTC](https://discuss.elastic.co/t/create-visualization-in-kibana/250109/5 "2020-10-02T11:55:27Z")

</div>

That also a good solution, but I went with your other answer as I found it easier for my case 😅 thanks very much!

---

<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:** [October 30, 2020, 11:55am UTC](https://discuss.elastic.co/t/create-visualization-in-kibana/250109/6 "2020-10-30T11:55:28Z")

</div>

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