Home Forums Chart Support Chart Disappear on button click or any other event

Chart Disappear on button click or any other event

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

    Dears,

    I’m having a problem with using the charts with asp.net webform c#
    whenever I click button all charts disappear even on drop-down select event same happen

    sample code of what im using

    <script>
    window.onload = function () {

    var chart = new CanvasJS.Chart(“chartContainer1”, {
    animationEnabled: true,
    title:{
    text: “”,
    horizontalAlign: “center”,
    fontFamily: “Impact”,
    fontWeight: “normal”
    },
    data: [{
    type: “doughnut”,
    startAngle: 60,
    indexLabelFontSize: 17,
    indexLabel: “{label}” ,
    toolTipContent: “<b>{label}:</b> {y} %”,
    dataPoints: [
    {label: “Klar”, y: ‘<%=mh%>’ },
    { label: “Kvar”, y: ‘<%=mh1%>’ },
    ]
    }]
    });

    <div class=”col-md-4″>
    <div class=”panel”>

    <div class=”panel-body”>

    <%– <div class=”dropdown”>–%>
    <select class=”dropdown” id=”ddd” runat=”server” OnSelectedIndexChanged=”ddd_selected_change” ></select>
    <div>
    <button id=”run” type=”button” runat=”server” onserverclick=”run_ServerClick”>Run</button>
    </div>

    <%– <asp:DropDownList ID=”projects_dd” runat=”server” CssClass=”form-control”
    >
    </asp:DropDownList>

    </div>–%>
    <div id=”chartContainer1″ runat=”server” style=”height: 370px;” ></div>
    </div>
    </div>
    </div>

    Do you have any idea how to solve this

    #22057

    @mhamour,

    Kindly share a sample project reproducing the issue you are facing along with sample data over Google-Drive or Onedrive, so that we can understand your requirements better and help you out.

    __
    Priyanka M S
    Team CanvasJS

    #22097

    HI,

    https://drive.google.com/open?id=1BBMaqY7-kErraztV2IisMyWYG7SZhVbO

    well I couldn’t replicate the exact problem but almost as the problem I have

    Thank you for support

    Regards

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

You must be logged in to reply to this topic.