I'm attempting to create a line graph that should show an x and y axis that are both numbers to the second decimal. Say I pass a min of 0.0345
and a max of 5.2345
, I would expect the first number on the x axis to be 0.035
and the last number on the x axis to be 5.23
, however it shows me 0.00
and 6.00
, why is this happening?
here is the xaxis
portion of my chart options:
xaxis: {
type: 'category',
categories: [],
min: this.min,
max: this.max,
stepSize: 0.5,
title: {
text: 'Label'
},
labels: {
formatter: function (val) {
return val.toFixed(2);
}
},
}
Another thing that's happening is that the stepSize
option doesn't do anything! I am trying to do steps by .5 but it still steps up by whole integers. Any idea why?
Can share whatever code is relevant, let me know
I'm attempting to create a line graph that should show an x and y axis that are both numbers to the second decimal. Say I pass a min of 0.0345
and a max of 5.2345
, I would expect the first number on the x axis to be 0.035
and the last number on the x axis to be 5.23
, however it shows me 0.00
and 6.00
, why is this happening?
here is the xaxis
portion of my chart options:
xaxis: {
type: 'category',
categories: [],
min: this.min,
max: this.max,
stepSize: 0.5,
title: {
text: 'Label'
},
labels: {
formatter: function (val) {
return val.toFixed(2);
}
},
}
Another thing that's happening is that the stepSize
option doesn't do anything! I am trying to do steps by .5 but it still steps up by whole integers. Any idea why?
Can share whatever code is relevant, let me know
Share Improve this question asked Nov 21, 2024 at 1:23 rovacrovac 2,1036 gold badges30 silver badges59 bronze badges1 Answer
Reset to default 0I FIGURED IT OUT!!! The type
has to be set to numeric
, found the answer in an old apexcharts bug report from 2021 LOL