# Display graph to show the average time spent in a camel route

**URL:** <https://discuss.elastic.co/t/display-graph-to-show-the-average-time-spent-in-a-camel-route/74500>\
**Category:** Kibana\
**Created:** [February 9, 2017, 12:58pm UTC](https://discuss.elastic.co/t/display-graph-to-show-the-average-time-spent-in-a-camel-route/74500 "2017-02-09T12:58:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [February 9, 2017, 6:41pm UTC](https://discuss.elastic.co/t/display-graph-to-show-the-average-time-spent-in-a-camel-route/74500/2 "2017-02-09T18:41:16Z")

</div>

Hi Paul,

This is not something very easy to do with Kibana. I think you would have to write some JSON scripting. See this thread for an example;

> [@Display concurrency in data on Kibana](https://discuss.elastic.co/t/display-concurrency-in-data-on-kibana/26006/12):
>
> I also tried this but it doesn't remove the field parameter as promised. With the following json input: { "interval":"minute", "script": "start = doc['recordStart'].value; duration = doc['recordDuration'].value; l = []; for (long i = 0; i \< duration; i += 60000) { l.add(start + i); }; return l;", "field":null, "lang": "groovy" } I get the following request "aggs": { "2": { "date\_histogram": { "field": null, "interval": "minute", "pre\_zone": "+02:00", "pre\_zone\_adjust\_large…

---

_[View the full topic](https://discuss.elastic.co/t/display-graph-to-show-the-average-time-spent-in-a-camel-route/74500)._
