Home Forums Chart Support chart is not loading when intervaltype is change

chart is not loading when intervaltype is change

Viewing 4 posts - 1 through 4 (of 4 total)
  • #41924

    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

    hear example
    https://jsfiddle.net/13hola/tvds6n2f/16/

    #41925
    
      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();
      }
      
    #41926

    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();
    }

    #41945

    @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

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.