npoi

Форк
0
1035 строк · 28.1 Кб
1
using NPOI.OpenXml4Net.Util;
2
using System;
3
using System.Collections.Generic;
4
using System.ComponentModel;
5
using System.IO;
6
using System.Text;
7
using System.Xml;
8
using System.Xml.Serialization;
9

10
namespace 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)]
19
    public class CT_BarChart
20
    {
21

22
        private CT_BarDir barDirField;
23

24
        private CT_BarGrouping groupingField;
25

26
        private CT_Boolean varyColorsField;
27

28
        private List<CT_BarSer> serField;
29

30
        private CT_DLbls dLblsField;
31

32
        private CT_GapAmount gapWidthField;
33

34
        private CT_Overlap overlapField;
35

36
        private List<CT_ChartLines> serLinesField;
37

38
        private List<CT_UnsignedInt> axIdField;
39

40
        private List<CT_Extension> extLstField;
41

42
        public CT_BarChart()
43
        {
44
        }
45
        public static CT_BarChart Parse(XmlNode node, XmlNamespaceManager namespaceManager)
46
        {
47
            if (node == null)
48
                return null;
49
            CT_BarChart ctObj = new CT_BarChart();
50
            ctObj.ser = new List<CT_BarSer>();
51
            ctObj.serLines = new List<CT_ChartLines>();
52
            ctObj.axId = new List<CT_UnsignedInt>();
53
            ctObj.extLst = new List<CT_Extension>();
54
            foreach (XmlNode childNode in node.ChildNodes)
55
            {
56
                if (childNode.LocalName == "barDir")
57
                    ctObj.barDir = CT_BarDir.Parse(childNode, namespaceManager);
58
                else if (childNode.LocalName == "grouping")
59
                    ctObj.grouping = CT_BarGrouping.Parse(childNode, namespaceManager);
60
                else if (childNode.LocalName == "varyColors")
61
                    ctObj.varyColors = CT_Boolean.Parse(childNode, namespaceManager);
62
                else if (childNode.LocalName == "dLbls")
63
                    ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
64
                else if (childNode.LocalName == "gapWidth")
65
                    ctObj.gapWidth = CT_GapAmount.Parse(childNode, namespaceManager);
66
                else if (childNode.LocalName == "overlap")
67
                    ctObj.overlap = CT_Overlap.Parse(childNode, namespaceManager);
68
                else if (childNode.LocalName == "ser")
69
                    ctObj.ser.Add(CT_BarSer.Parse(childNode, namespaceManager));
70
                else if (childNode.LocalName == "serLines")
71
                    ctObj.serLines.Add(CT_ChartLines.Parse(childNode, namespaceManager));
72
                else if (childNode.LocalName == "axId")
73
                    ctObj.axId.Add(CT_UnsignedInt.Parse(childNode, namespaceManager));
74
                else if (childNode.LocalName == "extLst")
75
                    ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
76
            }
77
            return ctObj;
78
        }
79

80

81

82
        internal void Write(StreamWriter sw, string nodeName)
83
        {
84
            sw.Write(string.Format("<c:{0}", nodeName));
85
            sw.Write(">");
86
            if (this.barDir != null)
87
                this.barDir.Write(sw, "barDir");
88
            if (this.grouping != null)
89
                this.grouping.Write(sw, "grouping");
90
            if (this.varyColors != null)
91
                this.varyColors.Write(sw, "varyColors");
92
            if (this.gapWidth != null)
93
                this.gapWidth.Write(sw, "gapWidth");
94
            if (this.overlap != null)
95
                this.overlap.Write(sw, "overlap");
96
            if (this.ser != null)
97
            {
98
                foreach (CT_BarSer x in this.ser)
99
                {
100
                    x.Write(sw, "ser");
101
                }
102
            }
103
            if (this.serLines != null)
104
            {
105
                foreach (CT_ChartLines x in this.serLines)
106
                {
107
                    x.Write(sw, "serLines");
108
                }
109
            }
110
            if (this.dLbls != null)
111
                this.dLbls.Write(sw, "dLbls");
112
            if (this.axId != null)
113
            {
114
                foreach (CT_UnsignedInt x in this.axId)
115
                {
116
                    x.Write(sw, "axId");
117
                }
118
            }
119
            if (this.extLst != null)
120
            {
121
                foreach (CT_Extension x in this.extLst)
122
                {
123
                    x.Write(sw, "extLst");
124
                }
125
            }
126
            sw.Write(string.Format("</c:{0}>", nodeName));
127
        }
128

129
        public int GetSeriesCount()
130
        {
131
            return this.serField == null ? 0 : this.serField.Count;
132
        }
133

134
        [XmlElement(Order = 0)]
135
        public CT_BarDir barDir
136
        {
137
            get
138
            {
139
                return this.barDirField;
140
            }
141
            set
142
            {
143
                this.barDirField = value;
144
            }
145
        }
146

147
        [XmlElement(Order = 1)]
148
        public CT_BarGrouping grouping
149
        {
150
            get
151
            {
152
                return this.groupingField;
153
            }
154
            set
155
            {
156
                this.groupingField = value;
157
            }
158
        }
159

160
        [XmlElement(Order = 2)]
161
        public CT_Boolean varyColors
162
        {
163
            get
164
            {
165
                return this.varyColorsField;
166
            }
167
            set
168
            {
169
                this.varyColorsField = value;
170
            }
171
        }
172

173
        [XmlElement("ser", Order = 3)]
174
        public List<CT_BarSer> ser
175
        {
176
            get
177
            {
178
                return this.serField;
179
            }
180
            set
181
            {
182
                this.serField = value;
183
            }
184
        }
185

186
        [XmlElement(Order = 4)]
187
        public CT_DLbls dLbls
188
        {
189
            get
190
            {
191
                return this.dLblsField;
192
            }
193
            set
194
            {
195
                this.dLblsField = value;
196
            }
197
        }
198

199
        [XmlElement(Order = 5)]
200
        public CT_GapAmount gapWidth
201
        {
202
            get
203
            {
204
                return this.gapWidthField;
205
            }
206
            set
207
            {
208
                this.gapWidthField = value;
209
            }
210
        }
211

212
        [XmlElement(Order = 6)]
213
        public CT_Overlap overlap
214
        {
215
            get
216
            {
217
                return this.overlapField;
218
            }
219
            set
220
            {
221
                this.overlapField = value;
222
            }
223
        }
224

225
        [XmlElement("serLines", Order = 7)]
226
        public List<CT_ChartLines> serLines
227
        {
228
            get
229
            {
230
                return this.serLinesField;
231
            }
232
            set
233
            {
234
                this.serLinesField = value;
235
            }
236
        }
237

238
        [XmlElement("axId", Order = 8)]
239
        public List<CT_UnsignedInt> axId
240
        {
241
            get
242
            {
243
                return this.axIdField;
244
            }
245
            set
246
            {
247
                this.axIdField = value;
248
            }
249
        }
250

251
        [XmlArray(Order = 9)]
252
        [XmlArrayItem("ext", IsNullable = false)]
253
        public List<CT_Extension> extLst
254
        {
255
            get
256
            {
257
                return this.extLstField;
258
            }
259
            set
260
            {
261
                this.extLstField = value;
262
            }
263
        }
264

265
        public CT_BarGrouping AddNewGrouping()
266
        {
267
            this.groupingField = new CT_BarGrouping();
268
            return this.groupingField;
269
        }
270
        public CT_BarSer AddNewSer()
271
        {
272
            CT_BarSer newSer = new CT_BarSer();
273
            if (this.serField == null)
274
            {
275
                this.serField = new List<CT_BarSer>();
276
            }
277
            this.serField.Add(newSer);
278
            return newSer;
279
        }
280

281
        public CT_Boolean AddNewVaryColors()
282
        {
283
            this.varyColorsField = new CT_Boolean();
284
            return this.varyColorsField;
285
        }
286

287
        public CT_UnsignedInt AddNewAxId()
288
        {
289
            CT_UnsignedInt si = new CT_UnsignedInt();
290
            if (this.axIdField == null)
291
                this.axIdField = new List<CT_UnsignedInt>();
292
            axIdField.Add(si);
293
            return si;
294
        }
295

296
        public CT_BarDir AddNewBarDir()
297
        {
298
            this.barDirField = new CT_BarDir();
299
            return this.barDirField;
300
        }
301
    }
