I have such an example in which I would like to change the series of data on the xaxis along with changing the formatting:
ApexCharts.exec("chartID", "updateOptions", {
xaxis: {
type: "datetime",
categories: dates_string_array,
tickAmount:5,
labels: {
show: true,
rotate: -45,
format: 'yyyy-MM-dd'}
},
});
The categories
substitution corrects (it is an array with dates as string) however, this formatting format: 'yyyy-MM-dd'
still doesn't work - the format is exactly what the dates in the dates_string_array
are in.
In this case, do I need to use formatter
to overwrite these values?
An example of default format one of array elements:
2022-01-01 10:00
I would like to format it like this:
2022-01-01