cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Bar Chart xAxis Data Formatting

rnfonseca
8-Gravel

Bar Chart xAxis Data Formatting

Hello everyone,

 

I've noticed that on the Bar Chart widget, it's not possible to format the xAxis format. In my case I'm using a DATETIME for the xAxis and I would like to display it as ('MM:dd') and by default this is applied as ('yyyy-MM-dd'). (See image in attachment).

 

Are there any workarounds for this matter? I'm using ThingWorx v9.1

 

Best regards,

 

 

 

3 REPLIES 3
anarwal
12-Amethyst
(To:rnfonseca)

Hi @rnfonseca , You can modify the service code mentioned in below link to get only dd:MM format.

 

https://www.ptc.com/en/support/article/CS320887 

cdias
5-Regular Member
(To:anarwal)

Hello @anarwal ,

 

The code you provided is for the Label Chart (not sure if it's applicable to Bar Chart widgets). And it works around the issue. It casts the DATETIME to a STRING value and formats it. If I wanted to I could have created a datashape with a Date under a STRING format, and passed it to the Bar Chart. I was asking for a cleaner way to do it.


Hello @cdias,

 

Have you tried using the Schedule Chart Widget. You can define the xAxis format by changing the TimeAxisDateFormatToken using MM-dd.

 

Hope it helps,

Top Tags