302

303

304
    [Serializable]
305

306
    [System.ComponentModel.DesignerCategoryAttribute("code")]
307
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
308
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
309
    public class CT_BarDir
310
    {
311

312
        private ST_BarDir valField;
313

314
        public CT_BarDir()
315
        {
316
            this.valField = ST_BarDir.col;
317
        }
318
        public static CT_BarDir Parse(XmlNode node, XmlNamespaceManager namespaceManager)
319
        {
320
            if (node == null)
321
                return null;
322
            CT_BarDir ctObj = new CT_BarDir();
323
            if (node.Attributes["val"] != null)
324
                ctObj.val = (ST_BarDir)Enum.Parse(typeof(ST_BarDir), node.Attributes["val"].Value);
325
            return ctObj;
326
        }
327

328

329

330
        internal void Write(StreamWriter sw, string nodeName)
331
        {
332
            sw.Write(string.Format("<c:{0}", nodeName));
333
            XmlHelper.WriteAttribute(sw, "val", this.val.ToString());
334
            sw.Write(">");
335
            sw.Write(string.Format("</c:{0}>", nodeName));
336
        }
337

338
        [XmlAttribute]
339
        [DefaultValue(ST_BarDir.col)]
340
        public ST_BarDir val
341
        {
342
            get
343
            {
344
                return this.valField;
345
            }
346
            set
347
            {
348
                this.valField = value;
349
            }
350
        }
351
    }
