npoi
1163 строки · 31.7 Кб
1using NPOI.OpenXml4Net.Util;
2using System;
3using System.Collections.Generic;
4using System.ComponentModel;
5using System.IO;
6using System.Text;
7using System.Xml;
8using System.Xml.Serialization;
9
10namespace NPOI.OpenXmlFormats.Dml.Chart
11{
12
13
14[Serializable]
15
16[System.ComponentModel.DesignerCategoryAttribute("code")]
17[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
18[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
19public class CT_Pie3DChart
20{
21
22private CT_Boolean varyColorsField;
23
24private List<CT_PieSer> serField;
25
26private CT_DLbls dLblsField;
27
28private List<CT_Extension> extLstField;
29
30public CT_Pie3DChart()
31{
32}
33public static CT_Pie3DChart Parse(XmlNode node, XmlNamespaceManager namespaceManager)
34{
35if (node == null)
36return null;
37CT_Pie3DChart ctObj = new CT_Pie3DChart();
38ctObj.ser = new List<CT_PieSer>();
39ctObj.extLst = new List<CT_Extension>();
40foreach (XmlNode childNode in node.ChildNodes)
41{
42if (childNode.LocalName == "varyColors")
43ctObj.varyColors = CT_Boolean.Parse(childNode, namespaceManager);
44else if (childNode.LocalName == "dLbls")
45ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
46else if (childNode.LocalName == "ser")
47ctObj.ser.Add(CT_PieSer.Parse(childNode, namespaceManager));
48else if (childNode.LocalName == "extLst")
49ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
50}
51return ctObj;
52}
53
54
55
56internal void Write(StreamWriter sw, string nodeName)
57{
58sw.Write(string.Format("<c:{0}", nodeName));
59sw.Write(">");
60if (this.varyColors != null)
61this.varyColors.Write(sw, "varyColors");
62if (this.dLbls != null)
63this.dLbls.Write(sw, "dLbls");
64if (this.ser != null)
65{
66foreach (CT_PieSer x in this.ser)
67{
68x.Write(sw, "ser");
69}
70}
71if (this.extLst != null)
72{
73foreach (CT_Extension x in this.extLst)
74{
75x.Write(sw, "extLst");
76}
77}
78sw.Write(string.Format("</c:{0}>", nodeName));
79}
80
81public int GetSeriesCount()
82{
83return this.serField == null ? 0 : this.serField.Count;
84}
85
86[XmlElement(Order = 0)]
87public CT_Boolean varyColors
88{
89get
90{
91return this.varyColorsField;
92}
93set
94{
95this.varyColorsField = value;
96}
97}
98
99[XmlElement("ser", Order = 1)]
100public List<CT_PieSer> ser
101{
102get
103{
104return this.serField;
105}
106set
107{
108this.serField = value;
109}
110}
111
112[XmlElement(Order = 2)]
113public CT_DLbls dLbls
114{
115get
116{
117return this.dLblsField;
118}
119set
120{
121this.dLblsField = value;
122}
123}
124
125[XmlElement(Order = 3)]
126public List<CT_Extension> extLst
127{
128get
129{
130return this.extLstField;
131}
132set
133{
134this.extLstField = value;
135}
136}
137}
138
139
140[Serializable]
141
142[System.ComponentModel.DesignerCategoryAttribute("code")]
143[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
144[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
145public class CT_PieChart
146{
147
148private CT_Boolean varyColorsField;
149
150private List<CT_PieSer> serField;
151
152private CT_DLbls dLblsField;
153
154private CT_FirstSliceAng firstSliceAngField;
155
156private List<CT_Extension> extLstField;
157
158public CT_PieChart()
159{
160}
161public static CT_PieChart Parse(XmlNode node, XmlNamespaceManager namespaceManager)
162{
163if (node == null)
164return null;
165CT_PieChart ctObj = new CT_PieChart();
166ctObj.ser = new List<CT_PieSer>();
167ctObj.extLst = new List<CT_Extension>();
168foreach (XmlNode childNode in node.ChildNodes)
169{
170if (childNode.LocalName == "varyColors")
171ctObj.varyColors = CT_Boolean.Parse(childNode, namespaceManager);
172else if (childNode.LocalName == "dLbls")
173ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
174else if (childNode.LocalName == "firstSliceAng")
175ctObj.firstSliceAng = CT_FirstSliceAng.Parse(childNode, namespaceManager);
176else if (childNode.LocalName == "ser")
177ctObj.ser.Add(CT_PieSer.Parse(childNode, namespaceManager));
178else if (childNode.LocalName == "extLst")
179ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
180}
181return ctObj;
182}
183
184
185
186internal void Write(StreamWriter sw, string nodeName)
187{
188sw.Write(string.Format("<c:{0}", nodeName));
189sw.Write(">");
190if (this.varyColors != null)
191this.varyColors.Write(sw, "varyColors");
192if (this.dLbls != null)
193this.dLbls.Write(sw, "dLbls");
194if (this.firstSliceAng != null)
195this.firstSliceAng.Write(sw, "firstSliceAng");
196if (this.ser != null)
197{
198foreach (CT_PieSer x in this.ser)
199{
200x.Write(sw, "ser");
201}
202}
203if (this.extLst != null)
204{
205foreach (CT_Extension x in this.extLst)
206{
207x.Write(sw, "extLst");
208}
209}
210sw.Write(string.Format("</c:{0}>", nodeName));
211}
212
213public int GetSeriesCount()
214{
215return this.serField == null ? 0 : this.serField.Count;
216}
217
218[XmlElement(Order = 0)]
219public CT_Boolean varyColors
220{
221get
222{
223return this.varyColorsField;
224}
225set
226{
227this.varyColorsField = value;
228}
229}
230
231[XmlElement("ser", Order = 1)]
232public List<CT_PieSer> ser
233{
234get
235{
236return this.serField;
237}
238set
239{
240this.serField = value;
241}
242}
243
244[XmlElement(Order = 2)]
245public CT_DLbls dLbls
246{
247get
248{
249return this.dLblsField;
250}
251set
252{
253this.dLblsField = value;
254}
255}
256
257[XmlElement(Order = 3)]
258public CT_FirstSliceAng firstSliceAng
259{
260get
261{
262return this.firstSliceAngField;
263}
264set
265{
266this.firstSliceAngField = value;
267}
268}
269
270[XmlElement(Order = 4)]
271public List<CT_Extension> extLst
272{
273get
274{
275return this.extLstField;
276}
277set
278{
279this.extLstField = value;
280}
281}
282
283public CT_PieSer AddNewSer()
284{
285CT_PieSer newSer = new CT_PieSer();
286if (this.serField == null)
287{
288this.serField = new List<CT_PieSer>();
289}
290this.serField.Add(newSer);
291return newSer;
292}
293
294public CT_Boolean AddNewVaryColors()
295{
296this.varyColorsField = new CT_Boolean();
297return this.varyColorsField;
298}
299}
300
301[Serializable]
302
303[System.ComponentModel.DesignerCategoryAttribute("code")]
304[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
305[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
306public class CT_PieSer
307{
308
309private CT_UnsignedInt idxField;
310
311private CT_UnsignedInt orderField;
312
313private CT_SerTx txField;
314
315private CT_ShapeProperties spPrField;
316
317private CT_UnsignedInt explosionField;
318
319private List<CT_DPt> dPtField;
320
321private CT_DLbls dLblsField;
322
323private CT_AxDataSource catField;
324
325private CT_NumDataSource valField;
326
327private List<CT_Extension> extLstField;
328
329public CT_PieSer()
330{
331dPt = new List<CT_DPt>();
332}
333public static CT_PieSer Parse(XmlNode node, XmlNamespaceManager namespaceManager)
334{
335if (node == null)
336return null;
337CT_PieSer ctObj = new CT_PieSer();
338ctObj.dPt = new List<CT_DPt>();
339ctObj.extLst = new List<CT_Extension>();
340foreach (XmlNode childNode in node.ChildNodes)
341{
342if (childNode.LocalName == "idx")
343ctObj.idx = CT_UnsignedInt.Parse(childNode, namespaceManager);
344else if (childNode.LocalName == "order")
345ctObj.order = CT_UnsignedInt.Parse(childNode, namespaceManager);
346else if (childNode.LocalName == "tx")
347ctObj.tx = CT_SerTx.Parse(childNode, namespaceManager);
348else if (childNode.LocalName == "spPr")
349ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager);
350else if (childNode.LocalName == "explosion")
351ctObj.explosion = CT_UnsignedInt.Parse(childNode, namespaceManager);
352else if (childNode.LocalName == "dLbls")
353ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
354else if (childNode.LocalName == "cat")
355ctObj.cat = CT_AxDataSource.Parse(childNode, namespaceManager);
356else if (childNode.LocalName == "val")
357ctObj.val = CT_NumDataSource.Parse(childNode, namespaceManager);
358else if (childNode.LocalName == "dPt")
359ctObj.dPt.Add(CT_DPt.Parse(childNode, namespaceManager));
360else if (childNode.LocalName == "extLst")
361ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
362}
363return ctObj;
364}
365
366
367
368internal void Write(StreamWriter sw, string nodeName)
369{
370sw.Write(string.Format("<c:{0}", nodeName));
371sw.Write(">");
372if (this.idx != null)
373this.idx.Write(sw, "idx");
374if (this.order != null)
375this.order.Write(sw, "order");
376if (this.tx != null)
377this.tx.Write(sw, "tx");
378if (this.spPr != null)
379this.spPr.Write(sw, "spPr");
380if (this.explosion != null)
381this.explosion.Write(sw, "explosion");
382if (this.dLbls != null)
383this.dLbls.Write(sw, "dLbls");
384if (this.cat != null)
385this.cat.Write(sw, "cat");
386if (this.val != null)
387this.val.Write(sw, "val");
388if (this.dPt != null)
389{
390foreach (CT_DPt x in this.dPt)
391{
392x.Write(sw, "dPt");
393}
394}
395if (this.extLst != null)
396{
397foreach (CT_Extension x in this.extLst)
398{
399x.Write(sw, "extLst");
400}
401}
402sw.Write(string.Format("</c:{0}>", nodeName));
403}
404
405[XmlElement(Order = 0)]
406public CT_UnsignedInt idx
407{
408get
409{
410return this.idxField;
411}
412set
413{
414this.idxField = value;
415}
416}
417
418[XmlElement(Order = 1)]
419public CT_UnsignedInt order
420{
421get
422{
423return this.orderField;
424}
425set
426{
427this.orderField = value;
428}
429}
430
431[XmlElement(Order = 2)]
432public CT_SerTx tx
433{
434get
435{
436return this.txField;
437}
438set
439{
440this.txField = value;
441}
442}
443
444[XmlElement(Order = 3)]
445public CT_ShapeProperties spPr
446{
447get
448{
449return this.spPrField;
450}
451set
452{
453this.spPrField = value;
454}
455}
456
457[XmlElement(Order = 4)]
458public CT_UnsignedInt explosion
459{
460get
461{
462return this.explosionField;
463}
464set
465{
466this.explosionField = value;
467}
468}
469
470[XmlElement("dPt", Order = 5)]
471public List<CT_DPt> dPt
472{
473get
474{
475return this.dPtField;
476}
477set
478{
479this.dPtField = value;
480}
481}
482
483[XmlElement(Order = 6)]
484public CT_DLbls dLbls
485{
486get
487{
488return this.dLblsField;
489}
490set
491{
492this.dLblsField = value;
493}
494}
495
496[XmlElement(Order = 7)]
497public CT_AxDataSource cat
498{
499get
500{
501return this.catField;
502}
503set
504{
505this.catField = value;
506}
507}
508
509[XmlElement(Order = 8)]
510public CT_NumDataSource val
511{
512get
513{
514return this.valField;
515}
516set
517{
518this.valField = value;
519}
520}
521
522[XmlArray(Order = 9)]
523[XmlArrayItem("ext", IsNullable = false)]
524public List<CT_Extension> extLst
525{
526get
527{
528return this.extLstField;
529}
530set
531{
532this.extLstField = value;
533}
534}
535
536public CT_UnsignedInt AddNewIdx()
537{
538this.idxField = new CT_UnsignedInt();
539return this.idxField;
540}
541
542public CT_UnsignedInt AddNewOrder()
543{
544this.orderField = new CT_UnsignedInt();
545return this.orderField;
546}
547
548public CT_AxDataSource AddNewCat()
549{
550this.catField = new CT_AxDataSource();
551return this.catField;
552}
553
554public CT_NumDataSource AddNewVal()
555{
556this.valField = new CT_NumDataSource();
557return this.valField;
558}
559}
560
561
562
563
564[Serializable]
565
566[System.ComponentModel.DesignerCategoryAttribute("code")]
567[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
568[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
569public class CT_HoleSize
570{
571
572private byte valField;
573
574public CT_HoleSize()
575{
576this.valField = ((byte)(10));
577}
578public static CT_HoleSize Parse(XmlNode node, XmlNamespaceManager namespaceManager)
579{
580if (node == null)
581return null;
582CT_HoleSize ctObj = new CT_HoleSize();
583if (node.Attributes["val"] != null)
584ctObj.val = XmlHelper.ReadByte(node.Attributes["val"]);
585return ctObj;
586}
587
588
589
590internal void Write(StreamWriter sw, string nodeName)
591{
592sw.Write(string.Format("<c:{0}", nodeName));
593XmlHelper.WriteAttribute(sw, "val", this.val);
594sw.Write(">");
595sw.Write(string.Format("</c:{0}>", nodeName));
596}
597
598[XmlAttribute]
599[DefaultValue(typeof(byte), "10")]
600public byte val
601{
602get
603{
604return this.valField;
605}
606set
607{
608this.valField = value;
609}
610}
611}
612
613
614[Serializable]
615
616[System.ComponentModel.DesignerCategoryAttribute("code")]
617[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
618[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
619public class CT_FirstSliceAng
620{
621
622private ushort valField;
623
624public CT_FirstSliceAng()
625{
626this.valField = ((ushort)(0));
627}
628public static CT_FirstSliceAng Parse(XmlNode node, XmlNamespaceManager namespaceManager)
629{
630if (node == null)
631return null;
632CT_FirstSliceAng ctObj = new CT_FirstSliceAng();
633if (node.Attributes["val"] != null)
634ctObj.val = XmlHelper.ReadUShort(node.Attributes["val"]);
635return ctObj;
636}
637
638
639
640internal void Write(StreamWriter sw, string nodeName)
641{
642sw.Write(string.Format("<c:{0}", nodeName));
643XmlHelper.WriteAttribute(sw, "val", this.val);
644sw.Write(">");
645sw.Write(string.Format("</c:{0}>", nodeName));
646}
647
648[XmlAttribute]
649[DefaultValue(typeof(ushort), "0")]
650public ushort val
651{
652get
653{
654return this.valField;
655}
656set
657{
658this.valField = value;
659}
660}
661}
662
663
664[Serializable]
665
666[System.ComponentModel.DesignerCategoryAttribute("code")]
667[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
668[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
669public class CT_DoughnutChart
670{
671
672private CT_Boolean varyColorsField;
673
674private List<CT_PieSer> serField;
675
676private CT_DLbls dLblsField;
677
678private CT_FirstSliceAng firstSliceAngField;
679
680private CT_HoleSize holeSizeField;
681
682private List<CT_Extension> extLstField;
683
684public CT_DoughnutChart()
685{
686}
687public static CT_DoughnutChart Parse(XmlNode node, XmlNamespaceManager namespaceManager)
688{
689if (node == null)
690return null;
691CT_DoughnutChart ctObj = new CT_DoughnutChart();
692ctObj.ser = new List<CT_PieSer>();
693ctObj.extLst = new List<CT_Extension>();
694foreach (XmlNode childNode in node.ChildNodes)
695{
696if (childNode.LocalName == "varyColors")
697ctObj.varyColors = CT_Boolean.Parse(childNode, namespaceManager);
698else if (childNode.LocalName == "dLbls")
699ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
700else if (childNode.LocalName == "firstSliceAng")
701ctObj.firstSliceAng = CT_FirstSliceAng.Parse(childNode, namespaceManager);
702else if (childNode.LocalName == "holeSize")
703ctObj.holeSize = CT_HoleSize.Parse(childNode, namespaceManager);
704else if (childNode.LocalName == "ser")
705ctObj.ser.Add(CT_PieSer.Parse(childNode, namespaceManager));
706else if (childNode.LocalName == "extLst")
707ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
708}
709return ctObj;
710}
711
712
713
714internal void Write(StreamWriter sw, string nodeName)
715{
716sw.Write(string.Format("<c:{0}", nodeName));
717sw.Write(">");
718if (this.varyColors != null)
719this.varyColors.Write(sw, "varyColors");
720if (this.dLbls != null)
721this.dLbls.Write(sw, "dLbls");
722if (this.firstSliceAng != null)
723this.firstSliceAng.Write(sw, "firstSliceAng");
724if (this.holeSize != null)
725this.holeSize.Write(sw, "holeSize");
726if (this.ser != null)
727{
728foreach (CT_PieSer x in this.ser)
729{
730x.Write(sw, "ser");
731}
732}
733if (this.extLst != null)
734{
735foreach (CT_Extension x in this.extLst)
736{
737x.Write(sw, "extLst");
738}
739}
740sw.Write(string.Format("</c:{0}>", nodeName));
741}
742
743public int GetSeriesCount()
744{
745return this.serField == null ? 0 : this.serField.Count;
746}
747
748[XmlElement(Order = 0)]
749public CT_Boolean varyColors
750{
751get
752{
753return this.varyColorsField;
754}
755set
756{
757this.varyColorsField = value;
758}
759}
760
761[XmlElement("ser", Order = 1)]
762public List<CT_PieSer> ser
763{
764get
765{
766return this.serField;
767}
768set
769{
770this.serField = value;
771}
772}
773
774[XmlElement(Order = 2)]
775public CT_DLbls dLbls
776{
777get
778{
779return this.dLblsField;
780}
781set
782{
783this.dLblsField = value;
784}
785}
786
787[XmlElement(Order = 3)]
788public CT_FirstSliceAng firstSliceAng
789{
790get
791{
792return this.firstSliceAngField;
793}
794set
795{
796this.firstSliceAngField = value;
797}
798}
799
800[XmlElement(Order = 4)]
801public CT_HoleSize holeSize
802{
803get
804{
805return this.holeSizeField;
806}
807set
808{
809this.holeSizeField = value;
810}
811}
812
813[XmlArray(Order = 5)]
814[XmlArrayItem("ext", IsNullable = false)]
815public List<CT_Extension> extLst
816{
817get
818{
819return this.extLstField;
820}
821set
822{
823this.extLstField = value;
824}
825}
826}
827
828[Serializable]
829
830[System.ComponentModel.DesignerCategoryAttribute("code")]
831[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
832[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
833public class CT_OfPieType
834{
835
836private ST_OfPieType valField;
837
838public CT_OfPieType()
839{
840this.valField = ST_OfPieType.pie;
841}
842public static CT_OfPieType Parse(XmlNode node, XmlNamespaceManager namespaceManager)
843{
844if (node == null)
845return null;
846CT_OfPieType ctObj = new CT_OfPieType();
847if (node.Attributes["val"] != null)
848ctObj.val = (ST_OfPieType)Enum.Parse(typeof(ST_OfPieType), node.Attributes["val"].Value);
849return ctObj;
850}
851
852
853
854internal void Write(StreamWriter sw, string nodeName)
855{
856sw.Write(string.Format("<c:{0}", nodeName));
857XmlHelper.WriteAttribute(sw, "val", this.val.ToString());
858sw.Write(">");
859sw.Write(string.Format("</c:{0}>", nodeName));
860}
861
862[XmlAttribute]
863[DefaultValue(ST_OfPieType.pie)]
864public ST_OfPieType val
865{
866get
867{
868return this.valField;
869}
870set
871{
872this.valField = value;
873}
874}
875}
876
877
878[Serializable]
879[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
880public enum ST_OfPieType
881{
882
883/// <remarks/>
884pie,
885
886/// <remarks/>
887bar,
888}
889
890
891[Serializable]
892
893[System.ComponentModel.DesignerCategoryAttribute("code")]
894[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
895[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
896public class CT_OfPieChart
897{
898
899private CT_OfPieType ofPieTypeField;
900
901private CT_Boolean varyColorsField;
902
903private List<CT_PieSer> serField;
904
905private CT_DLbls dLblsField;
906
907private CT_GapAmount gapWidthField;
908
909private CT_SplitType splitTypeField;
910
911private CT_Double splitPosField;
912
913private List<CT_UnsignedInt> custSplitField;
914
915private CT_SecondPieSize secondPieSizeField;
916
917private List<CT_ChartLines> serLinesField;
918
919private List<CT_Extension> extLstField;
920
921public CT_OfPieChart()
922{
923}
924
925public static CT_OfPieChart Parse(XmlNode node, XmlNamespaceManager namespaceManager)
926{
927if (node == null)
928return null;
929CT_OfPieChart ctObj = new CT_OfPieChart();
930ctObj.ser = new List<CT_PieSer>();
931ctObj.custSplit = new List<CT_UnsignedInt>();
932ctObj.serLines = new List<CT_ChartLines>();
933ctObj.extLst = new List<CT_Extension>();
934foreach (XmlNode childNode in node.ChildNodes)
935{
936if (childNode.LocalName == "ofPieType")
937ctObj.ofPieType = CT_OfPieType.Parse(childNode, namespaceManager);
938else if (childNode.LocalName == "varyColors")
939ctObj.varyColors = CT_Boolean.Parse(childNode, namespaceManager);
940else if (childNode.LocalName == "dLbls")
941ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
942else if (childNode.LocalName == "gapWidth")
943ctObj.gapWidth = CT_GapAmount.Parse(childNode, namespaceManager);
944else if (childNode.LocalName == "splitType")
945ctObj.splitType = CT_SplitType.Parse(childNode, namespaceManager);
946else if (childNode.LocalName == "splitPos")
947ctObj.splitPos = CT_Double.Parse(childNode, namespaceManager);
948else if (childNode.LocalName == "secondPieSize")
949ctObj.secondPieSize = CT_SecondPieSize.Parse(childNode, namespaceManager);
950else if (childNode.LocalName == "ser")
951ctObj.ser.Add(CT_PieSer.Parse(childNode, namespaceManager));
952else if (childNode.LocalName == "custSplit")
953ctObj.custSplit.Add(CT_UnsignedInt.Parse(childNode, namespaceManager));
954else if (childNode.LocalName == "serLines")
955ctObj.serLines.Add(CT_ChartLines.Parse(childNode, namespaceManager));
956else if (childNode.LocalName == "extLst")
957ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
958}
959return ctObj;
960}
961
962
963
964internal void Write(StreamWriter sw, string nodeName)
965{
966sw.Write(string.Format("<c:{0}", nodeName));
967sw.Write(">");
968if (this.ofPieType != null)
969this.ofPieType.Write(sw, "ofPieType");
970if (this.varyColors != null)
971this.varyColors.Write(sw, "varyColors");
972if (this.dLbls != null)
973this.dLbls.Write(sw, "dLbls");
974if (this.gapWidth != null)
975this.gapWidth.Write(sw, "gapWidth");
976if (this.splitType != null)
977this.splitType.Write(sw, "splitType");
978if (this.splitPos != null)
979this.splitPos.Write(sw, "splitPos");
980if (this.secondPieSize != null)
981this.secondPieSize.Write(sw, "secondPieSize");
982if (this.ser != null)
983{
984foreach (CT_PieSer x in this.ser)
985{
986x.Write(sw, "ser");
987}
988}
989if (this.custSplit != null)
990{
991foreach (CT_UnsignedInt x in this.custSplit)
992{
993x.Write(sw, "custSplit");
994}
995}
996if (this.serLines != null)
997{
998foreach (CT_ChartLines x in this.serLines)
999{
1000x.Write(sw, "serLines");
1001}
1002}
1003if (this.extLst != null)
1004{
1005foreach (CT_Extension x in this.extLst)
1006{
1007x.Write(sw, "extLst");
1008}
1009}
1010sw.Write(string.Format("</c:{0}>", nodeName));
1011}
1012
1013public int GetSeriesCount()
1014{
1015return this.serField == null ? 0 : this.serField.Count;
1016}
1017
1018[XmlElement(Order = 0)]
1019public CT_OfPieType ofPieType
1020{
1021get
1022{
1023return this.ofPieTypeField;
1024}
1025set
1026{
1027this.ofPieTypeField = value;
1028}
1029}
1030
1031[XmlElement(Order = 1)]
1032public CT_Boolean varyColors
1033{
1034get
1035{
1036return this.varyColorsField;
1037}
1038set
1039{
1040this.varyColorsField = value;
1041}
1042}
1043
1044[XmlElement("ser", Order = 2)]
1045public List<CT_PieSer> ser
1046{
1047get
1048{
1049return this.serField;
1050}
1051set
1052{
1053this.serField = value;
1054}
1055}
1056
1057[XmlElement(Order = 3)]
1058public CT_DLbls dLbls
1059{
1060get
1061{
1062return this.dLblsField;
1063}
1064set
1065{
1066this.dLblsField = value;
1067}
1068}
1069
1070[XmlElement(Order = 4)]
1071public CT_GapAmount gapWidth
1072{
1073get
1074{
1075return this.gapWidthField;
1076}
1077set
1078{
1079this.gapWidthField = value;
1080}
1081}
1082
1083[XmlElement(Order = 5)]
1084public CT_SplitType splitType
1085{
1086get
1087{
1088return this.splitTypeField;
1089}
1090set
1091{
1092this.splitTypeField = value;
1093}
1094}
1095
1096[XmlElement(Order = 6)]
1097public CT_Double splitPos
1098{
1099get
1100{
1101return this.splitPosField;
1102}
1103set
1104{
1105this.splitPosField = value;
1106}
1107}
1108
1109[XmlElement(Order = 7)]
1110public List<CT_UnsignedInt> custSplit
1111{
1112get
1113{
1114return this.custSplitField;
1115}
1116set
1117{
1118this.custSplitField = value;
1119}
1120}
1121
1122[XmlElement(Order = 8)]
1123public CT_SecondPieSize secondPieSize
1124{
1125get
1126{
1127return this.secondPieSizeField;
1128}
1129set
1130{
1131this.secondPieSizeField = value;
1132}
1133}
1134
1135[XmlElement("serLines", Order = 9)]
1136public List<CT_ChartLines> serLines
1137{
1138get
1139{
1140return this.serLinesField;
1141}
1142set
1143{
1144this.serLinesField = value;
1145}
1146}
1147
1148[XmlArray(Order = 10)]
1149[XmlArrayItem("ext", IsNullable = false)]
1150public List<CT_Extension> extLst
1151{
1152get
1153{
1154return this.extLstField;
1155}
1156set
1157{
1158this.extLstField = value;
1159}
1160}
1161}
1162
1163}
1164