@sonika,
Based on the JSFiddle shared by you, calling chart.render() inside the click event handler after the class expandedgraph
is added to the DIV container seems to be working fine. Please check the below code snippet –
$("#PortfolioTrend").click(function () {
$("#zoom").addClass("expandedgraph");
chart.render();
})
Also, please take a look at this JSFiddle for a working example.
—
Thangaraj Raman
Team CanvasJS