352

353

354
    [Serializable]
355
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
356
    public enum ST_BarDir
357
    {
358

359
        /// <remarks/>
360
        bar,
361

362
        /// <remarks/>
363
        col,
364
    }
365

366

367
    [Serializable]
368

369
    [System.ComponentModel.DesignerCategoryAttribute("code")]
370
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
371
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
372
    public class CT_BarGrouping
373
    {
374

375
        private ST_BarGrouping valField;
376

377
        public CT_BarGrouping()
378
        {
379
            this.valField = ST_BarGrouping.clustered;
380
        }
381
        public static CT_BarGrouping Parse(XmlNode node, XmlNamespaceManager namespaceManager)
382
        {
383
            if (node == null)
384
                return null;
385
            CT_BarGrouping ctObj = new CT_BarGrouping();
386
            if (node.Attributes["val"] != null)
387
                ctObj.val = (ST_BarGrouping)Enum.Parse(typeof(ST_BarGrouping), node.Attributes["val"].Value);
388
            return ctObj;
389
        }
390

391

392

393
        internal void Write(StreamWriter sw, string nodeName)
394
        {
395
            sw.Write(string.Format("<c:{0}", nodeName));
396
            XmlHelper.WriteAttribute(sw, "val", this.val.ToString());
397
            sw.Write(">");
398
            sw.Write(string.Format("</c:{0}>", nodeName));
399
        }
400

401
        [XmlAttribute]
402
        [DefaultValue(ST_BarGrouping.clustered)]
403
        public ST_BarGrouping val
404
        {
405
            get
406
            {
407
                return this.valField;
408
            }
409
            set
410
            {
411
                this.valField = value;
412
            }
413
        }
414
    }
415

416

417
    [Serializable]
418
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
419
    public enum ST_BarGrouping
420
    {
421

422
        /// <remarks/>
423
        percentStacked,
424

425
        /// <remarks/>
426
        clustered,
427

428
        /// <remarks/>
429
        standard,
430

431
        /// <remarks/>
432
        stacked,
433
    }
434

435

436
    [Serializable]
437

438
    [System.ComponentModel.DesignerCategoryAttribute("code")]
439
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
440
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
441
    public class CT_BarSer
