I'm using instances of WebChart in a set of UpdatePanels. The charts are configured to use session state; the DeploymentScenario and ImagePipePageName are configured declaratively in the ascx file.
However, I keep running into a situation where the chart throws an exception during the Render phase of the ASP.NET lifecycle when it attempts to access the ChartImages directory underneath the location of the UserControl (.ascx file) that has the chart on it. However, the chart should be set up to use Session State, not the filesystem. The chart hasn't had DataBind called on it at this point. Furthermore, in the cases where the chart(s) do render instead of throwing exceptions, the legend is missing. I have a config flag set to enable/disable doing the DataBind on the asynchronous postback, and everything works fine when it's being done synchronously.
Are there any gotchas that I may be overlooking when using the UltraChart inside an UpdatePanel? I'm using 7.1.
true. so i'm not sure what the problem is. could you either post the exception details here, or submit a support incident (so that you can attach a sample project)?
That really doesn't apply here, I'm setting the deployment model up in the ascx file declaratively:
<igChart:UltraChart runat="server" ID="areaChart" ImagePipePageName="/Utils/SecureImagePipe.aspx" width="400" height="320" charttype="StackAreaChart" emptycharttext="" data-swaprowsandcolumns="true"> <DeploymentScenario imagetype="Png" renderingtype="Image" scenario="session"> </DeploymentScenario></igChart:UltraChart>
This stuff is set up before the Init phase of the ASP.NET page lifecycle, and is set on every request, not just the first one.
this might be caused by the fact that many of UltraChart's properties are not stored in ViewState. make sure any properties you initialize in code are set on every postback. if there is code to initialize and databind the chart wrapped in an if (!IsPostBack) block, try removing that condition and just executing the code every time.