# Gauge chart with maximum range as the total number of documents

**URL:** https://discuss.elastic.co/t/gauge-chart-with-maximum-range-as-the-total-number-of-documents/275015
**Category:** Kibana
**Created:** [June 5, 2021, 7:45am UTC](https://discuss.elastic.co/t/gauge-chart-with-maximum-range-as-the-total-number-of-documents/275015 "2021-06-05T07:45:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aswanth\_jabba](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@aswanth\_jabba](https://discuss.elastic.co/u/aswanth_jabba)
#### Post date: [June 5, 2021, 7:45am UTC](https://discuss.elastic.co/t/gauge-chart-with-maximum-range-as-the-total-number-of-documents/275015/1 "2021-06-05T07:45:47Z")

</div>

I want to create a Gauge chart, consider I have a field named _ **state** _ and I want to represent the maximum range as total number of records and one value in the field _ **state** _ is _closed_, Now I want to represent it as the percentage of total records. And also I want to have four color ranges based of percentage 0-25%, 25-50%,50-75%,75-100%.

_ **Note :** _ Field _ **state** _ is string data type

Please let me know if this would be possible.

Thanks,  
Aswanth Jabba.

---

<div class="post-metadata">

### Author: ![aswanth\_jabba](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@aswanth\_jabba](https://discuss.elastic.co/u/aswanth_jabba)
#### Post date: [June 5, 2021, 12:48pm UTC](https://discuss.elastic.co/t/gauge-chart-with-maximum-range-as-the-total-number-of-documents/275015/2 "2021-06-05T12:48:09Z")

</div>

I found a way to do this, I used filter ratio to get the percentage

---

<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, 2021, 12:48pm UTC](https://discuss.elastic.co/t/gauge-chart-with-maximum-range-as-the-total-number-of-documents/275015/3 "2021-07-03T12:48:59Z")

</div>

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