1
0
Fork 0
mirror of synced 2024-09-10 06:26:02 +12:00

bar chart working?

This commit is contained in:
Gerard Burns 2024-04-18 08:13:56 +01:00
parent 257fde1481
commit b75d054cdd

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]
}