Closed ggrote closed 1 week ago
I thought these lines are only for categories. But you are right they can be numbers too.
I think that should be it. Any chance to integrate the changes? And maybe you can answer my question at vue3-apexcharts (https://github.com/apexcharts/vue3-apexcharts/issues/106)?
@ggrote I am thinking of merging datetimeFormatter and numberFormatter together and provide a generic formatter. It is going to be a breaking change, so I am still thinking about it. Thanks for the contribution.
Okay, how do you want to know which value should be formatted? By type? Anything I can help you with?
instead of dateFormatter and numberFormatter, I have used the correct namings.
The new properties will be categoryFormatter
for x value and valueFormatter
and y values
chart: {
toolbar: {
export: {
csv: {
categoryFormatter: (cat) => (cat),
valueFormatter: (val) => (val),
},
},
}
}
Docs will be updated after the new release
New Pull Request
We needed the numbers in a csv export to be formatted correctly with a comma as a decimal separator. So I thought it would be a good way to implement a numberFormatter like the dateFormatter for the CSV Export.
Type of change
Please delete options that are not relevant.
Checklist:
Sorry, I don't know how to write unit tests.