I'm trying to render a line chart with 24 hours of data (collected every 30 seconds). I can't figure out from the docs how to get it to scale nicely.
The docs say:
When building its ticks, it will automatically calculate the most comfortable unit base on the size of the scale.
But I can't get my line chart to scale "comfortably". I'm not sure it's what they mean, but I get far too many data points to render nicely. So I guess I'm looking for a way to drop data points (using chartjs, not hand rolled).
I'm doing something like this with my options;
const options = {
spanGaps: false,
scales: {
xAxes: [{
type: 'time',
time: {
displayFormats: {
quarter: 'HH:mm'
}
}
}]
}
};
Any pointers where to look?
radius: 0
under your line data. (Ticks are the dates below your chart (which seem quite comfortable), so they are not relevant to your problem.) – Ybarra