/// <summary> /// create the chart legend /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartLegend(XmlNode node) { try { ChartLegend legend = new ChartLegend(this.Chart.Document, node); legend.Chart = this.Chart; //legend.Node = node; this.Chart.ChartLegend = legend; ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(legend.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "legend"); if (style != null) { legend.Style = style; this.Chart.Styles.Add(style); } return(legend); } catch (Exception ex) { throw new AODLException("Exception while creating the chart legend!", ex); } }
/// <summary> /// create the chart grid /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartGrid(XmlNode node) { try { ChartGrid grid = new ChartGrid(this.Chart.Document, node); //grid.Node = node; grid.Chart = this.Chart; ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(grid.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "grid"); if (style != null) { grid.Style = style; this.Chart.Styles.Add(style); } return(grid); } catch (Exception ex) { throw new AODLException("Exception while creating the chart grid!", ex); } }
/// <summary> /// create the chart category /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartCategories(XmlNode node) { try { ChartCategories categories = new ChartCategories(this.Chart.Document, node); //categories.Node = node; categories.Chart = this.Chart; ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(categories.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "categories"); if (style != null) { categories.Style = style; this.Chart.Styles.Add(style); } return(categories); } catch (Exception ex) { throw new AODLException("Exception while creating the chart categories!", ex); } }
/// <summary> /// create the chart data point /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartDataPoint(XmlNode node) { try { ChartDataPoint datapoint = new ChartDataPoint(this.Chart.Document, node); //grid.Node = node; datapoint.Chart = this.Chart; ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(datapoint.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "datapoint"); if (style != null) { datapoint.Style = style; this.Chart.Styles.Add(style); } return(datapoint); } catch (Exception ex) { throw new AODLException("Exception while creating the chart datapoint!", ex); } }
/// <summary> /// create the chart wall /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartWall(XmlNode node) { try { ChartWall wall = new ChartWall(this.Chart.Document, node); //grid.Node = node; wall.Chart = this.Chart; ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(wall.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "wall"); if (style != null) { wall.Style = style; this.Chart.Styles.Add(style); } return(wall); } catch (Exception ex) { throw new AODLException("Exception while creating the chart wall!", ex); } }
/// <summary> /// create the chart floor /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartFloor(XmlNode node) { try { ChartFloor floor = new ChartFloor(this.Chart.Document, node); //grid.Node = node; floor.Chart = this.Chart; ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(floor.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "floor"); if (style != null) { floor.Style = style; this.Chart.Styles.Add(style); } return(floor); } catch (Exception ex) { throw new AODLException("Exception while creating the chart floor!", ex); } }
/// <summary> /// create the dr3d light /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateDr3dLight(XmlNode node) { try { Dr3dLight light = new Dr3dLight(this.Chart.Document, node); //grid.Node = node; light.Chart = this.Chart; ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(light.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "dr3d"); if (style != null) { light.Style = style; this.Chart.Styles.Add(style); } return(light); } catch (Exception ex) { throw new AODLException("Exception while creating the chart dr3dlight!", ex); } }
/// <summary> /// create the chart series /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartSeries(XElement node) { try { ChartSeries series = new ChartSeries(Chart.Document, node) { Chart = Chart }; ChartStyleProcessor csp = new ChartStyleProcessor(Chart); XElement nodeStyle = csp.ReadStyleNode(series.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "series"); ContentCollection iColl = new ContentCollection(); if (style != null) { series.Style = style; Chart.Styles.Add(style); } foreach (XElement nodeChild in series.Node.Elements()) { IContent icontent = CreateContent(nodeChild); if (icontent != null) { AddToCollection(icontent, iColl); } } series.Node.Value = ""; foreach (IContent iContent in iColl) { if (iContent is ChartDataPoint) { series.DataPointCollection.Add(iContent as ChartDataPoint); } } return(series); } catch (Exception ex) { throw new AODLException("Exception while creating the chart series!", ex); } }
/// <summary> /// create the chart axes /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartAxes(XElement node) { try { ChartAxis axes = new ChartAxis(Chart.Document, node) { Chart = Chart }; //axes.Node = node; ChartStyleProcessor csp = new ChartStyleProcessor(Chart); XElement nodeStyle = csp.ReadStyleNode(axes.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "axes"); ContentCollection iColl = new ContentCollection(); if (style != null) { axes.Style = style; Chart.Styles.Add(style); } foreach (XElement nodeChild in axes.Node.Elements()) { IContent icontent = CreateContent(nodeChild); if (icontent != null) { AddToCollection(icontent, iColl); } } axes.Node.Value = ""; foreach (IContent icontent in iColl) { AddToCollection(icontent, axes.Content); } return(axes); } catch (Exception ex) { throw new AODLException("Exception while creating the chart axes!", ex); } }
/// <summary> /// create the chart title /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartTitle(XElement node) { try { ChartTitle title = new ChartTitle(Chart.Document, node) { Chart = Chart }; Chart.ChartTitle = title; //title.Node = node; ChartStyleProcessor csp = new ChartStyleProcessor(Chart); XElement nodeStyle = csp.ReadStyleNode(title.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "title"); ContentCollection iColl = new ContentCollection(); if (style != null) { title.Style = style; Chart.Styles.Add(style); } foreach (XElement nodeChild in title.Node.Elements()) { IContent icontent = CreateContent(nodeChild); if (icontent != null) { AddToCollection(icontent, iColl); } } title.Node.Value = ""; foreach (IContent icontent in iColl) { AddToCollection(icontent, title.Content); } return(title); } catch (Exception ex) { throw new AODLException("Exception while creating the chart title!", ex); } }
/// <summary> /// create the chart /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChart(XmlNode node) { try { this.Chart.Node = node; ContentCollection iColl = new ContentCollection(); ChartStyleProcessor csp = new ChartStyleProcessor(this.Chart); XmlNode nodeStyle = csp.ReadStyleNode(this.Chart.StyleName); IStyle style = csp.ReadStyle(nodeStyle, "chart"); if (style != null) { this.Chart.ChartStyle = (ChartStyle)style; this.Chart.Styles.Add(style); } foreach (XmlNode nodeChild in this.Chart.Node.ChildNodes) { IContent icontent = CreateContent(nodeChild); if (icontent != null) { AddToCollection(icontent, iColl); } } this.Chart.Node.InnerXml = ""; foreach (IContent icontent in iColl) { AddToCollection(icontent, this.Chart.Content); } return(this.Chart); } catch (Exception ex) { throw new AODLException("Exception while creating the chart!", ex); } }
/// <summary> /// create the chart title /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartTitle(XmlNode node) { try { ChartTitle title = new ChartTitle (this.Chart.Document ,node); title.Chart = this.Chart ; this.Chart .ChartTitle =title; //title.Node = node; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(title .StyleName); IStyle style = csp.ReadStyle (nodeStyle,"title"); ContentCollection iColl = new ContentCollection (); if ( style!= null) { title.Style =style; this.Chart .Styles .Add (style); } foreach(XmlNode nodeChild in title.Node .ChildNodes ) { IContent icontent = CreateContent(nodeChild); if (icontent!= null) AddToCollection(icontent,iColl); } title.Node.InnerXml =""; foreach(IContent icontent in iColl) { AddToCollection(icontent,title.Content ); } return title; } catch(Exception ex) { throw new AODLException("Exception while creating the chart title!", ex); } }
/// <summary> /// create the chart plotarea /// </summary> /// <param name="node"></param> /// <returns></returns> 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); } }
/// <summary> /// create the chart axes /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartAxes(XmlNode node) { try { ChartAxis axes = new ChartAxis (this.Chart .Document ,node); axes.Chart = this.Chart ; //axes.Node = node; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(axes.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"axes"); ContentCollection iColl = new ContentCollection (); if (style !=null) { axes.Style = style; this.Chart .Styles .Add (style); } foreach(XmlNode nodeChild in axes.Node .ChildNodes ) { IContent icontent = CreateContent(nodeChild); if (icontent!= null) AddToCollection(icontent,iColl); } axes.Node.InnerXml =""; foreach(IContent icontent in iColl) { AddToCollection(icontent,axes.Content ); } return axes; } catch(Exception ex) { throw new AODLException("Exception while creating the chart axes!", ex); } }
/// <summary> /// create the chart category /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartCategories(XmlNode node) { try { ChartCategories categories = new ChartCategories (this.Chart .Document ,node); //categories.Node = node; categories.Chart = this.Chart ; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(categories.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"categories"); if (style != null) { categories.Style =style; this.Chart .Styles .Add (style); } return categories; } catch(Exception ex) { throw new AODLException("Exception while creating the chart categories!", ex); } }
/// <summary> /// create the chart grid /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartGrid(XmlNode node) { try { ChartGrid grid = new ChartGrid (this.Chart .Document ,node); //grid.Node = node; grid.Chart = this.Chart ; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(grid.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"grid"); if (style != null) { grid.Style =style; this.Chart .Styles .Add (style); } return grid; } catch(Exception ex) { throw new AODLException("Exception while creating the chart grid!", ex); } }
/// <summary> /// create the chart series /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartSeries(XmlNode node) { try { ChartSeries series = new ChartSeries(this.Chart .Document ,node); series.Chart = this.Chart ; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(series.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"series"); ContentCollection iColl = new ContentCollection (); if (style != null) { series.Style =style; this.Chart .Styles .Add (style); } foreach(XmlNode nodeChild in series.Node .ChildNodes ) { IContent icontent = CreateContent(nodeChild); if (icontent!= null) AddToCollection(icontent,iColl); } series.Node.InnerXml =""; foreach(IContent iContent in iColl) { if (iContent is ChartDataPoint ) series.DataPointCollection .Add (iContent as ChartDataPoint); } return series; } catch(Exception ex) { throw new AODLException("Exception while creating the chart series!", ex); } }
/// <summary> /// create the chart plotarea /// </summary> /// <param name="node"></param> /// <returns></returns> 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); } }
/// <summary> /// create the chart data point /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartDataPoint(XmlNode node) { try { ChartDataPoint datapoint = new ChartDataPoint(this.Chart .Document ,node); //grid.Node = node; datapoint.Chart = this.Chart ; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(datapoint.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"datapoint"); if (style != null) { datapoint.Style = style; this.Chart .Styles .Add (style); } return datapoint; } catch(Exception ex) { throw new AODLException("Exception while creating the chart datapoint!", ex); } }
/// <summary> /// create the chart wall /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartWall(XmlNode node) { try { ChartWall wall = new ChartWall(this.Chart .Document ,node); //grid.Node = node; wall.Chart = this.Chart ; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(wall.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"wall"); if (style != null) { wall.Style =style; this.Chart .Styles .Add (style); } return wall; } catch(Exception ex) { throw new AODLException("Exception while creating the chart wall!", ex); } }
/// <summary> /// create the chart floor /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartFloor(XmlNode node) { try { ChartFloor floor = new ChartFloor(this.Chart .Document ,node); //grid.Node = node; floor.Chart = this.Chart ; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(floor.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"floor"); if (style != null) { floor.Style =style; this.Chart .Styles .Add (style); } return floor; } catch(Exception ex) { throw new AODLException("Exception while creating the chart floor!", ex); } }
/// <summary> /// create the chart legend /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateChartLegend(XmlNode node) { try { ChartLegend legend = new ChartLegend (this.Chart .Document ,node); legend.Chart = this.Chart ; //legend.Node = node; this.Chart .ChartLegend =legend; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(legend.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"legend"); if (style != null) { legend.Style =style; this.Chart .Styles .Add (style); } return legend; } catch(Exception ex) { throw new AODLException("Exception while creating the chart legend!", ex); } }
/// <summary> /// create the dr3d light /// </summary> /// <param name="node"></param> /// <returns></returns> private IContent CreateDr3dLight(XmlNode node) { try { Dr3dLight light = new Dr3dLight(this.Chart .Document ,node); //grid.Node = node; light.Chart = this.Chart ; ChartStyleProcessor csp = new ChartStyleProcessor (this.Chart ); XmlNode nodeStyle = csp.ReadStyleNode(light.StyleName); IStyle style = csp.ReadStyle (nodeStyle,"dr3d"); if (style != null) { light.Style =style; this.Chart .Styles .Add (style); } return light; } catch(Exception ex) { throw new AODLException("Exception while creating the chart dr3dlight!", ex); } }