Home forums Using CanvasJS X Axis : display real system time Reply To: X Axis : display real system time

#4876

Sunil Urs
Keymaster

Yes, it is possible to show date & time on x axis. Just set the x value to current time just before adding it to the dataPoints array. Below is how it would look.

chart.options.data[0].dataPoints.push({x: new Date(), y: 5});

And set valueFormatString to “hh:mm:ss.


Sunil Urs