Chartjs-Angular-chart js time on x Axis is not comes in fraction

0👍

Since you told the chart that the xAxes was type “time”, the tick text will not be based on the data point values. It will be based on the minimum and maximum dates in the whole dataset, as well the other time properties being set. The actual data point times should show up in tooltips. If you want the minutes to show up in the ticks, change the unit to ‘minute’. Given you description, that will be too many ticks for your data. But when you specify the unit as ‘hour’, the ticks will only be on and exact hour boundary with zero minutes. The number of hours (units) between ticks should be handled by setting unitStepSize. I do not see why you would be getting 3 hour intervals. Are there more option settings that might affect that? Like maxTicksLimit?

Leave a comment