# Any suggestion of using kibana to create a burndown chart?

**URL:** https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300
**Category:** Kibana
**Created:** [August 24, 2017, 11:00pm UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300 "2017-08-24T23:00:09Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![capaneus](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@capaneus](https://discuss.elastic.co/u/capaneus)
#### Post date: [August 24, 2017, 11:00pm UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/1 "2017-08-24T23:00:09Z")

</div>

Hi,  
I'm looking to see if it's possible to create burn down chart with Kibana. So for a burndown chart, it can be defined as open issue of the day(time), which means count or sum specified fields, aggregate with time/date, and filter out the resolved ones of each day/time.  
Is it possible to provide some suggestion or example to see if this is achievable?

---

<div class="post-metadata">

### Author: ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)
#### Post date: [August 25, 2017, 5:40am UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/2 "2017-08-25T05:40:13Z")

</div>

Burnout charts are not available out of the box, but you might be able to achieve the same with timelion or tsvb ?

If i understand correctly, you want a date histogram (with daily interval). For metric you want to select sum of some field. Now the only problem this has is that its not filtering out the resolved ones ?  
add a query to the query bar with something like `status: resolved`

---

<div class="post-metadata">

### Author: ![capaneus](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@capaneus](https://discuss.elastic.co/u/capaneus)
#### Post date: [August 25, 2017, 9:48am UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/3 "2017-08-25T09:48:42Z")

</div>

Thanks for the suggestions, I will try this and let you know

---

<div class="post-metadata">

### Author: ![capaneus](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@capaneus](https://discuss.elastic.co/u/capaneus)
#### Post date: [August 31, 2017, 1:36pm UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/4 "2017-08-31T13:36:11Z")

</div>

Hi Peter,  
Sorry I have been reading docs and still have trouble to figure out a clue how to construct the query. Logically it can be calculated in following steps:

1. get the date range, interval by day, so here is what I did, seems working:  
{  
"aggs": {  
"updated\_over\_time": {  
"date\_histogram": {  
"field": "updated",  
"interval": "day"  
}  
}  
}  
}

it give me buckets like this:  
"buckets": [  
{  
"key\_as\_string": "2015-09-30T00:00:00.000Z",  
"key": 1443571200000,  
"doc\_count": 1  
},

1. Compare all the documents with field "Created" against the data range, if the created date is smaller that date in each data range bucket, then it counted, if created date is larger than the date in each bucket, then it's not counted.  
I'm kind of stuck here, couldn't figure out a way to use the key in bucket as a variable for comparasion.

2. Compare all documents with field "resolved" against the data range, if resolved date is larger than the date in each bucket, then it's counted.

3. Use the total created count to deduct the resolved count in each bucket, this will be opened issue count in that bucket, and this number can be used to create the burndown.

I tried to figure out a way to achieve this by reading the doc, but really have no clue. Is it possible to give me some hint or point me to the learning source?

Thanks!

---

<div class="post-metadata">

### Author: ![capaneus](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@capaneus](https://discuss.elastic.co/u/capaneus)
#### Post date: [August 31, 2017, 4:47pm UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/5 "2017-08-31T16:47:12Z")

</div>

Post some progress here:  
I manage to get 2 date\_histogram, 1 is accumulated count for created issues by day, the other is accumulated count for resolved issues by day, is there way to have created issue - resolved issue, then the remaining ones should be the opened ones by day.

 ![created](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8eed838860687f6136a73166d547a7f04311a4a4.png)  
 ![resolved](https://us1.discourse-cdn.com/elastic/original/3X/1/1/11fe0308662b766621556e61f43da36c98338c7d.png)

---

<div class="post-metadata">

### Author: ![capaneus](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@capaneus](https://discuss.elastic.co/u/capaneus)
#### Post date: [September 1, 2017, 2:48pm UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/6 "2017-09-01T14:48:58Z")

</div>

Sorry for the spam, reply to this thread again, so I tried to  
GET \_search  
{  
"size": 0,  
"aggs": {  
"result": {  
"terms": {  
"script": "'trick'"  
},  
"aggs": {  
"updated\_dates":{  
"date\_histogram": {  
"field": "updated",  
"interval": "day"  
}  
},

```
    "created_count_byDay": {
      "date_histogram": {
        "field": "created",
        "interval": "day"
      },
      "aggs": {
        "created_count": {
          "value_count": {
            "field": "issuetype.name.keyword"
          }
        },
        "cumulative_count_created": {
          "cumulative_sum": {
            "buckets_path": "created_count"
          }
        }
      }
    },
    "resolved_count_byDay": {
      "date_histogram": {
        "field": "resolutiondate",
        "interval": "day"
      },
      "aggs": {
        "resolved_count": {
          "value_count": {
            "field": "issuetype.name.keyword"
          }
        },
        "cumulative_count_resolved": {
          "cumulative_sum": {
            "buckets_path": "resolved_count"
          }
        }
      }
    },
    "final_result": {
      "bucket_script": {
        "buckets_path": {
          "resolvedByDay": "resolved_count_byDay>cumulative_count_resolved",
          "createdByDay" : "created_count_byDay>cumulative_count_created"
        },
        "script": "params.createdByDay - params.resolvedByDay"
      }
    }
  }
}

```

}  
}  
but it give me  
"buckets\_path must reference either a number value or a single value numeric metric aggregation, got: java.lang.Object[]"  
Is there any way to merge the 2 multi buckets?

---

<div class="post-metadata">

### Author: ![capaneus](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@capaneus](https://discuss.elastic.co/u/capaneus)
#### Post date: [September 11, 2017, 10:26am UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/7 "2017-09-11T10:26:46Z")

</div>

Issue resolved with timelion

---

<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 9, 2017, 10:27am UTC](https://discuss.elastic.co/t/any-suggestion-of-using-kibana-to-create-a-burndown-chart/98300/8 "2017-10-09T10:27:01Z")

</div>

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