Home forums Using CanvasJS not working in web

Tagged: ,

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22059

    akdeniz
    Member

    Hello to everyone ,

    I have a problem.

    my application is running on the local server but when I throw it to the server it gives an error and I can not see what the error is.

    For example: see https://jsfiddle.net/QwZuf/1979/.

    #22060

    akdeniz
    Member

    Correction: when I throw it at the server, it gives the error in the network

    Failed to load resource: the server responded with a status of 500 (Internal Server Error)

    #22061

    Vishwas R
    Keymaster

    @akdeniz,

    The 500 code would normally indicate an error on the server, not anything with your code. The jsfiddle that you have shared seems to be working fine.

    Refer these articles on How to Fix a 500 Internal Server Error, 500 Internal Server Error: What It Is And How To Fix It for more info.


    Vishwas R
    Team CanvasJS

    #22065

    akdeniz
    Member

    <div class=”col-lg-6 col-md-6 col-sm-12 col-xs-12 masonry-item” style=”padding-top:18px”>
    <div class=”card”>
    <div class=”card-header”>
    <h2>Son Yapılan Anket Rapor</h2>
    </div>
    <div id=”chartcontainer” style=”height: 300px; width: 100%;”>

    </div>
    </div>
    </div>

    ———————————————————-
    <script>
    $(document).ready(function () {
    var chart = new CanvasJS.Chart(“chartcontainer”, {
    animationEnabled: true,
    theme: “light2”,
    title: {
    },
    data: [{
    type: “column”,
    dataPoints: [
    @{

    string abc = “”;
    foreach (var item in Model.reportModel)
    {
    abc += ” {y:” + item.sayi + “,label:’Soru : “+(item.soruSirasi+1)+ ” Cevap : ” + item.soruIcerik+”‘},”;
    }
    }

    @Html.Raw(abc)
    ]
    }]
    });
    chart.render();
    });
    </script>

    ——————————–

    Local also throws it into the server even though it works the way I want it

    An error occurred while processing your request.

    Thanks.

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

You must be logged in to reply to this topic.