442
    {
443

444
        private CT_UnsignedInt idxField;
445

446
        private CT_UnsignedInt orderField;
447

448
        private CT_SerTx txField;
449

450
        private CT_ShapeProperties spPrField;
451

452
        private CT_Boolean invertIfNegativeField;
453

454
        private CT_PictureOptions pictureOptionsField;
455

456
        private List<CT_DPt> dPtField;
457

458
        private CT_DLbls dLblsField;
459

460
        private List<CT_Trendline> trendlineField;
461

462
        private CT_ErrBars errBarsField;
463

464
        private CT_AxDataSource catField;
465

466
        private CT_NumDataSource valField;
467

468
        private CT_Shape shapeField;
469

470
        private List<CT_Extension> extLstField;
471

472
        public CT_BarSer()
473
        {
474
        }
475
        public static CT_BarSer Parse(XmlNode node, XmlNamespaceManager namespaceManager)
476
        {
477
            if (node == null)
478
                return null;
479
            CT_BarSer ctObj = new CT_BarSer();
480
            ctObj.dPt = new List<CT_DPt>();
481
            ctObj.trendline = new List<CT_Trendline>();
482
            ctObj.extLst = new List<CT_Extension>();
483
            foreach (XmlNode childNode in node.ChildNodes)
484
            {
485
                if (childNode.LocalName == "idx")
486
                    ctObj.idx = CT_UnsignedInt.Parse(childNode, namespaceManager);
487
                else if (childNode.LocalName == "order")
488
                    ctObj.order = CT_UnsignedInt.Parse(childNode, namespaceManager);
489
                else if (childNode.LocalName == "tx")
490
                    ctObj.tx = CT_SerTx.Parse(childNode, namespaceManager);
491
                else if (childNode.LocalName == "spPr")
492
                    ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager);
493
                else if (childNode.LocalName == "invertIfNegative")
494
                    ctObj.invertIfNegative = CT_Boolean.Parse(childNode, namespaceManager);
495
                else if (childNode.LocalName == "pictureOptions")
496
                    ctObj.pictureOptions = CT_PictureOptions.Parse(childNode, namespaceManager);
497
                else if (childNode.LocalName == "dLbls")
498
                    ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
499
                else if (childNode.LocalName == "errBars")
500
                    ctObj.errBars = CT_ErrBars.Parse(childNode, namespaceManager);
501
                else if (childNode.LocalName == "cat")
502
                    ctObj.cat = CT_AxDataSource.Parse(childNode, namespaceManager);
503
                else if (childNode.LocalName == "val")
504
                    ctObj.val = CT_NumDataSource.Parse(childNode, namespaceManager);
505
                else if (childNode.LocalName == "shape")
506
                    ctObj.shape = CT_Shape.Parse(childNode, namespaceManager);
507
                else if (childNode.LocalName == "dPt")
508
                    ctObj.dPt.Add(CT_DPt.Parse(childNode, namespaceManager));
509
                else if (childNode.LocalName == "trendline")
510
                    ctObj.trendline.Add(CT_Trendline.Parse(childNode, namespaceManager));
511
                else if (childNode.LocalName == "extLst")
512
                    ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
513
            }
514
            return ctObj;
515
        }
516

517

518

519
        internal void Write(StreamWriter sw, string nodeName)
520
        {
521
            sw.Write(string.Format("<c:{0}", nodeName));
522
            sw.Write(">");
523
            if (this.idx != null)
524
                this.idx.Write(sw, "idx");
525
            if (this.order != null)
526
                this.order.Write(sw, "order");
527
            if (this.tx != null)
528
                this.tx.Write(sw, "tx");
529
            if (this.spPr != null)
530
                this.spPr.Write(sw, "spPr");
531
            if (this.invertIfNegative != null)
532
                this.invertIfNegative.Write(sw, "invertIfNegative");
533
            if (this.pictureOptions != null)
534
                this.pictureOptions.Write(sw, "pictureOptions");
535
            if (this.dLbls != null)
536
                this.dLbls.Write(sw, "dLbls");
537
            if (this.errBars != null)
538
                this.errBars.Write(sw, "errBars");
539
            if (this.cat != null)
540
                this.cat.Write(sw, "cat");
541
            if (this.val != null)
542
                this.val.Write(sw, "val");
543
            if (this.shape != null)
544
                this.shape.Write(sw, "shape");
545
            if (this.dPt != null)
546
            {
547
                foreach (CT_DPt x in this.dPt)
548
                {
549
                    x.Write(sw, "dPt");
550
                }
551
            }
552
            if (this.trendline != null)
553
            {
554
                foreach (CT_Trendline x in this.trendline)
555
                {
556
                    x.Write(sw, "trendline");
557
                }
558
            }
559
            if (this.extLst != null)
560
            {
561
                foreach (CT_Extension x in this.extLst)
562
                {
563
                    x.Write(sw, "extLst");
564
                }
565
            }
566
            sw.Write(string.Format("</c:{0}>", nodeName));
567
        }
