internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "downBars") { foreach (XElement element2 in element.Elements()) { if (element2.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element2, mFolder, xFile); this.DownBars = format; } } } else if (element.Name.LocalName == "upBars") { foreach (XElement element3 in element.Elements()) { if (element3.Name.LocalName == "spPr") { ExcelChartFormat format2 = new ExcelChartFormat(); format2.ReadXml(element3, mFolder, xFile); this.UpBars = format2; } } } else if (element.Name.LocalName == "gapWidth") { this.GapWidth = element.GetAttributeValueOrDefaultOfInt32Type("val", 150); } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "legendPos") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "r")) { case "r": this.Position = ExcelLegendPositon.Right; break; case "l": this.Position = ExcelLegendPositon.Left; break; case "t": this.Position = ExcelLegendPositon.Top; break; case "b": this.Position = ExcelLegendPositon.Bottom; break; case "tr": this.Position = ExcelLegendPositon.TopRight; break; } } else if (element.Name.LocalName == "legendEntry") { ExcelLegendEntry entry = new ExcelLegendEntry(); entry.ReadXml(element, mFolder, xFile); this.LegendEntries.Add(entry); } else if (element.Name.LocalName == "layout") { Dt.Xls.Chart.Layout layout = new Dt.Xls.Chart.Layout(); layout.ReadXml(element, mFolder, xFile); this.Layout = layout; } else if (element.Name.LocalName == "overlay") { this.Overlay = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.ShapeFormat = format; } else if (element.Name.LocalName == "txPr") { ExcelTextFormat format2 = new ExcelTextFormat(); format2.ReadXml(element, mFolder, xFile); this.TextFormat = format2; } } }
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 == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.Format = format; } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "overlay") { this.Overlay = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "layout") { Dt.Xls.Chart.Layout layout = new Dt.Xls.Chart.Layout(); layout.ReadXml(element, mFolder, xFile); this.Layout = layout; } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.ShapeFormat = format; } else if (element.Name.LocalName == "txPr") { ExcelTextFormat format2 = new ExcelTextFormat(); format2.ReadXml(element, mFolder, xFile); this.TextForamt = format2; } else if (element.Name.LocalName == "tx") { foreach (XElement element2 in element.Elements()) { if (element2.Name.LocalName == "rich") { RichText text = new RichText(); text.ReadXml(element2, mFolder, xFile); this.RichTextTitle = text; } else if (element2.Name.LocalName == "strRef") { this.TitleFormula = element2.GetChildElementValue("f"); if (ParsingContext.ReferenceStyle == ExcelReferenceStyle.R1C1) { this.TitleFormula = ParsingContext.ConvertA1FormulaToR1C1Formula(this.TitleFormula, 0, 0); } } } } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "bubble3D") { this.IsBubble3D = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "idx") { this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "explosion") { this.Explosion = new int?(element.GetAttributeValueOrDefaultOfInt32Type("val", 0)); } else if (element.Name.LocalName == "invertIfNegative") { this.InvertIfNegative = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "marker") { ExcelDataMarker marker = new ExcelDataMarker(); marker.ReadXml(element, mFolder, xFile); this.Marker = marker; } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.DataPointFormat = format; } 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 == "thickness") { this.Thickness = 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 == "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 == "axId") { this.Id = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "scaling") { Dt.Xls.Chart.Scaling scaling = new Dt.Xls.Chart.Scaling(); scaling.ReadXml(element); this.Scaling = scaling; } else if (element.Name.LocalName == "delete") { this.Delete = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "axPos") { switch (element.GetAttributeValueOrDefaultOfStringType("val", null)) { case "b": this.AxisPosition = Dt.Xls.Chart.AxisPosition.Bottom; break; case "l": this.AxisPosition = Dt.Xls.Chart.AxisPosition.Left; break; case "r": this.AxisPosition = Dt.Xls.Chart.AxisPosition.Right; break; case "t": this.AxisPosition = Dt.Xls.Chart.AxisPosition.Top; break; } } else if (element.Name.LocalName == "majorGridlines") { ExcelGridLine line = new ExcelGridLine(); line.ReadXml(element, mFolder, xFile); this.MajorGridlines = line; } else if (element.Name.LocalName == "minorGridlines") { ExcelGridLine line2 = new ExcelGridLine(); line2.ReadXml(element, mFolder, xFile); this.MinorGridlines = line2; } else if (element.Name.LocalName == "title") { ExcelChartTitle title = new ExcelChartTitle(); title.ReadXml(element, mFolder, xFile); this.AxisTitle = title; } else if (element.Name.LocalName == "numFmt") { Dt.Xls.Chart.NumberFormat format = ChartCommonSimpleNodeHelper.ReadNumberFormatNode(element); this.NumberFormat = format.NumberFormatCode; this.NumberFormatLinked = format.LinkToSource; } else if (element.Name.LocalName == "majorTickMark") { this.MajorTickMark = this.ReadTickMark(element.GetAttributeValueOrDefaultOfStringType("val", "cross")); } else if (element.Name.LocalName == "minorTickMark") { this.MinorTickMark = this.ReadTickMark(element.GetAttributeValueOrDefaultOfStringType("val", "cross")); } else if (element.Name.LocalName == "tickLblPos") { this.TickLabelPosition = this.ReadTickLabelPosition(element.GetAttributeValueOrDefaultOfStringType("val", "none")); } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format2 = new ExcelChartFormat(); format2.ReadXml(element, mFolder, xFile); this.ShapeFormat = format2; } else if (element.Name.LocalName == "txPr") { ExcelTextFormat format3 = new ExcelTextFormat(); format3.ReadXml(element, mFolder, xFile); this.TextFormat = format3; } else if (element.Name.LocalName == "crossAx") { this.CrossAx = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "crosses") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "autoZero")) { case "autoZero": this.Crosses = AxisCrosses.AutoZero; break; case "max": this.Crosses = AxisCrosses.Max; break; case "min": this.Crosses = AxisCrosses.Min; break; } } else if (element.Name.LocalName == "crossesAt") { this.CrosssAt = element.GetAttributeValueOrDefaultOfDoubleType("val", 0.0); } else if (element.Name.LocalName == "auto") { this.IsAutomaticCategoryAxis = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "lblAlgn") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "ctr")) { case "ctr": this.LabelAlignment = Dt.Xls.Chart.LabelAlignment.Center; break; case "l": this.LabelAlignment = Dt.Xls.Chart.LabelAlignment.Left; break; case "r": this.LabelAlignment = Dt.Xls.Chart.LabelAlignment.Right; break; } } else if (element.Name.LocalName == "lblOffset") { this.LabelOffset = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "tickLblSkip") { this.TickLalelInterval = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "tickMarkSkip") { this.TickMarkInterval = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "noMultiLvlLbl") { this.NoMultiLevelLables = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "dLbl") { ExcelDataLabel label = new ExcelDataLabel(); label.ReadXml(element, mFolder, xFile); this.DataLabelList.Add(label); } else if (element.Name.LocalName == "delete") { this.Delete = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "numFmt") { Dt.Xls.Chart.NumberFormat format = ChartCommonSimpleNodeHelper.ReadNumberFormatNode(element); this.NumberFormat = format.NumberFormatCode; this.NumberFormatLinked = format.LinkToSource; } else if (element.Name.LocalName == "dLblPos") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "bestFit")) { case "b": this.Position = DataLabelPosition.Bottom; break; case "bestFit": this.Position = DataLabelPosition.BestFit; break; case "ctr": this.Position = DataLabelPosition.Center; break; case "inBase": this.Position = DataLabelPosition.InsideBase; break; case "inEnd": this.Position = DataLabelPosition.InsideEnd; break; case "l": this.Position = DataLabelPosition.Left; break; case "outEnd": this.Position = DataLabelPosition.OutsideEnd; break; case "r": this.Position = DataLabelPosition.Right; break; case "t": this.Position = DataLabelPosition.Top; break; } } else if (element.Name.LocalName == "separator") { this.Separator = element.Value; } else if (element.Name.LocalName == "showLegendKey") { this.ShowLegendKey = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showVal") { this.ShowValue = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showCatName") { this.ShowCategoryName = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showSerName") { this.ShowSeriesName = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showPercent") { this.ShowPercentage = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showBubbleSize") { this.ShowBubbleSize = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showLeaderLines") { this.ShowLeaderLines = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "leaderLines") { foreach (XElement element2 in element.Elements()) { if (element2.Name.LocalName == "spPr") { ExcelChartFormat format2 = new ExcelChartFormat(); format2.ReadXml(element2, mFolder, xFile); this.LeaderLineFormat = format2; } } } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format3 = new ExcelChartFormat(); format3.ReadXml(element, mFolder, xFile); this.ShapeFormat = format3; } else if (element.Name.LocalName == "txPr") { ExcelTextFormat format4 = new ExcelTextFormat(); format4.ReadXml(element, mFolder, xFile); this.TextFormat = format4; } } if (!this.IsShowLeaderLinesSet) { this._showLeaderLines = false; } if (!this.IsShowLegendKeySet) { this._showLegendKey = false; } if (!this.IsShowBubbleSizeSet) { this._showBubbleSize = false; } if (!this.IsShowCategoryNameSet) { this._showCategoryName = false; } if (!this.IsShowPercentageSet) { this._showPercentage = false; } if (!this.IsShowSeriesNameSet) { this._showSeriesName = false; } if (!this.IsShowValueSet) { this._showValue = false; } }
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 == "name") { this.Name = element.Value; } else if (element.Name.LocalName == "trendlineType") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "linear")) { case "exp": this.TrendlineType = ExcelTrendLineType.Exponential; break; case "linear": this.TrendlineType = ExcelTrendLineType.Linear; break; case "log": this.TrendlineType = ExcelTrendLineType.Logarithmic; break; case "movingAvg": this.TrendlineType = ExcelTrendLineType.MovingAverage; break; case "poly": this.TrendlineType = ExcelTrendLineType.Polynomial; break; case "power": this.TrendlineType = ExcelTrendLineType.Power; break; } } else if (element.Name.LocalName == "order") { this.Order = element.GetAttributeValueOrDefaultOfInt32Type("val", 2); } else if (element.Name.LocalName == "period") { this.Period = element.GetAttributeValueOrDefaultOfInt32Type("val", 2); } else if (element.Name.LocalName == "forward") { this.Forward = element.GetAttributeValueOrDefaultOfDoubleType("val", 0.0); } else if (element.Name.LocalName == "backward") { this.Backward = element.GetAttributeValueOrDefaultOfDoubleType("val", 0.0); } else if (element.Name.LocalName == "intercept") { this.Intercept = new double?(element.GetAttributeValueOrDefaultOfDoubleType("val", 0.0)); } else if (element.Name.LocalName == "dispRSqr") { this.DisplayRSquaredValue = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "dispEq") { this.DisplayEquation = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "trendlineLbl") { ExcelTrendLineLabel label = new ExcelTrendLineLabel(); label.ReadXml(element, mFolder, xFile); this.TrendLineLabel = label; } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.Foramt = format; } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "size") { this.MarkerSize = element.GetAttributeValueOrDefaultOfInt32Type("val", 5); } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format = new ExcelChartFormat(); format.ReadXml(element, mFolder, xFile); this.Format = format; } else if (element.Name.LocalName == "symbol") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "none")) { case "circle": this.MarkerStyle = DataPointMarkStyle.Circle; break; case "dash": this.MarkerStyle = DataPointMarkStyle.Dash; break; case "diamond": this.MarkerStyle = DataPointMarkStyle.Diamond; break; case "dot": this.MarkerStyle = DataPointMarkStyle.Dot; break; case "none": this.MarkerStyle = DataPointMarkStyle.None; break; case "picture": this.MarkerStyle = DataPointMarkStyle.Picture; break; case "plus": this.MarkerStyle = DataPointMarkStyle.Plus; break; case "square": this.MarkerStyle = DataPointMarkStyle.Square; break; case "star": this.MarkerStyle = DataPointMarkStyle.Star; break; case "triangle": this.MarkerStyle = DataPointMarkStyle.Triangle; break; case "x": this.MarkerStyle = DataPointMarkStyle.X; break; } } } }
internal void ReadXml(XElement node, MemoryFolder mFolder, XFile xFile) { foreach (XElement element in node.Elements()) { if (element.Name.LocalName == "idx") { this.Index = element.GetAttributeValueOrDefaultOfInt32Type("val", 0); } else if (element.Name.LocalName == "layout") { Dt.Xls.Chart.Layout layout = new Dt.Xls.Chart.Layout(); layout.ReadXml(element, mFolder, xFile); this.Layout = layout; } else if (element.Name.LocalName == "delete") { this.Delete = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "numFmt") { Dt.Xls.Chart.NumberFormat format = ChartCommonSimpleNodeHelper.ReadNumberFormatNode(element); this.NumberFormat = format.NumberFormatCode; this.NumberFormatLinked = format.LinkToSource; } else if (element.Name.LocalName == "dLblPos") { switch (element.GetAttributeValueOrDefaultOfStringType("val", "bestFit")) { case "b": this.Position = DataLabelPosition.Bottom; break; case "bestFit": this.Position = DataLabelPosition.BestFit; break; case "ctr": this.Position = DataLabelPosition.Center; break; case "inBase": this.Position = DataLabelPosition.InsideBase; break; case "inEnd": this.Position = DataLabelPosition.InsideEnd; break; case "l": this.Position = DataLabelPosition.Left; break; case "outEnd": this.Position = DataLabelPosition.OutsideEnd; break; case "r": this.Position = DataLabelPosition.Right; break; case "t": this.Position = DataLabelPosition.Top; break; } } else if (element.Name.LocalName == "separator") { this.Separator = element.Value; } else if (element.Name.LocalName == "showLegendKey") { this.ShowLegendKey = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showVal") { this.ShowValue = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showCatName") { this.ShowCategoryName = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showSerName") { this.ShowSeriesName = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showPercent") { this.ShowPercentage = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "showBubbleSize") { this.ShowBubbleSize = element.GetAttributeValueOrDefaultOfBooleanType("val", true); } else if (element.Name.LocalName == "tx") { foreach (XElement element2 in element.Elements()) { if (element2.Name.LocalName == "rich") { Dt.Xls.Chart.RichText text = new Dt.Xls.Chart.RichText(); text.ReadXml(element2, mFolder, xFile); this.RichText = text; } else if (element2.Name.LocalName == "strRef") { this.TextFormula = element2.GetChildElementValue("f"); if (ParsingContext.ReferenceStyle == ExcelReferenceStyle.R1C1) { this.TextFormula = ParsingContext.ConvertA1FormulaToR1C1Formula(this.TextFormula, 0, 0); } } } } else if (element.Name.LocalName == "spPr") { ExcelChartFormat format2 = new ExcelChartFormat(); format2.ReadXml(element, mFolder, xFile); this.ShapeFormat = format2; } else if (element.Name.LocalName == "txPr") { ExcelTextFormat format3 = new ExcelTextFormat(); format3.ReadXml(element, mFolder, xFile); this.TextFormat = format3; } } }
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; } } } } } } } } } } }