# How to plot two different fields in one bar chart?

**URL:** <https://discuss.elastic.co/t/how-to-plot-two-different-fields-in-one-bar-chart/99376>\
**Category:** Kibana\
**Created:** [September 5, 2017, 6:53am UTC](https://discuss.elastic.co/t/how-to-plot-two-different-fields-in-one-bar-chart/99376 "2017-09-05T06:53:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Melvyn\_Peignon](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@Melvyn\_Peignon](https://discuss.elastic.co/u/Melvyn_Peignon)\
**Post date:** [September 5, 2017, 6:53am UTC](https://discuss.elastic.co/t/how-to-plot-two-different-fields-in-one-bar-chart/99376/1 "2017-09-05T06:53:25Z")

</div>

I want to do a chart like this:

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

So I have two fields "rest\_of\_the\_world" and "china" that I want to display on the same bar chart. The Y axis is supposed to be the number of document that contain a X value (a count).

So for instance I have 150 documents that have "1996" in the field "rest\_of\_the\_world" and "15 documents that has "1996" in the field "china".

Is it possible to do such a chart with Kibana? And will it be possible to plot the difference between the two?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [September 5, 2017, 3:32pm UTC](https://discuss.elastic.co/t/how-to-plot-two-different-fields-in-one-bar-chart/99376/2 "2017-09-05T15:32:07Z")

</div>

This is possible with timelion, [https://www.elastic.co/guide/en/kibana/current/timelion.html](https://www.elastic.co/guide/en/kibana/current/timelion.html).

---

<div class="post-metadata">

**Author:** ![Melvyn\_Peignon](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@Melvyn\_Peignon](https://discuss.elastic.co/u/Melvyn_Peignon)\
**Post date:** [September 5, 2017, 3:34pm UTC](https://discuss.elastic.co/t/how-to-plot-two-different-fields-in-one-bar-chart/99376/3 "2017-09-05T15:34:22Z")

</div>

Isn't this for time series data? In my case it is an integer not a date

---

<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 3, 2017, 3:34pm UTC](https://discuss.elastic.co/t/how-to-plot-two-different-fields-in-one-bar-chart/99376/4 "2017-10-03T15:34:28Z")

</div>

Closed on October 3, 2017, 3:34pm UTC

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