# Axis Format bar chart Vision

**URL:** <https://forum.inductiveautomation.com/t/axis-format-bar-chart-vision/81730>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision, reporting\
**Created:** [November 9, 2023, 6:01pm UTC](https://forum.inductiveautomation.com/t/axis-format-bar-chart-vision/81730 "2023-11-09T18:01:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Gomez](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@Miguel\_Gomez](https://forum.inductiveautomation.com/u/Miguel_Gomez)\
**Post date:** [November 9, 2023, 6:01pm UTC](https://forum.inductiveautomation.com/t/axis-format-bar-chart-vision/81730/1 "2023-11-09T18:01:17Z")

</div>

Hi everyone,

I appreciate your help with this issue:

I'm doing a report with a bar chart in Vision but the date in the X-Axis is showed as it is in the database

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

I need to showed in different format, like 08-Nov-23, but I tried every where and I Can't see how to change it in the properties. I think this could be done scripting here:

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

I tried with some `getXAxes(data["mykey"])` with no success

If you have another way to show this dates in the report in a shorter form please help me.

Thank you

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 14, 2023, 2:29pm UTC](https://forum.inductiveautomation.com/t/axis-format-bar-chart-vision/81730/2 "2023-11-14T14:29:00Z")

</div>

> [@Miguel\_Gomez](#):
>
> I need to showed in different format,

The simplest approach would be to edit the query, so it returns the date labels in the format you want. The alternative would be to iterate through label column of the dataset and transform each date into the format you want.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [November 14, 2023, 2:47pm UTC](https://forum.inductiveautomation.com/t/axis-format-bar-chart-vision/81730/3 "2023-11-14T14:47:00Z")

</div>

I'm not sure if the reporting chart is an XYPlot or a Category Plot. Assuming that it's an XYPlot then you should be able to do something along the lines of this:

```auto
from java.text import SimpleDateFormat
axis = chart.plot.domainAxis
axis.setDateFormatOverride(SimpleDateFormat("dd-MMM-yy"))
chart.plot.setDomainAixis(axis)

```

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 14, 2023, 3:06pm UTC](https://forum.inductiveautomation.com/t/axis-format-bar-chart-vision/81730/4 "2023-11-14T15:06:05Z")

</div>

> [@lrose](#):
>
> the reporting chart

He said Vision Bar Chart, so I suspect that his use of the word report and his reporting tag are misleading.

---

<div class="post-metadata">

**Author:** ![Miguel\_Gomez](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@Miguel\_Gomez](https://forum.inductiveautomation.com/u/Miguel_Gomez)\
**Post date:** [November 16, 2023, 4:20pm UTC](https://forum.inductiveautomation.com/t/axis-format-bar-chart-vision/81730/5 "2023-11-16T16:20:10Z")

</div>

You are awesome!

I just did this:

`SELECT FORMAT(date,'MMM/dd')`

And my life changed 🥲

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

Thank you for your help!
