You must be logged in to post your query.
Home › Forums › Chart Support › chart is not loading when intervaltype is change
Tagged: Line charts
Hello,
chart not loading when i change intervalType if i change intervalType-> minutethen data is loading in chart but if i change intervalType-> hourthen data is not loading in chart
intervalType
minute
hour
hear example https://jsfiddle.net/13hola/tvds6n2f/16/
window.onload = function () { var chart = new CanvasJS.StockChart("chartContainer", { zoomEnabled: true, title:{ text: "Chart With Date-Time Stamps Inputs" }, axisX: { interval: 2, intervalType: "minute", title: "time", }, data: [ { "color": "#E9BD26", "dataPoints": [ { "x": 1673420752830, "y": 200 }, { "x": 1673420588986, "y": 13 } ], "name": "PAO2", "type": "line", "xValueType": "dateTime" } ] }); chart.render(); }
window.onload = function () { var chart = new CanvasJS.StockChart(“chartContainer”, { zoomEnabled: true,
title:{ text: “Chart With Date-Time Stamps Inputs” }, axisX: { interval: 2, intervalType: “minute”, title: “time”, },
data: [ { “color”: “#E9BD26”, “dataPoints”: [ { “x”: 1673420752830, “y”: 200 }, { “x”: 1673420588986, “y”: 13 } ], “name”: “PAO2”, “type”: “line”, “xValueType”: “dateTime” } ] });
chart.render(); }
@kishanbhola1311gmail-com,
The range between the datapoints in your example is in minutes, however, you are setting the intervalType to hour, due to which axis labels are missing since labels are outside the viewport range. Setting x-axis viewportMinimum seems to be working fine in your case.
Please check this JSFiddle for a working example.
— Thangaraj Raman Team CanvasJS
You must be logged in to reply to this topic. Login/Register