Is it possible to fix the Xaxis label like with fixed interval for example in hour, 1:00 2:00 3:00 ….. 24:00 format for live chart ? Where x, y values from database are live value. pls give ur suggestion.
Thank you so much It works fine. Once again thank you for ur immediate reply.
Herewith, pls refer this image of My output https://imgur.com/a/1vmfrJ7.
still im getting the same result after giving xValueType. i am getting temp value and time in unixtimeform (integer). <script> window.onload = function () {
var chart = new CanvasJS.Chart(“chartContainer”, { animationEnabled: true, exportEnabled: true, theme: “light1”, // “light1”, “light2”, “dark1”, “dark2” title:{ text: “PHP Line Chart from Database” }, axisX:{ title: “time”,
labelAngle: -60 }, data: [{type: “line”, xValueFormatString: “HH mm ss”, xValueType:”datetime”, dataPoints: <?php echo json_encode($dataPoints, JSON_NUMERIC_CHECK); ?>}] }); chart.render();
} </script>