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
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:
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.
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.
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:
from java.text import SimpleDateFormat
axis = chart.plot.domainAxis
axis.setDateFormatOverride(SimpleDateFormat("dd-MMM-yy"))
chart.plot.setDomainAixis(axis)