chart.js time series x-axis shows wrong ticks
Chart.js 4.4.1, React wrapper (react-chartjs-2 5.2). Time series chart with data points over a 6-hour window. The x-axis (type: 'time') shows weird tick labels - sometimes just hours without context, sometimes duplicate dates, and the spacing is uneven. I registered the adapters (chartjs-adapter-date-fns) and set parsing: false with data as {x: timestamp, y: value}. My timestamps are unix seconds (e.g. 1700000000). Is Chart.js expecting milliseconds? Also ticks are too dense - how do I control the time unit shown (hours vs days) based on zoom?
4 replies