# Bars distance in XY Chart

**URL:** <https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914>\
**Category:** Ignition\
**Tags:** perspective, ignition81, ignition80\
**Created:** [January 12, 2022, 7:44am UTC](https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914 "2022-01-12T07:44:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shabir.ahmed](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shabir.ahmed](https://forum.inductiveautomation.com/u/shabir.ahmed)\
**Post date:** [January 12, 2022, 7:44am UTC](https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914/1 "2022-01-12T07:44:38Z")

</div>

Hi Experts,  
I have set my XY-Chart to Bar Graph, its showing Bars correctly while Y axis is consumption and X-axis is Week number. When I have added multiple series to display as Bars, the distance between bars is significantly more and user can’t distinct between records from Week one or week 2 due to scattered bars. It should be close to each other for a specific week. Can anyone let me know I can achieve it in XY Chart. Below is the picture of how my data is being represented.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/9/49066bc994a0554ed73a52b4d6b30294bb74f743.png)

Here is the result I am looking for:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/1/9176c5d492e9b1a08b09da1d92d52507f3834506.png)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 12, 2022, 9:28am UTC](https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914/2 "2022-01-12T09:28:55Z")

</div>

The issue was raised in [How to add space between category bars - XY Chart](https://forum.inductiveautomation.com/t/how-to-add-space-between-category-bars-xy-chart/47966) and the fix is a bit of a kludge. (The solution was to add in some non-displaying columns using a binding transform.)

To get the columns to touch set `PROPS.series.0.column.appearance.width` = 100. Repeat for the columns 1, 2, etc.

---

<div class="post-metadata">

**Author:** ![shabir.ahmed](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@shabir.ahmed](https://forum.inductiveautomation.com/u/shabir.ahmed)\
**Post date:** [January 12, 2022, 10:04am UTC](https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914/3 "2022-01-12T10:04:15Z")

</div>

> [@Transistor](#):
>
> PROPS.series.0.column.appearance.width

Thanks a ton Dear for your help. I can have bars together now by putting width to 90 (100 was looks bit overlapping columns). It would be great to have space after each category. Any thoughts on that. I have seen the post it looks I should add blank series in each category in my case it would be tougher.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/40bbf47d478e93a494aabb3c86bf75a0c7b9f746.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d3438c62802f546ede64a6fae1ddf122b86bbd41.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 12, 2022, 11:33am UTC](https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914/4 "2022-01-12T11:33:41Z")

</div>

I’ve never used more than one data source. All the results come out of my one query.  
Try adding another dataSource, `ds_blank` with array entries 0 and 1 `week : 0`.

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [January 12, 2022, 1:48pm UTC](https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914/5 "2022-01-12T13:48:38Z")

</div>

Hi @shabir.ahmed, It’s a bit of a fudge, but I managed to achieve it by creating 2 dummy datasources where the value for ‘Cons’ was zero for all instances and then creating them as the first and last series:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/a/4a1428fb0dc048677af0cbf6f50665d7dd5a0d7e.png)

When doing this make sure the dummy series have their tooltips disabled and the column fill & stroke width & opacity set to zero.

Also note that you can’t really control the gap between the groups ☹

Let me know if you need further guidance.

---

<div class="post-metadata">

**Author:** ![jiyoung\_hwang1](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@jiyoung\_hwang1](https://forum.inductiveautomation.com/u/jiyoung_hwang1)\
**Post date:** [April 18, 2023, 10:32am UTC](https://forum.inductiveautomation.com/t/bars-distance-in-xy-chart/54914/7 "2023-04-18T10:32:23Z")

</div>

I am a first-time user of Ignition.

I'm not sure what you mean.

can you give me more details?
