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