I want to format the date string when displaying a chart. I’m able to format date strings for Table date (pivot table) view using
customizeCell. But It seems like that doesn’t get applied when showing charts.
Is there any way to format dates in Charts? Would need this on the chart itself, the legend, etc.
Our team would like to kindly inform you that the
customizeCell API call is dedicated to the grid customization and is not applied when switching to charts.
We would like to kindly suggest you check out the following set of properties allowing to specify the date and time formatting both for grid and charts:
datePatternis used to format “date string” date fields (
"type": "date string"in JSON, “ds+”
prefix in CSV). Default pattern string:“dd/MM/yyyy”`.
dateTimePatternis used to format “datetime” date fields (
"type": "datetime"in JSON,
"dt+"prefix in CSV). Default pattern string:
timePatternis used to format “time” date fields (
"type": "time"in JSON,
"t+"prefix in CSV). For more details refer to the time pattern section. Default pattern string:
Detailed information about properties and about the pattern syntax itself can be found in our documentation.
Please check out an example using the
datePattern property in order to apply formatting both for the grid and charts.
We hope it helps.
Do not hesitate to contact us in case additional questions on this point occur.