Esempio n. 1
0
        public static CT_Pie3DChart Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Pie3DChart ctObj = new CT_Pie3DChart();

            ctObj.ser    = new List <CT_PieSer>();
            ctObj.extLst = new List <CT_Extension>();
            foreach (XElement childNode in node.ChildElements())
            {
                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 == "ser")
                {
                    ctObj.ser.Add(CT_PieSer.Parse(childNode, namespaceManager));
                }
                else if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Esempio n. 2
0
        public static CT_OfPieChart Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_OfPieChart ctObj = new CT_OfPieChart();

            ctObj.ser       = new List <CT_PieSer>();
            ctObj.custSplit = new List <CT_UnsignedInt>();
            ctObj.serLines  = new List <CT_ChartLines>();
            ctObj.extLst    = new List <CT_Extension>();
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "ofPieType")
                {
                    ctObj.ofPieType = CT_OfPieType.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 == "splitType")
                {
                    ctObj.splitType = CT_SplitType.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "splitPos")
                {
                    ctObj.splitPos = CT_Double.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "secondPieSize")
                {
                    ctObj.secondPieSize = CT_SecondPieSize.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "ser")
                {
                    ctObj.ser.Add(CT_PieSer.Parse(childNode, namespaceManager));
                }
                else if (childNode.Name.LocalName == "custSplit")
                {
                    ctObj.custSplit.Add(CT_UnsignedInt.Parse(childNode, namespaceManager));
                }
                else if (childNode.Name.LocalName == "serLines")
                {
                    ctObj.serLines.Add(CT_ChartLines.Parse(childNode, namespaceManager));
                }
                else if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }