# Canvas line chart with timeseries

**URL:** <https://discuss.elastic.co/t/canvas-line-chart-with-timeseries/210034>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [November 30, 2019, 4:29pm UTC](https://discuss.elastic.co/t/canvas-line-chart-with-timeseries/210034 "2019-11-30T16:29:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave.b](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@dave.b](https://discuss.elastic.co/u/dave.b)\
**Post date:** [November 30, 2019, 4:29pm UTC](https://discuss.elastic.co/t/canvas-line-chart-with-timeseries/210034/1 "2019-11-30T16:29:15Z")

</div>

Using Canvas on Kibana version 6.6.0. I'm new to canvas and struggling to display a line chart with counts over time. Below is the query I'm using. The time doesn't update whenever I change the time filter. I have the time filter using click\_time as its timestamp.

SELECT HISTOGRAM("click\_time", INTERVAL 1 hour) as dd, count(click\_id)  
, count(distinct member\_id)  
, count(distinct project\_code)  
, SUM(revenue)/count(distinct click\_id)\*100 as epc  
, SUM(revenue) as rev

FROM "mr\_monitor\*"  
WHERE customer='Prodege'  
group by dd

No matter if I select last 30 days, 60 days, or 24 hours the time frame in the line chart always shows last 2-3 days.

Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![corey.robertson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/corey.robertson/32/54611_2.png) [@corey.robertson](https://discuss.elastic.co/u/corey.robertson)\
**Post date:** [December 9, 2019, 7:04pm UTC](https://discuss.elastic.co/t/canvas-line-chart-with-timeseries/210034/2 "2019-12-09T19:04:48Z")

</div>

Hi @dave.b

Could you share the full expression that you are using for the line chart? If you select the line chart, there should be an "Expression Editor" link in the bottom right corner where you can see this expression.

---

<div class="post-metadata">

**Author:** ![dave.b](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@dave.b](https://discuss.elastic.co/u/dave.b)\
**Post date:** [December 9, 2019, 7:35pm UTC](https://discuss.elastic.co/t/canvas-line-chart-with-timeseries/210034/3 "2019-12-09T19:35:59Z")

</div>

Thanks for the response....

filters  
| essql  
query="SELECT HISTOGRAM("click\_time", INTERVAL 1 hour) as dd, count(click\_id)  
, count(distinct member\_id)  
, count(distinct project\_code)  
, SUM(revenue)/count(distinct click\_id)\*100 as epc  
, SUM(revenue) as rev

FROM "mr\_monitor\*"  
WHERE customer='First'  
group by dd  
"  
| mapColumn name="formatted\_dd" fn={getCell "dd" | formatdate "M/D"}  
| pointseries x="dd" y="COUNT\_click\_id\_"  
| plot defaultStyle={seriesStyle lines=3} yaxis=true  
| render containerStyle={containerStyle}

---

<div class="post-metadata">

**Author:** ![corey.robertson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/corey.robertson/32/54611_2.png) [@corey.robertson](https://discuss.elastic.co/u/corey.robertson)\
**Post date:** [December 10, 2019, 2:04pm UTC](https://discuss.elastic.co/t/canvas-line-chart-with-timeseries/210034/4 "2019-12-10T14:04:42Z")

</div>

Nothing immediately jumps out at me as to what could be causing this based on that expression.

Couple of things to check.

1. If you remove everything from the expression after the query, does the resulting table have the expected date-filtered data in it?
2. If you delete everything and start over, does the issue remain? Canvas was in a beta until 6.8, and I know there were some issues with some filtering in some of those earlier releases.

---

<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:** [January 7, 2020, 2:09pm UTC](https://discuss.elastic.co/t/canvas-line-chart-with-timeseries/210034/5 "2020-01-07T14:09:37Z")

</div>

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