internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "scatterStyle") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "marker")) { case "marker": this.ChartType = ExcelChartType.Scatter; break; case "line": this.ChartType = ExcelChartType.ScatterLines; break; case "lineMarker": this.ChartType = ExcelChartType.ScatterLinesWithMarkers; break; case "smooth": this.ChartType = ExcelChartType.ScatterLinesSmooth; break; case "smoothMarker": this.ChartType = ExcelChartType.ScatterLinesSmoothWithMarkers; break; } } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "varyColors") { this.VaryColors = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "ser") { ExcelScatterSeries series = new ExcelScatterSeries(); series.ReadXml(element, mFolder, xFile); this.ScatterSeries.Add(series); } else if (element.Name.LocalName == "axId") { int num = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); if (!this.XAxisID.HasValue) { this.XAxisID = new int?(num); } else if (!this.YAxisID.HasValue) { this.YAxisID = new int?(num); } } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "cat") { ExcelCategoryAxisData data = new ExcelCategoryAxisData(); data.ReadXml(element); this.CategoryAxisData = data; } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "dPt") { ExcelDataPoint point = new ExcelDataPoint(); point.ReadXml(element, mFolder, xFile); this.DataPoints.Add(point); } else if (element.Name.LocalName == "idx") { this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "order") { this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.Format = format; } else if (element.Name.LocalName == "tx") { ExcelSeriesName name = new ExcelSeriesName(); name.ReadXml(element); this.SeriesName = name; } else if (element.Name.LocalName == "val") { ExcelSeriesValue value2 = new ExcelSeriesValue(); value2.ReadXml(element); this.SeriesValue = value2; } else if (element.Name.LocalName == "marker") { ExcelDataMarker marker = new ExcelDataMarker(); marker.ReadXml(element, mFolder, xFile); this.Marker = marker; } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "grouping") { this.ChartType = this.GetChartType(element.GetAttributeValueOrDefaultOfStringType("val", "standard")); } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "varyColors") { this.VaryColors = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "ser") { ExcelAreaSeries series = new ExcelAreaSeries(); series.ReadXml(element, mFolder, xFile); this.AreaSeries.Add(series); } else if (element.Name.LocalName == "gapDepth") { this.GapDepth = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "axId") { int num = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); if (!this.XAxisID.HasValue) { this.XAxisID = new int?(num); } else if (!this.YAxisID.HasValue) { this.YAxisID = new int?(num); } else if (!this.ZAxisID.HasValue) { this.ZAxisID = new int?(num); } } else if (element.Name.LocalName == "dropLines") { this.DropLine = new ExcelChartLines(); this.DropLine.ReadXml(element, mFolder, xFile); } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "ser") { ExcelLineSeries series = new ExcelLineSeries(); series.ReadXml(element, mFolder, xFile); this.LineSeries.Add(series); } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "dropLines") { this.DropLine = new ExcelChartLines(); this.DropLine.ReadXml(element, mFolder, xFile); } else if (element.Name.LocalName == "hiLowLines") { this.HighLowLine = new ExcelChartLines(); this.HighLowLine.ReadXml(element, mFolder, xFile); } else if (element.Name.LocalName == "upDownBars") { ExcelUpDownBars bars = new ExcelUpDownBars(); bars.ReadXml(element, mFolder, xFile); this.UpDownBars = bars; } else if (element.Name.LocalName == "axId") { int num = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); if (!this.XAxisID.HasValue) { this.XAxisID = new int?(num); } else if (!this.YAxisID.HasValue) { this.YAxisID = new int?(num); } } } this.ChartType = (this.LineSeries.Count == 3) ? ExcelChartType.StockHighLowClose : ExcelChartType.StockOpenHighLowClose; }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "varyColors") { this.VaryColors = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "ser") { ExcelPieSeries series = new ExcelPieSeries(); series.ReadXml(element, mFolder, xFile); this.PieSeries.Add(series); } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "firstSliceAng") { this.FirstSliceAngle = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "holeSize") { this.HoleSize = element.GetAttributeValueOrDefaultOfInt32Type("val", 10); } } bool flag = true; if (this.PieSeries.Count > 0) { int explosion = this.PieSeries[0].Explosion; foreach (IExcelPieSeries series2 in this.PieSeries) { if ((series2.Explosion == 0) || (series2.Explosion != explosion)) { flag = false; break; } } } this.ChartType = flag ? ExcelChartType.DoughuntExploded : ExcelChartType.Doughunt; }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { string barDir = "col"; string barGrouping = "clustered"; string shape = null; foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "barDir") { barDir = element.GetAttributeValueOrDefaultOfStringType("val", "col"); } else if (element.Name.LocalName == "grouping") { barGrouping = element.GetAttributeValueOrDefaultOfStringType("val", "clustered"); } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "varyColors") { this.VaryColors = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "gapWidth") { this.GapWidth = element.GetAttributeValueOrDefaultOfInt32Type("val", 150); } else if (element.Name.LocalName == "gapDepth") { this.GapDepth = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "ser") { ExcelBarSeries series = new ExcelBarSeries(); series.ReadXml(element, mFolder, xFile); this.BarSeries.Add(series); } else if (element.Name.LocalName == "axId") { int num = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); if (!this.XAxisID.HasValue) { this.XAxisID = new int?(num); } else if (!this.YAxisID.HasValue) { this.YAxisID = new int?(num); } else if (!this.ZAxisID.HasValue) { this.ZAxisID = new int?(num); } } else if (element.Name.LocalName == "shape") { shape = element.GetAttributeValueOrDefaultOfStringType("val", "box"); } } this.ChartType = this.GetBarChartType(barDir, barGrouping, shape); }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "cat") { ExcelCategoryAxisData data = new ExcelCategoryAxisData(); data.ReadXml(element); this.CategoryAxisData = data; } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "dPt") { ExcelDataPoint point = new ExcelDataPoint(); point.ReadXml(element, mFolder, xFile); this.DataPoints.Add(point); } else if (element.Name.LocalName == "errBars") { ExcelErrorBars bars = new ExcelErrorBars(); bars.ReadXml(element, mFolder, xFile); if (this.FirstErrorBars == null) { this.FirstErrorBars = bars; } else { this.SecondErrorBars = bars; } } else if (element.Name.LocalName == "idx") { this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "order") { this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.Format = format; } else if (element.Name.LocalName == "trendline") { ExcelTrendLine line = new ExcelTrendLine(); line.ReadXml(element, mFolder, xFile); this.Trendlines.Add(line); } else if (element.Name.LocalName == "tx") { ExcelSeriesName name = new ExcelSeriesName(); name.ReadXml(element); this.SeriesName = name; } else if (element.Name.LocalName == "val") { ExcelSeriesValue value2 = new ExcelSeriesValue(); value2.ReadXml(element); this.SeriesValue = value2; } else if (element.Name.LocalName == "pictureOptions") { Dt.Xls.Chart.PictureOptions options = new Dt.Xls.Chart.PictureOptions(); options.ReadXml(element, mFolder, xFile); this.PictureOptions = options; } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "xVal") { ExcelCategoryAxisData data = new ExcelCategoryAxisData(); data.ReadXml(element); this.CategoryAxisData = data; } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "dPt") { ExcelDataPoint point = new ExcelDataPoint(); point.ReadXml(element, mFolder, xFile); this.DataPoints.Add(point); } else if (element.Name.LocalName == "errBars") { ExcelErrorBars bars = new ExcelErrorBars(); bars.ReadXml(element, mFolder, xFile); if (this.FirstErrorBars == null) { this.FirstErrorBars = bars; } else { this.SecondErrorBars = bars; } } else if (element.Name.LocalName == "idx") { this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "order") { this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.Format = format; } else if (element.Name.LocalName == "trendline") { ExcelTrendLine line = new ExcelTrendLine(); line.ReadXml(element, mFolder, xFile); this.Trendlines.Add(line); } else if (element.Name.LocalName == "tx") { ExcelSeriesName name = new ExcelSeriesName(); name.ReadXml(element); this.SeriesName = name; } else if (element.Name.LocalName == "yVal") { ExcelSeriesValue value2 = new ExcelSeriesValue(); value2.ReadXml(element); this.SeriesValue = value2; } else if (element.Name.LocalName == "invertIfNegative") { this.InvertIfNegative = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "bubble3D") { this.Bubble3D = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "bubbleSize") { ExcelSeriesValue value3 = new ExcelSeriesValue(); value3.ReadXml(element); this.BubbleSize = value3; } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "varyColors") { this.VaryColors = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "ser") { ExcelBubbleSeries series = new ExcelBubbleSeries(); series.ReadXml(element, mFolder, xFile); this.BubbleSeries.Add(series); } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "bubble3D") { if (element.GetAttributeValueOrDefaultOfBooleanType("val", true)) { this.ChartType = ExcelChartType.Bubble3D; } else { this.ChartType = ExcelChartType.Bubble; } } else if (element.Name.LocalName == "bubbleScale") { this.BubbleScale = element.GetAttributeValueOrDefaultOfInt32Type("val", 100); } else if (element.Name.LocalName == "showNegBubbles") { this.ShowNegativeBubbles = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "sizeRepresents") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "area")) { case "area": this.SizeRepresents = BubbleSizeRepresents.Area; break; case "w": this.SizeRepresents = BubbleSizeRepresents.Width; break; } } else if (element.Name.LocalName == "axId") { int num = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); if (!this.XAxisID.HasValue) { this.XAxisID = new int?(num); } else if (!this.YAxisID.HasValue) { this.YAxisID = new int?(num); } } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "ofPieType") { if (element.GetAttributeValueOrDefaultOfStringType("val", "pie") == "pie") { this.ChartType = ExcelChartType.PieOfPie; } else { this.ChartType = ExcelChartType.BarOfPie; } } else if (element.Name.LocalName == "varyColors") { this.VaryColors = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "ser") { ExcelPieSeries series = new ExcelPieSeries(); series.ReadXml(element, mFolder, xFile); this.PieSeries.Add(series); } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "gapWidth") { this.GapWidth = element.GetAttributeValueOrDefaultOfInt32Type("val", 150); } else if (element.Name.LocalName == "splitType") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "auto")) { case "auto": this.SplitType = OfPieChartSplitType.Auto; break; case "cust": this.SplitType = OfPieChartSplitType.Custom; break; case "percent": this.SplitType = OfPieChartSplitType.Percent; break; case "pos": this.SplitType = OfPieChartSplitType.Position; break; case "val": this.SplitType = OfPieChartSplitType.Value; break; } } else if (element.Name.LocalName == "splitPos") { this.SplitPosition = element.GetAttributeValueOrDefaultOfDoubleType("val", 0.0); } else if (element.Name.LocalName == "custSplit") { foreach (XElement element2 in element.Elements()) { this.CustomSplitPoints.Add(element2.GetAttributeValueOrDefaultOfInt32Type("val", 0)); } } else if (element.Name.LocalName == "secondPieSize") { this.SecondPieSize = element.GetAttributeValueOrDefaultOfInt32Type("val", 0x4b); } else if (element.Name.LocalName == "serLines") { this.SeriesLines = new ExcelChartLines(); this.SeriesLines.ReadXml(element, mFolder, xFile); } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { string areaChart = "standard"; bool marker = false; foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "grouping") { areaChart = element.GetAttributeValueOrDefaultOfStringType("val", "standard"); } else if (element.Name.LocalName == "varyColors") { this.VaryColors = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "ser") { ExcelLineSeries series = new ExcelLineSeries(); series.ReadXml(element, mFolder, xFile); this.LineSeries.Add(series); } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "dropLines") { this.DropLine = new ExcelChartLines(); this.DropLine.ReadXml(element, mFolder, xFile); } else if (element.Name.LocalName == "hiLowLines") { this.HighLowLine = new ExcelChartLines(); this.HighLowLine.ReadXml(element, mFolder, xFile); } else if (element.Name.LocalName == "upDownBars") { ExcelUpDownBars bars = new ExcelUpDownBars(); bars.ReadXml(element, mFolder, xFile); this.UpDownBars = bars; } else if (element.Name.LocalName == "marker") { marker = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "smooth") { this.Smoothing = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "axId") { int num = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); if (!this.XAxisID.HasValue) { this.XAxisID = new int?(num); } else if (!this.YAxisID.HasValue) { this.YAxisID = new int?(num); } } } this.ChartType = this.GetChartType(areaChart, marker); }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "invertIfNegative") { this.InvertIfNegative = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "cat") { ExcelCategoryAxisData data = new ExcelCategoryAxisData(); data.ReadXml(element); this.CategoryAxisData = data; } else if (element.Name.LocalName == "dLbls") { ExcelDataLabels labels = new ExcelDataLabels(); labels.ReadXml(element, mFolder, xFile); this.DataLabels = labels; } else if (element.Name.LocalName == "dPt") { ExcelDataPoint point = new ExcelDataPoint(); point.ReadXml(element, mFolder, xFile); this.DataPoints.Add(point); } else if (element.Name.LocalName == "errBars") { ExcelErrorBars bars = new ExcelErrorBars(); bars.ReadXml(element, mFolder, xFile); this.ErrorBars = bars; } else if (element.Name.LocalName == "idx") { this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "order") { this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.Format = format; } else if (element.Name.LocalName == "trendline") { ExcelTrendLine line = new ExcelTrendLine(); line.ReadXml(element, mFolder, xFile); this.Trendlines.Add(line); } else if (element.Name.LocalName == "tx") { ExcelSeriesName name = new ExcelSeriesName(); name.ReadXml(element); this.SeriesName = name; } else if (element.Name.LocalName == "val") { ExcelSeriesValue value2 = new ExcelSeriesValue(); value2.ReadXml(element); this.SeriesValue = value2; } else if (element.Name.LocalName == "pictureOptions") { Dt.Xls.Chart.PictureOptions options = new Dt.Xls.Chart.PictureOptions(); options.ReadXml(element, mFolder, xFile); this.PictureOptions = options; } else if (element.Name.LocalName == "extLst") { foreach (XElement element2 in element.Elements()) { if (element2.Name.LocalName == "ext") { foreach (XElement element3 in element2.Elements()) { if (element3.Name.LocalName == "invertSolidFillFmt") { foreach (XElement element4 in element3.Elements()) { if (element4.Name.LocalName == "spPr") { foreach (XElement element5 in element4.Elements()) { if (element5.Name.LocalName == "solidFill") { SolidFillFormat format2 = new SolidFillFormat(); format2.ReadXml(element5); this.NegativeSolidFillFormat = format2; } } } } } } } } } } }