568

569

570
        [XmlElement(Order = 0)]
571
        public CT_UnsignedInt idx
572
        {
573
            get
574
            {
575
                return this.idxField;
576
            }
577
            set
578
            {
579
                this.idxField = value;
580
            }
581
        }
582

583
        [XmlElement(Order = 1)]
584
        public CT_UnsignedInt order
585
        {
586
            get
587
            {
588
                return this.orderField;
589
            }
590
            set
591
            {
592
                this.orderField = value;
593
            }
594
        }
595

596
        [XmlElement(Order = 2)]
597
        public CT_SerTx tx
598
        {
599
            get
600
            {
601
                return this.txField;
602
            }
603
            set
604
            {
605
                this.txField = value;
606
            }
607
        }
608

609
        [XmlElement(Order = 3)]
610
        public CT_ShapeProperties spPr
611
        {
612
            get
613
            {
614
                return this.spPrField;
615
            }
616
            set
617
            {
618
                this.spPrField = value;
619
            }
620
        }
621

622
        [XmlElement(Order = 4)]
623
        public CT_Boolean invertIfNegative
624
        {
625
            get
626
            {
627
                return this.invertIfNegativeField;
628
            }
629
            set
630
            {
631
                this.invertIfNegativeField = value;
632
            }
633
        }
634

635
        [XmlElement(Order = 5)]
636
        public CT_PictureOptions pictureOptions
637
        {
638
            get
639
            {
640
                return this.pictureOptionsField;
641
            }
642
            set
643
            {
644
                this.pictureOptionsField = value;
645
            }
646
        }
647

648
        [XmlElement("dPt", Order = 6)]
649
        public List<CT_DPt> dPt
650
        {
651
            get
652
            {
653
                return this.dPtField;
654
            }
655
            set
656
            {
657
                this.dPtField = value;
658
            }
659
        }
660

661
        [XmlElement(Order = 7)]
662
        public CT_DLbls dLbls
663
        {
664
            get
665
            {
666
                return this.dLblsField;
667
            }
668
            set
669
            {
670
                this.dLblsField = value;
671
            }
672
        }
673

674
        [XmlElement("trendline", Order = 8)]
675
        public List<CT_Trendline> trendline
676
        {
677
            get
678
            {
679
                return this.trendlineField;
680
            }
681
            set
682
            {
683
                this.trendlineField = value;
684
            }
685
        }
686

687
        [XmlElement(Order = 9)]
688
        public CT_ErrBars errBars
689
        {
690
            get
691
            {
692
                return this.errBarsField;
693
            }
694
            set
695
            {
696
                this.errBarsField = value;
697
            }
698
        }
699

700
        [XmlElement(Order = 10)]
701
        public CT_AxDataSource cat
702
        {
703
            get
704
            {
705
                return this.catField;
706
            }
707
            set
708
            {
709
                this.catField = value;
710
            }
711
        }
712

713
        [XmlElement(Order = 11)]
714
        public CT_NumDataSource val
715
        {
716
            get
717
            {
718
                return this.valField;
719
            }
720
            set
721
            {
722
                this.valField = value;
723
            }
724
        }
725

726
        [XmlElement(Order = 12)]
727
        public CT_Shape shape
728
        {
729
            get
730
            {
731
                return this.shapeField;
732
            }
733
            set
734
            {
735
                this.shapeField = value;
736
            }
737
        }
738

739
        [XmlElement(Order = 13)]
740
        public List<CT_Extension> extLst
741
        {
742
            get
743
            {
744
                return this.extLstField;
745
            }
746
            set
747
            {
748
                this.extLstField = value;
749
            }
750
        }
751

752
        public CT_UnsignedInt AddNewIdx()
753
        {
754
            this.idxField = new CT_UnsignedInt();
755
            return this.idxField;
756
        }
757

