Home › Forums › Chart Support › CanvasJS crashed with JS script running in PhantomJS to build chart PNG image.

CanvasJS crashed with JS script running in PhantomJS to build chart PNG image.

Viewing 3 posts - 1 through 3 (of 3 total)
  • #60617

    Snippet of CanvasJS script. I tried JSFiddle and it hangs and show white screen. Please take a look to see what is incorrect

    var chart = new CanvasJS.Chart(“chartContainer”, {
    animationEnabled: false,
    interactivityEnabled: false,
    theme: “light2”,
    axisX:{
    interval: 20,
    margin: 1
    },
    axisY: {
    lineThickness: 1,
    interval: 2,
    minimum: -0.2,
    gridThickness: 0
    },
    title:{
    text: “ACTB”,
    dockInsidePlotArea: true,
    horizontalAlign: “left”
    },
    data: [
    {
    type: “line”,
    lineDashType: “solid”,
    lineColor: “black”,
    markerType: “none”,
    highlightEnabled: false,
    dataPoints: [{y:974.107,x:1.0},{y:1151.8,x:2.0},{y:728.024,x:3.0},{y:95.467,x:4.0},{y:-20.934,x:5.0},{y:-215.147,x:6.0},{y:-269.922,x:7.0},{y:-368.417,x:8.0},{y:-433.661,x:9.0},{y:-306.156,x:10.0},{y:-82.244,x:11.0},{y:167.387,x:12.0},{y:351.486,x:13.0},{y:354.117,x:14.0},{y:675.528,x:15.0},{y:1275.94,x:16.0},{y:1765.133,x:17.0},{y:2724.983,x:18.0},{y:3949.707,x:19.0},{y:5883.15,x:20.0},{y:9219.812,x:21.0},{y:15196.974,x:22.0},{y:26288.947,x:23.0},{y:46820.047,x:24.0},{y:83601.68,x:25.0},{y:148197.781,x:26.0},{y:250412.625,x:27.0},{y:395178.0,x:28.0},{y:580897.688,x:29.0},{y:788118.563,x:30.0},{y:988162.688,x:31.0},{y:1164929.125,x:32.0},{y:1309372.375,x:33.0},{y:1417931.875,x:34.0},{y:1495343.0,x:35.0},{y:1544187.375,x:36.0},{y:1577491.25,x:37.0},{y:1599392.75,x:38.0},{y:1612953.125,x:39.0},{y:1625994.375,x:40.0}]
    }
    ]
    });
    chart.render();
    chart.exportChart({format: “png”});
    });

    #60618

    I was able to get this working after changing interval to accommodate larger plotting Y values
    axisY: {
    lineThickness: 1,
    interval: 500000,
    minimum: -0.2,
    gridThickness: 0
    },

    You can close this ticket

    #60624

    @erich,

    Glad that you were able to figure it out.

    —
    Thangaraj Raman
    Team CanvasJS

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

You must be logged in to reply to this topic.