I'm building an application using the UltraWebChart v8.2 in .NET 3.5. In this application there are Ultracharts inside of UpdatePanels. One of the requirements of the chart is the ability to add series after the original load of the page. To do this, I am adding a new layer to the composite chart we are using, and adding the series to that layer.
The problem is that a series added to the chart through a partial page refresh of the containing updatepanel, none of the javascript functions are set up for this series, leading to javascript errors when the events for the series are fired. The error is a reference to an undefined string, and comes when trying to parse the arguments for the event in the DecodeArguments function. It is caused becuase the EventData member of the IGChart object does not contain the information for any layers added through partial page refresh.
To reproduce this problem, do the following:
It seems to me that this problem comes up due to the fact that the javascript for instantiating the IGChart objects is injected directly into the page on page load or postback. When a partial page refresh creates a new layer or series, the associated javascript object is never created, and thus, the members are not set up correctly.
Update:
If you replace the updatepanel with an asyncrefreshpanel, then the errors disapear.
I've been trying to reproduce the problem with:
<
<!--
}
// -->
</
...
{
series.Points.Add(
layer.ChartArea = area;
layer.AxisX = area.Axes[0];
layer.AxisY = area.Axes[1];
layer.Series.Add(series);
With this code the chart seems to work ok.
What else do you have on the page? Could you send us the code so we can investigate the problem?