private IContent CreateChartPlotArea(XmlNode node)
{
try
{
ChartPlotArea plotarea = new ChartPlotArea (this.Chart .Document ,node);
plotarea.Chart = this.Chart ;
//plotarea.Node = node;
this.Chart .ChartPlotArea = plotarea;
ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart );
XmlNode nodeStyle = csp.ReadStyleNode(plotarea .StyleName);
IStyle style = csp.ReadStyle (nodeStyle,"plotarea");
ContentCollection iColl = new ContentCollection ();
if (style != null)
{
plotarea.Style =style;
this.Chart .Styles .Add (style);
}
foreach(XmlNode nodeChild in plotarea.Node .ChildNodes )
{
IContent icontent = CreateContent(nodeChild);
if (icontent!= null)
AddToCollection(icontent,iColl);
}
plotarea.Node.InnerXml ="";
foreach(IContent icontent in iColl)
{
if (icontent is Dr3dLight)
{
((Dr3dLight)icontent).PlotArea =plotarea;
plotarea.Dr3dLightCollection .Add (icontent as Dr3dLight );
}
else if (icontent is ChartAxis)
{
((ChartAxis)icontent).PlotArea=plotarea;
plotarea.AxisCollection .Add (icontent as ChartAxis );
}
else if (icontent is ChartSeries )
{
((ChartSeries)icontent).PlotArea =plotarea;
plotarea.SeriesCollection .Add (icontent as ChartSeries );
}
else
{
AddToCollection(icontent,plotarea.Content );
}
}
return plotarea;
}
catch(Exception ex)
{
throw new AODLException("Exception while creating the chart plotarea!", ex);
}
}