Home forums Using CanvasJS Not display chart after second event click

This topic contains 4 replies, has 2 voices, and was last updated by  Vishwas R 3 months, 2 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22009

    triiglobal
    Member

    This is my code
    var chartInstall = new CanvasJS.Chart(“chartInstall”, {
    animationEnabled: true,
    title: {
    //text: “Ice Cream Sales Over a Month”
    },
    axisX:[
    {
    lineColor: “#369EAD”,
    titleFontColor: “#369EAD”,
    labelFontColor: “#369EAD”,
    valueFormatString: “MMM DD”,
    intervalType: “day”,
    interval: 2
    },
    {
    lineColor: “#C24642”,
    titleFontColor: “#C24642”,
    labelFontColor: “#C24642”,
    valueFormatString: “MMM DD”,
    intervalType: “day”,
    interval:2
    }],
    axisY: {
    title: “Installs”,
    prefix: “”,
    includeZero: false
    },
    data: [{
    type: “spline”,
    //axisXIndex: 0, //Defaults to Zero
    name: “Axis Y-1”,
    showInLegend: true,
    legendText: “Current Period”,
    xValueType: “dateTime”,
    dataPoints: @Html.Raw(ViewBag.DataInstall1)
    },
    {
    type: “spline”,
    axisXIndex: 1, //Defaults to Zero
    showInLegend: true,
    legendText: “Previous Period”,
    xValueType: “dateTime”,
    dataPoints: @Html.Raw(ViewBag.DataInstall2)
    }
    ]
    });

    chartInstall.render();

    ViewBag.DataInstall1 = [{“x”:1532476800000.0,”y”:1.0},{“x”:1532563200000.0,”y”:1.0}]
    ViewBag.DataInstall2 = [{“x”:1530144000000.0,”y”:1.0}]

    why in second click display no chart display?

    #22011

    Vishwas R
    Keymaster

    @triiglobal,

    Can you kindly create sample project with sample dataPoints and share it over Google-Drive or Onedrive, so that we can look into your code, understand it better and help you out?


    Vishwas R
    Team CanvasJS

    #22014

    triiglobal
    Member

    Dear Vishwas,
    here the link that i can give to you
    i hape you can help us.
    https://drive.google.com/open?id=1SOIqJUDM_TDhEr_M5zqP0d7murdgYOun

    thanks

    #22039

    triiglobal
    Member

    hallo, any one can help ??

    #22043

    Vishwas R
    Keymaster

    @triiglobal,

    The code that you have shared in doc file seems to be working fine. Can you kindly share the sample ASP.Net project along with sample data so that we can understand your scenario better and help you out?


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.