Formatting Dates in a Report Bar Chart

Hi, I am creating a report using Historical Tags. In this report, I'd like to have a bar chart displaying my data. When I created this chart, the dates along the x-axis are very long and illegible.
reportbargraph
I was able to create a similar bar chart in a Vision client, where I was able to create a new dataset and format the timestamps.
visionbargraph
Is there any way to format my timestamps in a report to look similar to the ones in my Vision client?

In a brief search, I wasn't able to find a good way through the configureChart extension function for a category chart.

Assuming 7.9.7 or later, you could try adding a Script Data Source after the Tag Historian Data Source with this script

def updateData(data, sample):
	data['formattedData'] = system.dataset.formatDates(data['originalData'].coreResults, 'MM/dd')

Then change the Data Key on the chart to formattedData

1 Like