Chartjs-Is it possible to pot a line chart of date vs time in ChartJS?

0đź‘Ť

âś…

Unfortunately it is not possible to use a time scale on both the x and y axis. Per the api docs…

The time scale is used to display times and dates. It can only be placed on the X axis. 

If you really need to do this (I’m having trouble thinking​ of a use for this), then you could try using a time scale for your X axis and a category scale for your Y axis.

Just generate string values from your date data for the y value in your dataset object ({x: new Date(), y: 'May 2017'}).

Leave a comment