bar chart working?

This commit is contained in:
Gerard Burns 2024-04-18 08:13:56 +01:00
parent 257fde1481
commit b75d054cdd
1 changed files with 5 additions and 1 deletions

View File

@ -88,7 +88,7 @@
text: xAxisLabel
}
},
// bar charts in horizontal mode don't have a default setting for parsing the labels of dates, and will just spit out the unix epoch value. It also doesn't seem to respect any date based formatting properties passed in. So we'll just manualy format the labels, the chart still sorts the dates correctly in any case
// Providing `type: "datetime"` normally makes Apex Charts parse epochs nicely with no additonal config, but bar charts in horizontal mode don't have a default setting for parsing the labels of dates, and will just spit out the unix epoch value. It also doesn't seem to respect any date based formatting properties passed in. So we'll just manualy format the labels, the chart still sorts the dates correctly in any case
yaxis: {
labels: {
formatter: yAxisFormatter
@ -131,6 +131,10 @@
return formatters["Datetime"]
}
if (isLabelAxis) {
return formatters["Default"]
}
return formatters[valueUnits]
}