I’m using a trial version of the Reporting module but have a licence for the rest of the Ignition modules I’m using (8.0.5)
I’d like to format the dates (the X axis values) on a Timeseries Graph in a very specific manner.
I want the date and time formatted as follows:
Where they are on different lines. Here’s a photo for reference:
I tried to format the date and time in this way in the properties of the Timeseries Chart, under Date Format. Entering “yyyy/MM/dd hh:mm:ss” will successfully format the date and time as such, but adding a newline character to the format (“yyyy/MM/dd \n hh:mm:ss”) instead shoots an error “Bad date format” in the console.
I wrote a little script in the Timeseries Chart script window as follows:
def configureChart(data, chart):
df = java.text.DateFormat.getDateTimeInstance()
plt = chart.getXYPlot()
ax = plt.getDomainAxis()
df.applyPattern(“yyyy/MM/dd \n HH:mm:ss”)
I expected that being able to specify the format as a string would allow the newline character to be picked up properly and included in the formatting but alas, it doesn’t work. (it does work to format the date and time, the newline character is just ignored entirely)
Is this just a feature which hasn’t been implemented? Or have I done something wrong?
Also, is there a way to change the size and font of the text on the X axis? I notice that there is a simple property to change the size and font of the Y axis, but the same cannot be said for the X axis.
Any insight would be much appreciated,