I have a dynamically populated line chart with time-series data. If I don't add the divisor, it adds every time period in the x-axis. But when I define a divisor, the auto-generated x-axis ticks are some kind of defaults because they're not using my dates at all:
My options:
const chartOptions = {
chartPadding: 0,
height: 300,
showArea: true,
axisX: {
showGrid: false,
type: Chartist.FixedScaleAxis,
divisor: 10,
labelInterpolationFnc: function (value) {
return new Date(value).toLocaleDateString('en-GB', {
month: 'short',
year: 'numeric',
})
}
},
fullWidth: true,
}