# Unable to change bar width in a canvas when x-axis is with timestamp

**URL:** https://discuss.elastic.co/t/unable-to-change-bar-width-in-a-canvas-when-x-axis-is-with-timestamp/341372
**Category:** Kibana
**Tags:** canvas
**Created:** [August 22, 2023, 1:20pm UTC](https://discuss.elastic.co/t/unable-to-change-bar-width-in-a-canvas-when-x-axis-is-with-timestamp/341372 "2023-08-22T13:20:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![KLM](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@KLM](https://discuss.elastic.co/u/KLM)
#### Post date: [August 22, 2023, 1:20pm UTC](https://discuss.elastic.co/t/unable-to-change-bar-width-in-a-canvas-when-x-axis-is-with-timestamp/341372/1 "2023-08-22T13:20:35Z")

</div>

It is not changing the bar width of a bar chart when x-axis show time.

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/1/51a053f21e4f23af4afb19f070987e2b99d7a5c7.png)

follows the code used to generate the graph

```auto
filters
| essql 
  query="SELECT HISTOGRAM("@timestamp", INTERVAL 10 MINUTES) as timestamp, count(*) as counts FROM "state" group by timestamp ORDER BY timestamp desc"
| pointseries x="timestamp" y="counts" color="timestamp"
| plot defaultStyle={seriesStyle bars=1 horizontalBars=false } yaxis={axisConfig show=true min=0 } xaxis={axisConfig min=1692707999900 max=1692709999900}
| render

```

How can I change the graph to be like below

 ![bars2](https://us1.discourse-cdn.com/elastic/original/3X/8/b/8bb59f2184fb437db439f652234f787b6954deb1.png)

Thanks

---

<div class="post-metadata">

### Author: ![Priscilla\_Parodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priscilla_parodi/32/43047_2.png) [@Priscilla\_Parodi](https://discuss.elastic.co/u/Priscilla_Parodi)
#### Post date: [August 22, 2023, 10:16pm UTC](https://discuss.elastic.co/t/unable-to-change-bar-width-in-a-canvas-when-x-axis-is-with-timestamp/341372/2 "2023-08-22T22:16:35Z")

</div>

Hello @KLM,

Have you tried updating the defaultStyle `seriesStyle bars=1` value to a higher value?

---

<div class="post-metadata">

### Author: ![KLM](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@KLM](https://discuss.elastic.co/u/KLM)
#### Post date: [August 23, 2023, 9:14am UTC](https://discuss.elastic.co/t/unable-to-change-bar-width-in-a-canvas-when-x-axis-is-with-timestamp/341372/3 "2023-08-23T09:14:51Z")

</div>

Yes tried it. but no effect, only when bars = 0 , lines will get disappeared, but for any other value can see the bar and can't see any significant difference in width when change the value of bars.

What I understood is, x axis is based on timestamp. So the line between two axis points has been divided into slots of milliseconds.

---

<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: [September 20, 2023, 9:15am UTC](https://discuss.elastic.co/t/unable-to-change-bar-width-in-a-canvas-when-x-axis-is-with-timestamp/341372/4 "2023-09-20T09:15:10Z")

</div>

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