Hi,
I had problem with chart placed inside panel that was updated in partial postback so page was losing chart. I had to work around it somehow. I ended with this code that redraws the whole chart after each postback:
function pageLoad() {
var chartPlace = $('#<%=HiddenFieldChartVisible.ClientID %>').val();
if (chartPlace == "visible") {
var chart = new CanvasJS.Chart("chartContainer",
{
zoomEnabled: true,
title: {
text: datapointscount + " Data Points! Zoom-in And Observe Axis Labels"
},
toolTip: {
content: function (e) {
var content;
content = e.entries[0].dataSeries.name + " <strong>" + e.entries[0].dataPoint.y;
return content;
},
},
axisX: {
labelAngle: -30
},
axisY: {
includeZero: false
},
data: data
});
chart.render();
}
/*})*/
};
But now because of this code after i hit Pan button it also redraws the whole chart. Is it possible to change Pan button configuration or at least remove Pan button from chart without interfering with your code