public static CT_BarChart Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_BarChart ctObj = new CT_BarChart(); ctObj.ser = new List <CT_BarSer>(); ctObj.serLines = new List <CT_ChartLines>(); ctObj.axId = new List <CT_UnsignedInt>(); ctObj.extLst = new List <CT_Extension>(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "barDir") { ctObj.barDir = CT_BarDir.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "grouping") { ctObj.grouping = CT_BarGrouping.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "varyColors") { ctObj.varyColors = CT_Boolean.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "dLbls") { ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "gapWidth") { ctObj.gapWidth = CT_GapAmount.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "overlap") { ctObj.overlap = CT_Overlap.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "ser") { ctObj.ser.Add(CT_BarSer.Parse(childNode, namespaceManager)); } else if (childNode.Name.LocalName == "serLines") { ctObj.serLines.Add(CT_ChartLines.Parse(childNode, namespaceManager)); } else if (childNode.Name.LocalName == "axId") { ctObj.axId.Add(CT_UnsignedInt.Parse(childNode, namespaceManager)); } else if (childNode.Name.LocalName == "extLst") { ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager)); } } return(ctObj); }
public static CT_BarSer Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_BarSer ctObj = new CT_BarSer(); ctObj.dPt = new List <CT_DPt>(); ctObj.trendline = new List <CT_Trendline>(); ctObj.extLst = new List <CT_Extension>(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "idx") { ctObj.idx = CT_UnsignedInt.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "order") { ctObj.order = CT_UnsignedInt.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "tx") { ctObj.tx = CT_SerTx.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "spPr") { ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "invertIfNegative") { ctObj.invertIfNegative = CT_Boolean.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "pictureOptions") { ctObj.pictureOptions = CT_PictureOptions.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "dLbls") { ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "errBars") { ctObj.errBars = CT_ErrBars.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "cat") { ctObj.cat = CT_AxDataSource.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "val") { ctObj.val = CT_NumDataSource.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "shape") { ctObj.shape = CT_Shape.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "dPt") { ctObj.dPt.Add(CT_DPt.Parse(childNode, namespaceManager)); } else if (childNode.Name.LocalName == "trendline") { ctObj.trendline.Add(CT_Trendline.Parse(childNode, namespaceManager)); } else if (childNode.Name.LocalName == "extLst") { ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager)); } } return(ctObj); }