758
        public CT_UnsignedInt AddNewOrder()
759
        {
760
            this.orderField = new CT_UnsignedInt();
761
            return this.orderField;
762
        }
763

764
        public CT_AxDataSource AddNewCat()
765
        {
766
            this.catField = new CT_AxDataSource();
767
            return this.catField;
768
        }
769

770
        public CT_NumDataSource AddNewVal()
771
        {
772
            this.valField = new CT_NumDataSource();
773
            return this.valField;
774
        }
775
    }
776

777

778
    [Serializable]
779

780
    [System.ComponentModel.DesignerCategoryAttribute("code")]
781
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart")]
782
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/chart", IsNullable = true)]
783
    public class CT_Bar3DChart
784
    {
785

786
        private CT_BarDir barDirField;
787

788
        private CT_BarGrouping groupingField;
789

790
        private CT_Boolean varyColorsField;
791

792
        private List<CT_BarSer> serField;
793

794
        private CT_DLbls dLblsField;
795

796
        private CT_GapAmount gapWidthField;
797

798
        private CT_GapAmount gapDepthField;
799

800
        private CT_Shape shapeField;
801

802
        private List<CT_UnsignedInt> axIdField;
803

804
        private List<CT_Extension> extLstField;
805

806
        public CT_Bar3DChart()
807
        {
808
            this.extLstField = new List<CT_Extension>();
809
            this.axIdField = new List<CT_UnsignedInt>();
810
            this.shapeField = new CT_Shape();
811
            this.gapDepthField = new CT_GapAmount();
812
            this.gapWidthField = new CT_GapAmount();
813
            this.dLblsField = new CT_DLbls();
814
            this.serField = new List<CT_BarSer>();
815
            this.varyColorsField = new CT_Boolean();
816
            this.groupingField = new CT_BarGrouping();
817
            this.barDirField = new CT_BarDir();
818
        }
819

820
        public int GetSeriesCount()
821
        {
822
            return this.serField == null ? 0 : this.serField.Count;
823
        }
824

825
        [XmlElement(Order = 0)]
826
        public CT_BarDir barDir
827
        {
828
            get
829
            {
830
                return this.barDirField;
831
            }
832
            set
833
            {
834
                this.barDirField = value;
835
            }
836
        }
837

838
        [XmlElement(Order = 1)]
839
        public CT_BarGrouping grouping
840
        {
841
            get
842
            {
843
                return this.groupingField;
844
            }
845
            set
846
            {
847
                this.groupingField = value;
848
            }
849
        }
850

851
        [XmlElement(Order = 2)]
852
        public CT_Boolean varyColors
853
        {
854
            get
855
            {
856
                return this.varyColorsField;
857
            }
858
            set
859
            {
860
                this.varyColorsField = value;
861
            }
862
        }
863

864
        [XmlElement("ser", Order = 3)]
865
        public List<CT_BarSer> ser
866
        {
867
            get
868
            {
869
                return this.serField;
870
            }
871
            set
872
            {
873
                this.serField = value;
874
            }
875
        }
876

877
        [XmlElement(Order = 4)]
878
        public CT_DLbls dLbls
879
        {
880
            get
881
            {
882
                return this.dLblsField;
883
            }
884
            set
885
            {
886
                this.dLblsField = value;
887
            }
888
        }
889

890
        [XmlElement(Order = 5)]
891
        public CT_GapAmount gapWidth
892
        {
893
            get
894
            {
895
                return this.gapWidthField;
896
            }
897
            set
898
            {
899
                this.gapWidthField = value;
900
            }
901
        }
902

903
        [XmlElement(Order = 6)]
904
        public CT_GapAmount gapDepth
905
        {
906
            get
907
            {
908
                return this.gapDepthField;
909
            }
910
            set
911
            {
912
                this.gapDepthField = value;
913
            }
914
        }
915

916
        [XmlElement(Order = 7)]
917
        public CT_Shape shape
918
        {
919
            get
920
            {
921
                return this.shapeField;
922
            }
923
            set
924
            {
925
                this.shapeField = value;
926
            }
927
        }
928

929
        [XmlElement("axId", Order = 8)]
930
        public List<CT_UnsignedInt> axId
931
        {
932
            get
933
            {
934
                return this.axIdField;
935
            }
936
            set
937
            {
938
                this.axIdField = value;
939
            }
940
        }
941

942
        [XmlArray(Order = 9)]
943
        [XmlArrayItem("ext", IsNullable = false)]
944
        public List<CT_Extension> extLst
945
        {
946
            get
947
            {
948
                return this.extLstField;
949
            }
950
            set
951
            {
952
                this.extLstField = value;
953
            }
954
        }
955
        public static CT_Bar3DChart Parse(XmlNode node, XmlNamespaceManager namespaceManager)
956
        {
957
            if (node == null)
958
                return null;
959
            CT_Bar3DChart ctObj = new CT_Bar3DChart();
960
            ctObj.ser = new List<CT_BarSer>();
961
            ctObj.axId = new List<CT_UnsignedInt>();
962
            ctObj.extLst = new List<CT_Extension>();
963
            foreach (XmlNode childNode in node.ChildNodes)
964
            {
965
                if (childNode.LocalName == "barDir")
966
                    ctObj.barDir = CT_BarDir.Parse(childNode, namespaceManager);
967
                else if (childNode.LocalName == "grouping")
968
                    ctObj.grouping = CT_BarGrouping.Parse(childNode, namespaceManager);
969
                else if (childNode.LocalName == "varyColors")
970
                    ctObj.varyColors = CT_Boolean.Parse(childNode, namespaceManager);
971
                else if (childNode.LocalName == "dLbls")
972
                    ctObj.dLbls = CT_DLbls.Parse(childNode, namespaceManager);
973
                else if (childNode.LocalName == "gapWidth")
974
                    ctObj.gapWidth = CT_GapAmount.Parse(childNode, namespaceManager);
975
                else if (childNode.LocalName == "gapDepth")
976
                    ctObj.gapDepth = CT_GapAmount.Parse(childNode, namespaceManager);
977
                else if (childNode.LocalName == "shape")
978
                    ctObj.shape = CT_Shape.Parse(childNode, namespaceManager);
979
                else if (childNode.LocalName == "ser")
980
                    ctObj.ser.Add(CT_BarSer.Parse(childNode, namespaceManager));
981
                else if (childNode.LocalName == "axId")
982
                    ctObj.axId.Add(CT_UnsignedInt.Parse(childNode, namespaceManager));
983
                else if (childNode.LocalName == "extLst")
984
                    ctObj.extLst.Add(CT_Extension.Parse(childNode, namespaceManager));
985
            }
986
            return ctObj;
987
        }
988

989

990

991
        internal void Write(StreamWriter sw, string nodeName)
992
        {
993
            sw.Write(string.Format("<c:{0}", nodeName));
994
            sw.Write(">");
995
            if (this.barDir != null)
996
                this.barDir.Write(sw, "barDir");
997
            if (this.grouping != null)
998
                this.grouping.Write(sw, "grouping");
999
            if (this.varyColors != null)
1000
                this.varyColors.Write(sw, "varyColors");
1001
            if (this.dLbls != null)
1002
                this.dLbls.Write(sw, "dLbls");
1003
            if (this.gapWidth != null)
1004
                this.gapWidth.Write(sw, "gapWidth");
1005
            if (this.gapDepth != null)
1006
                this.gapDepth.Write(sw, "gapDepth");
1007
            if (this.shape != null)
1008
                this.shape.Write(sw, "shape");
1009
            if (this.ser != null)
1010
            {
1011
                foreach (CT_BarSer x in this.ser)
1012
                {
1013
                    x.Write(sw, "ser");
1014
                }
1015
            }
1016
            if (this.axId != null)
1017
            {
1018
                foreach (CT_UnsignedInt x in this.axId)
1019
                {
1020
                    x.Write(sw, "axId");
1021
                }
1022
            }
1023
            if (this.extLst != null)
1024
            {
1025
                foreach (CT_Extension x in this.extLst)
1026
                {
1027
                    x.Write(sw, "extLst");
1028
                }
1029
            }
1030
            sw.Write(string.Format("</c:{0}>", nodeName));
1031
        }
1032

1033
    }
1034

1035
}
1036

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.