-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel_axis.go
1155 lines (992 loc) · 32.6 KB
/
model_axis.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose">
* Copyright (c) 2018 Aspose.Slides for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------------------------------------------
*/
package asposeslidescloud
import (
"encoding/json"
)
// Represents a chart axis
type IAxis interface {
// True if the axis is visible
GetIsVisible() *bool
SetIsVisible(newValue *bool)
// True if the axis has a visible title
GetHasTitle() *bool
SetHasTitle(newValue *bool)
// Axis title
GetTitle() IChartTitle
SetTitle(newValue IChartTitle)
// Axis position
GetPosition() string
SetPosition(newValue string)
// The scaling value of the display units for the value axis
GetDisplayUnit() string
SetDisplayUnit(newValue string)
// The smallest time unit that is represented on the date axis
GetBaseUnitScale() string
SetBaseUnitScale(newValue string)
// True the major unit of the axis is automatically assigned
GetIsAutomaticMajorUnit() *bool
SetIsAutomaticMajorUnit(newValue *bool)
// The major units for the date or value axis
GetMajorUnit() float64
SetMajorUnit(newValue float64)
// The major unit scale for the date axis
GetMajorUnitScale() string
SetMajorUnitScale(newValue string)
// The type of major tick mark for the specified axis
GetMajorTickMark() string
SetMajorTickMark(newValue string)
// True the minor unit of the axis is automatically assigned
GetIsAutomaticMinorUnit() *bool
SetIsAutomaticMinorUnit(newValue *bool)
// The minor units for the date or value axis
GetMinorUnit() float64
SetMinorUnit(newValue float64)
// The minor unit scale for the date axis
GetMinorUnitScale() string
SetMinorUnitScale(newValue string)
// The type of minor tick mark for the specified axis
GetMinorTickMark() string
SetMinorTickMark(newValue string)
// True if the max value is automatically assigned
GetIsAutomaticMaxValue() *bool
SetIsAutomaticMaxValue(newValue *bool)
// The maximum value on the value axis
GetMaxValue() float64
SetMaxValue(newValue float64)
// True if the min value is automatically assigned
GetIsAutomaticMinValue() *bool
SetIsAutomaticMinValue(newValue *bool)
// The minimum value on the value axis
GetMinValue() float64
SetMinValue(newValue float64)
// True if the value axis scale type is logarithmic
GetIsLogarithmic() *bool
SetIsLogarithmic(newValue *bool)
// The logarithmic base. Default value is 10
GetLogBase() float64
SetLogBase(newValue float64)
// The type of the category axis
GetCategoryAxisType() string
SetCategoryAxisType(newValue string)
// True if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn't apply to 3-D charts
GetAxisBetweenCategories() *bool
SetAxisBetweenCategories(newValue *bool)
// The distance of labels from the axis. Applied to category or date axis. Value must be between 0% and 1000%.
GetLabelOffset() int32
SetLabelOffset(newValue int32)
// True if MS PowerPoint plots data points from last to first
GetIsPlotOrderReversed() *bool
SetIsPlotOrderReversed(newValue *bool)
// True if the format is linked to source data
GetIsNumberFormatLinkedToSource() *bool
SetIsNumberFormatLinkedToSource(newValue *bool)
// the format string for the Axis Labels
GetNumberFormat() string
SetNumberFormat(newValue string)
// The CrossType on the specified axis where the other axis crosses
GetCrossType() string
SetCrossType(newValue string)
// The point on the axis where the perpendicular axis crosses it
GetCrossAt() float64
SetCrossAt(newValue float64)
// True for automatic tick marks spacing value
GetIsAutomaticTickMarksSpacing() *bool
SetIsAutomaticTickMarksSpacing(newValue *bool)
// Specifies how many tick marks shall be skipped before the next one shall be drawn. Applied to category or series axis.
GetTickMarksSpacing() int32
SetTickMarksSpacing(newValue int32)
// True for automatic tick label spacing value
GetIsAutomaticTickLabelSpacing() *bool
SetIsAutomaticTickLabelSpacing(newValue *bool)
// Specifies how many tick labels to skip between label that is drawn.
GetTickLabelSpacing() int32
SetTickLabelSpacing(newValue int32)
// The position of tick-mark labels on the specified axis.
GetTickLabelPosition() string
SetTickLabelPosition(newValue string)
// Represents the rotation angle of tick labels.
GetTickLabelRotationAngle() float64
SetTickLabelRotationAngle(newValue float64)
// Get or sets the fill format.
GetFillFormat() IFillFormat
SetFillFormat(newValue IFillFormat)
// Get or sets the effect format.
GetEffectFormat() IEffectFormat
SetEffectFormat(newValue IEffectFormat)
// Get or sets the line format.
GetLineFormat() ILineFormat
SetLineFormat(newValue ILineFormat)
// Get or sets the format of major grid lines.
GetMajorGridLinesFormat() IChartLinesFormat
SetMajorGridLinesFormat(newValue IChartLinesFormat)
// Get or sets the format of major grid lines.
GetMinorGridLinesFormat() IChartLinesFormat
SetMinorGridLinesFormat(newValue IChartLinesFormat)
}
type Axis struct {
// True if the axis is visible
IsVisible *bool `json:"IsVisible"`
// True if the axis has a visible title
HasTitle *bool `json:"HasTitle"`
// Axis title
Title IChartTitle `json:"Title,omitempty"`
// Axis position
Position string `json:"Position,omitempty"`
// The scaling value of the display units for the value axis
DisplayUnit string `json:"DisplayUnit,omitempty"`
// The smallest time unit that is represented on the date axis
BaseUnitScale string `json:"BaseUnitScale,omitempty"`
// True the major unit of the axis is automatically assigned
IsAutomaticMajorUnit *bool `json:"IsAutomaticMajorUnit"`
// The major units for the date or value axis
MajorUnit float64 `json:"MajorUnit,omitempty"`
// The major unit scale for the date axis
MajorUnitScale string `json:"MajorUnitScale,omitempty"`
// The type of major tick mark for the specified axis
MajorTickMark string `json:"MajorTickMark,omitempty"`
// True the minor unit of the axis is automatically assigned
IsAutomaticMinorUnit *bool `json:"IsAutomaticMinorUnit"`
// The minor units for the date or value axis
MinorUnit float64 `json:"MinorUnit,omitempty"`
// The minor unit scale for the date axis
MinorUnitScale string `json:"MinorUnitScale,omitempty"`
// The type of minor tick mark for the specified axis
MinorTickMark string `json:"MinorTickMark,omitempty"`
// True if the max value is automatically assigned
IsAutomaticMaxValue *bool `json:"IsAutomaticMaxValue"`
// The maximum value on the value axis
MaxValue float64 `json:"MaxValue,omitempty"`
// True if the min value is automatically assigned
IsAutomaticMinValue *bool `json:"IsAutomaticMinValue"`
// The minimum value on the value axis
MinValue float64 `json:"MinValue,omitempty"`
// True if the value axis scale type is logarithmic
IsLogarithmic *bool `json:"IsLogarithmic"`
// The logarithmic base. Default value is 10
LogBase float64 `json:"LogBase,omitempty"`
// The type of the category axis
CategoryAxisType string `json:"CategoryAxisType,omitempty"`
// True if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn't apply to 3-D charts
AxisBetweenCategories *bool `json:"AxisBetweenCategories"`
// The distance of labels from the axis. Applied to category or date axis. Value must be between 0% and 1000%.
LabelOffset int32 `json:"LabelOffset,omitempty"`
// True if MS PowerPoint plots data points from last to first
IsPlotOrderReversed *bool `json:"IsPlotOrderReversed"`
// True if the format is linked to source data
IsNumberFormatLinkedToSource *bool `json:"IsNumberFormatLinkedToSource"`
// the format string for the Axis Labels
NumberFormat string `json:"NumberFormat,omitempty"`
// The CrossType on the specified axis where the other axis crosses
CrossType string `json:"CrossType,omitempty"`
// The point on the axis where the perpendicular axis crosses it
CrossAt float64 `json:"CrossAt,omitempty"`
// True for automatic tick marks spacing value
IsAutomaticTickMarksSpacing *bool `json:"IsAutomaticTickMarksSpacing"`
// Specifies how many tick marks shall be skipped before the next one shall be drawn. Applied to category or series axis.
TickMarksSpacing int32 `json:"TickMarksSpacing,omitempty"`
// True for automatic tick label spacing value
IsAutomaticTickLabelSpacing *bool `json:"IsAutomaticTickLabelSpacing"`
// Specifies how many tick labels to skip between label that is drawn.
TickLabelSpacing int32 `json:"TickLabelSpacing,omitempty"`
// The position of tick-mark labels on the specified axis.
TickLabelPosition string `json:"TickLabelPosition,omitempty"`
// Represents the rotation angle of tick labels.
TickLabelRotationAngle float64 `json:"TickLabelRotationAngle,omitempty"`
// Get or sets the fill format.
FillFormat IFillFormat `json:"FillFormat,omitempty"`
// Get or sets the effect format.
EffectFormat IEffectFormat `json:"EffectFormat,omitempty"`
// Get or sets the line format.
LineFormat ILineFormat `json:"LineFormat,omitempty"`
// Get or sets the format of major grid lines.
MajorGridLinesFormat IChartLinesFormat `json:"MajorGridLinesFormat,omitempty"`
// Get or sets the format of major grid lines.
MinorGridLinesFormat IChartLinesFormat `json:"MinorGridLinesFormat,omitempty"`
}
func NewAxis() *Axis {
instance := new(Axis)
return instance
}
func (this *Axis) GetIsVisible() *bool {
return this.IsVisible
}
func (this *Axis) SetIsVisible(newValue *bool) {
this.IsVisible = newValue
}
func (this *Axis) GetHasTitle() *bool {
return this.HasTitle
}
func (this *Axis) SetHasTitle(newValue *bool) {
this.HasTitle = newValue
}
func (this *Axis) GetTitle() IChartTitle {
return this.Title
}
func (this *Axis) SetTitle(newValue IChartTitle) {
this.Title = newValue
}
func (this *Axis) GetPosition() string {
return this.Position
}
func (this *Axis) SetPosition(newValue string) {
this.Position = newValue
}
func (this *Axis) GetDisplayUnit() string {
return this.DisplayUnit
}
func (this *Axis) SetDisplayUnit(newValue string) {
this.DisplayUnit = newValue
}
func (this *Axis) GetBaseUnitScale() string {
return this.BaseUnitScale
}
func (this *Axis) SetBaseUnitScale(newValue string) {
this.BaseUnitScale = newValue
}
func (this *Axis) GetIsAutomaticMajorUnit() *bool {
return this.IsAutomaticMajorUnit
}
func (this *Axis) SetIsAutomaticMajorUnit(newValue *bool) {
this.IsAutomaticMajorUnit = newValue
}
func (this *Axis) GetMajorUnit() float64 {
return this.MajorUnit
}
func (this *Axis) SetMajorUnit(newValue float64) {
this.MajorUnit = newValue
}
func (this *Axis) GetMajorUnitScale() string {
return this.MajorUnitScale
}
func (this *Axis) SetMajorUnitScale(newValue string) {
this.MajorUnitScale = newValue
}
func (this *Axis) GetMajorTickMark() string {
return this.MajorTickMark
}
func (this *Axis) SetMajorTickMark(newValue string) {
this.MajorTickMark = newValue
}
func (this *Axis) GetIsAutomaticMinorUnit() *bool {
return this.IsAutomaticMinorUnit
}
func (this *Axis) SetIsAutomaticMinorUnit(newValue *bool) {
this.IsAutomaticMinorUnit = newValue
}
func (this *Axis) GetMinorUnit() float64 {
return this.MinorUnit
}
func (this *Axis) SetMinorUnit(newValue float64) {
this.MinorUnit = newValue
}
func (this *Axis) GetMinorUnitScale() string {
return this.MinorUnitScale
}
func (this *Axis) SetMinorUnitScale(newValue string) {
this.MinorUnitScale = newValue
}
func (this *Axis) GetMinorTickMark() string {
return this.MinorTickMark
}
func (this *Axis) SetMinorTickMark(newValue string) {
this.MinorTickMark = newValue
}
func (this *Axis) GetIsAutomaticMaxValue() *bool {
return this.IsAutomaticMaxValue
}
func (this *Axis) SetIsAutomaticMaxValue(newValue *bool) {
this.IsAutomaticMaxValue = newValue
}
func (this *Axis) GetMaxValue() float64 {
return this.MaxValue
}
func (this *Axis) SetMaxValue(newValue float64) {
this.MaxValue = newValue
}
func (this *Axis) GetIsAutomaticMinValue() *bool {
return this.IsAutomaticMinValue
}
func (this *Axis) SetIsAutomaticMinValue(newValue *bool) {
this.IsAutomaticMinValue = newValue
}
func (this *Axis) GetMinValue() float64 {
return this.MinValue
}
func (this *Axis) SetMinValue(newValue float64) {
this.MinValue = newValue
}
func (this *Axis) GetIsLogarithmic() *bool {
return this.IsLogarithmic
}
func (this *Axis) SetIsLogarithmic(newValue *bool) {
this.IsLogarithmic = newValue
}
func (this *Axis) GetLogBase() float64 {
return this.LogBase
}
func (this *Axis) SetLogBase(newValue float64) {
this.LogBase = newValue
}
func (this *Axis) GetCategoryAxisType() string {
return this.CategoryAxisType
}
func (this *Axis) SetCategoryAxisType(newValue string) {
this.CategoryAxisType = newValue
}
func (this *Axis) GetAxisBetweenCategories() *bool {
return this.AxisBetweenCategories
}
func (this *Axis) SetAxisBetweenCategories(newValue *bool) {
this.AxisBetweenCategories = newValue
}
func (this *Axis) GetLabelOffset() int32 {
return this.LabelOffset
}
func (this *Axis) SetLabelOffset(newValue int32) {
this.LabelOffset = newValue
}
func (this *Axis) GetIsPlotOrderReversed() *bool {
return this.IsPlotOrderReversed
}
func (this *Axis) SetIsPlotOrderReversed(newValue *bool) {
this.IsPlotOrderReversed = newValue
}
func (this *Axis) GetIsNumberFormatLinkedToSource() *bool {
return this.IsNumberFormatLinkedToSource
}
func (this *Axis) SetIsNumberFormatLinkedToSource(newValue *bool) {
this.IsNumberFormatLinkedToSource = newValue
}
func (this *Axis) GetNumberFormat() string {
return this.NumberFormat
}
func (this *Axis) SetNumberFormat(newValue string) {
this.NumberFormat = newValue
}
func (this *Axis) GetCrossType() string {
return this.CrossType
}
func (this *Axis) SetCrossType(newValue string) {
this.CrossType = newValue
}
func (this *Axis) GetCrossAt() float64 {
return this.CrossAt
}
func (this *Axis) SetCrossAt(newValue float64) {
this.CrossAt = newValue
}
func (this *Axis) GetIsAutomaticTickMarksSpacing() *bool {
return this.IsAutomaticTickMarksSpacing
}
func (this *Axis) SetIsAutomaticTickMarksSpacing(newValue *bool) {
this.IsAutomaticTickMarksSpacing = newValue
}
func (this *Axis) GetTickMarksSpacing() int32 {
return this.TickMarksSpacing
}
func (this *Axis) SetTickMarksSpacing(newValue int32) {
this.TickMarksSpacing = newValue
}
func (this *Axis) GetIsAutomaticTickLabelSpacing() *bool {
return this.IsAutomaticTickLabelSpacing
}
func (this *Axis) SetIsAutomaticTickLabelSpacing(newValue *bool) {
this.IsAutomaticTickLabelSpacing = newValue
}
func (this *Axis) GetTickLabelSpacing() int32 {
return this.TickLabelSpacing
}
func (this *Axis) SetTickLabelSpacing(newValue int32) {
this.TickLabelSpacing = newValue
}
func (this *Axis) GetTickLabelPosition() string {
return this.TickLabelPosition
}
func (this *Axis) SetTickLabelPosition(newValue string) {
this.TickLabelPosition = newValue
}
func (this *Axis) GetTickLabelRotationAngle() float64 {
return this.TickLabelRotationAngle
}
func (this *Axis) SetTickLabelRotationAngle(newValue float64) {
this.TickLabelRotationAngle = newValue
}
func (this *Axis) GetFillFormat() IFillFormat {
return this.FillFormat
}
func (this *Axis) SetFillFormat(newValue IFillFormat) {
this.FillFormat = newValue
}
func (this *Axis) GetEffectFormat() IEffectFormat {
return this.EffectFormat
}
func (this *Axis) SetEffectFormat(newValue IEffectFormat) {
this.EffectFormat = newValue
}
func (this *Axis) GetLineFormat() ILineFormat {
return this.LineFormat
}
func (this *Axis) SetLineFormat(newValue ILineFormat) {
this.LineFormat = newValue
}
func (this *Axis) GetMajorGridLinesFormat() IChartLinesFormat {
return this.MajorGridLinesFormat
}
func (this *Axis) SetMajorGridLinesFormat(newValue IChartLinesFormat) {
this.MajorGridLinesFormat = newValue
}
func (this *Axis) GetMinorGridLinesFormat() IChartLinesFormat {
return this.MinorGridLinesFormat
}
func (this *Axis) SetMinorGridLinesFormat(newValue IChartLinesFormat) {
this.MinorGridLinesFormat = newValue
}
func (this *Axis) UnmarshalJSON(b []byte) error {
var objMap map[string]*json.RawMessage
err := json.Unmarshal(b, &objMap)
if err != nil {
return err
}
if valIsVisible, ok := GetMapValue(objMap, "isVisible"); ok {
if valIsVisible != nil {
var valueForIsVisible *bool
err = json.Unmarshal(*valIsVisible, &valueForIsVisible)
if err != nil {
return err
}
this.IsVisible = valueForIsVisible
}
}
if valHasTitle, ok := GetMapValue(objMap, "hasTitle"); ok {
if valHasTitle != nil {
var valueForHasTitle *bool
err = json.Unmarshal(*valHasTitle, &valueForHasTitle)
if err != nil {
return err
}
this.HasTitle = valueForHasTitle
}
}
if valTitle, ok := GetMapValue(objMap, "title"); ok {
if valTitle != nil {
var valueForTitle ChartTitle
err = json.Unmarshal(*valTitle, &valueForTitle)
if err != nil {
return err
}
vObject, err := createObjectForType("ChartTitle", *valTitle)
if err != nil {
return err
}
err = json.Unmarshal(*valTitle, &vObject)
if err != nil {
return err
}
vInterfaceObject, ok := vObject.(IChartTitle)
if ok {
this.Title = vInterfaceObject
}
}
}
if valPosition, ok := GetMapValue(objMap, "position"); ok {
if valPosition != nil {
var valueForPosition string
err = json.Unmarshal(*valPosition, &valueForPosition)
if err != nil {
var valueForPositionInt int32
err = json.Unmarshal(*valPosition, &valueForPositionInt)
if err != nil {
return err
}
this.Position = string(valueForPositionInt)
} else {
this.Position = valueForPosition
}
}
}
if valDisplayUnit, ok := GetMapValue(objMap, "displayUnit"); ok {
if valDisplayUnit != nil {
var valueForDisplayUnit string
err = json.Unmarshal(*valDisplayUnit, &valueForDisplayUnit)
if err != nil {
var valueForDisplayUnitInt int32
err = json.Unmarshal(*valDisplayUnit, &valueForDisplayUnitInt)
if err != nil {
return err
}
this.DisplayUnit = string(valueForDisplayUnitInt)
} else {
this.DisplayUnit = valueForDisplayUnit
}
}
}
if valBaseUnitScale, ok := GetMapValue(objMap, "baseUnitScale"); ok {
if valBaseUnitScale != nil {
var valueForBaseUnitScale string
err = json.Unmarshal(*valBaseUnitScale, &valueForBaseUnitScale)
if err != nil {
var valueForBaseUnitScaleInt int32
err = json.Unmarshal(*valBaseUnitScale, &valueForBaseUnitScaleInt)
if err != nil {
return err
}
this.BaseUnitScale = string(valueForBaseUnitScaleInt)
} else {
this.BaseUnitScale = valueForBaseUnitScale
}
}
}
if valIsAutomaticMajorUnit, ok := GetMapValue(objMap, "isAutomaticMajorUnit"); ok {
if valIsAutomaticMajorUnit != nil {
var valueForIsAutomaticMajorUnit *bool
err = json.Unmarshal(*valIsAutomaticMajorUnit, &valueForIsAutomaticMajorUnit)
if err != nil {
return err
}
this.IsAutomaticMajorUnit = valueForIsAutomaticMajorUnit
}
}
if valMajorUnit, ok := GetMapValue(objMap, "majorUnit"); ok {
if valMajorUnit != nil {
var valueForMajorUnit float64
err = json.Unmarshal(*valMajorUnit, &valueForMajorUnit)
if err != nil {
return err
}
this.MajorUnit = valueForMajorUnit
}
}
if valMajorUnitScale, ok := GetMapValue(objMap, "majorUnitScale"); ok {
if valMajorUnitScale != nil {
var valueForMajorUnitScale string
err = json.Unmarshal(*valMajorUnitScale, &valueForMajorUnitScale)
if err != nil {
var valueForMajorUnitScaleInt int32
err = json.Unmarshal(*valMajorUnitScale, &valueForMajorUnitScaleInt)
if err != nil {
return err
}
this.MajorUnitScale = string(valueForMajorUnitScaleInt)
} else {
this.MajorUnitScale = valueForMajorUnitScale
}
}
}
if valMajorTickMark, ok := GetMapValue(objMap, "majorTickMark"); ok {
if valMajorTickMark != nil {
var valueForMajorTickMark string
err = json.Unmarshal(*valMajorTickMark, &valueForMajorTickMark)
if err != nil {
var valueForMajorTickMarkInt int32
err = json.Unmarshal(*valMajorTickMark, &valueForMajorTickMarkInt)
if err != nil {
return err
}
this.MajorTickMark = string(valueForMajorTickMarkInt)
} else {
this.MajorTickMark = valueForMajorTickMark
}
}
}
if valIsAutomaticMinorUnit, ok := GetMapValue(objMap, "isAutomaticMinorUnit"); ok {
if valIsAutomaticMinorUnit != nil {
var valueForIsAutomaticMinorUnit *bool
err = json.Unmarshal(*valIsAutomaticMinorUnit, &valueForIsAutomaticMinorUnit)
if err != nil {
return err
}
this.IsAutomaticMinorUnit = valueForIsAutomaticMinorUnit
}
}
if valMinorUnit, ok := GetMapValue(objMap, "minorUnit"); ok {
if valMinorUnit != nil {
var valueForMinorUnit float64
err = json.Unmarshal(*valMinorUnit, &valueForMinorUnit)
if err != nil {
return err
}
this.MinorUnit = valueForMinorUnit
}
}
if valMinorUnitScale, ok := GetMapValue(objMap, "minorUnitScale"); ok {
if valMinorUnitScale != nil {
var valueForMinorUnitScale string
err = json.Unmarshal(*valMinorUnitScale, &valueForMinorUnitScale)
if err != nil {
var valueForMinorUnitScaleInt int32
err = json.Unmarshal(*valMinorUnitScale, &valueForMinorUnitScaleInt)
if err != nil {
return err
}
this.MinorUnitScale = string(valueForMinorUnitScaleInt)
} else {
this.MinorUnitScale = valueForMinorUnitScale
}
}
}
if valMinorTickMark, ok := GetMapValue(objMap, "minorTickMark"); ok {
if valMinorTickMark != nil {
var valueForMinorTickMark string
err = json.Unmarshal(*valMinorTickMark, &valueForMinorTickMark)
if err != nil {
var valueForMinorTickMarkInt int32
err = json.Unmarshal(*valMinorTickMark, &valueForMinorTickMarkInt)
if err != nil {
return err
}
this.MinorTickMark = string(valueForMinorTickMarkInt)
} else {
this.MinorTickMark = valueForMinorTickMark
}
}
}
if valIsAutomaticMaxValue, ok := GetMapValue(objMap, "isAutomaticMaxValue"); ok {
if valIsAutomaticMaxValue != nil {
var valueForIsAutomaticMaxValue *bool
err = json.Unmarshal(*valIsAutomaticMaxValue, &valueForIsAutomaticMaxValue)
if err != nil {
return err
}
this.IsAutomaticMaxValue = valueForIsAutomaticMaxValue
}
}
if valMaxValue, ok := GetMapValue(objMap, "maxValue"); ok {
if valMaxValue != nil {
var valueForMaxValue float64
err = json.Unmarshal(*valMaxValue, &valueForMaxValue)
if err != nil {
return err
}
this.MaxValue = valueForMaxValue
}
}
if valIsAutomaticMinValue, ok := GetMapValue(objMap, "isAutomaticMinValue"); ok {
if valIsAutomaticMinValue != nil {
var valueForIsAutomaticMinValue *bool
err = json.Unmarshal(*valIsAutomaticMinValue, &valueForIsAutomaticMinValue)
if err != nil {
return err
}
this.IsAutomaticMinValue = valueForIsAutomaticMinValue
}
}
if valMinValue, ok := GetMapValue(objMap, "minValue"); ok {
if valMinValue != nil {
var valueForMinValue float64
err = json.Unmarshal(*valMinValue, &valueForMinValue)
if err != nil {
return err
}
this.MinValue = valueForMinValue
}
}
if valIsLogarithmic, ok := GetMapValue(objMap, "isLogarithmic"); ok {
if valIsLogarithmic != nil {
var valueForIsLogarithmic *bool
err = json.Unmarshal(*valIsLogarithmic, &valueForIsLogarithmic)
if err != nil {
return err
}
this.IsLogarithmic = valueForIsLogarithmic
}
}
if valLogBase, ok := GetMapValue(objMap, "logBase"); ok {
if valLogBase != nil {
var valueForLogBase float64
err = json.Unmarshal(*valLogBase, &valueForLogBase)
if err != nil {
return err
}
this.LogBase = valueForLogBase
}
}
if valCategoryAxisType, ok := GetMapValue(objMap, "categoryAxisType"); ok {
if valCategoryAxisType != nil {
var valueForCategoryAxisType string
err = json.Unmarshal(*valCategoryAxisType, &valueForCategoryAxisType)
if err != nil {
var valueForCategoryAxisTypeInt int32
err = json.Unmarshal(*valCategoryAxisType, &valueForCategoryAxisTypeInt)
if err != nil {
return err
}
this.CategoryAxisType = string(valueForCategoryAxisTypeInt)
} else {
this.CategoryAxisType = valueForCategoryAxisType
}
}
}
if valAxisBetweenCategories, ok := GetMapValue(objMap, "axisBetweenCategories"); ok {
if valAxisBetweenCategories != nil {
var valueForAxisBetweenCategories *bool
err = json.Unmarshal(*valAxisBetweenCategories, &valueForAxisBetweenCategories)
if err != nil {
return err
}
this.AxisBetweenCategories = valueForAxisBetweenCategories
}
}
if valLabelOffset, ok := GetMapValue(objMap, "labelOffset"); ok {
if valLabelOffset != nil {
var valueForLabelOffset int32
err = json.Unmarshal(*valLabelOffset, &valueForLabelOffset)
if err != nil {
return err
}
this.LabelOffset = valueForLabelOffset
}
}
if valIsPlotOrderReversed, ok := GetMapValue(objMap, "isPlotOrderReversed"); ok {
if valIsPlotOrderReversed != nil {
var valueForIsPlotOrderReversed *bool
err = json.Unmarshal(*valIsPlotOrderReversed, &valueForIsPlotOrderReversed)
if err != nil {
return err
}
this.IsPlotOrderReversed = valueForIsPlotOrderReversed
}
}
if valIsNumberFormatLinkedToSource, ok := GetMapValue(objMap, "isNumberFormatLinkedToSource"); ok {
if valIsNumberFormatLinkedToSource != nil {
var valueForIsNumberFormatLinkedToSource *bool
err = json.Unmarshal(*valIsNumberFormatLinkedToSource, &valueForIsNumberFormatLinkedToSource)
if err != nil {
return err
}
this.IsNumberFormatLinkedToSource = valueForIsNumberFormatLinkedToSource
}
}
if valNumberFormat, ok := GetMapValue(objMap, "numberFormat"); ok {
if valNumberFormat != nil {
var valueForNumberFormat string
err = json.Unmarshal(*valNumberFormat, &valueForNumberFormat)
if err != nil {
return err
}
this.NumberFormat = valueForNumberFormat
}
}
if valCrossType, ok := GetMapValue(objMap, "crossType"); ok {
if valCrossType != nil {
var valueForCrossType string
err = json.Unmarshal(*valCrossType, &valueForCrossType)
if err != nil {
var valueForCrossTypeInt int32
err = json.Unmarshal(*valCrossType, &valueForCrossTypeInt)
if err != nil {
return err
}
this.CrossType = string(valueForCrossTypeInt)
} else {
this.CrossType = valueForCrossType
}
}
}
if valCrossAt, ok := GetMapValue(objMap, "crossAt"); ok {
if valCrossAt != nil {
var valueForCrossAt float64
err = json.Unmarshal(*valCrossAt, &valueForCrossAt)
if err != nil {
return err
}
this.CrossAt = valueForCrossAt
}
}
if valIsAutomaticTickMarksSpacing, ok := GetMapValue(objMap, "isAutomaticTickMarksSpacing"); ok {
if valIsAutomaticTickMarksSpacing != nil {
var valueForIsAutomaticTickMarksSpacing *bool
err = json.Unmarshal(*valIsAutomaticTickMarksSpacing, &valueForIsAutomaticTickMarksSpacing)
if err != nil {
return err
}
this.IsAutomaticTickMarksSpacing = valueForIsAutomaticTickMarksSpacing
}
}
if valTickMarksSpacing, ok := GetMapValue(objMap, "tickMarksSpacing"); ok {
if valTickMarksSpacing != nil {
var valueForTickMarksSpacing int32
err = json.Unmarshal(*valTickMarksSpacing, &valueForTickMarksSpacing)
if err != nil {
return err
}
this.TickMarksSpacing = valueForTickMarksSpacing
}
}
if valIsAutomaticTickLabelSpacing, ok := GetMapValue(objMap, "isAutomaticTickLabelSpacing"); ok {
if valIsAutomaticTickLabelSpacing != nil {
var valueForIsAutomaticTickLabelSpacing *bool
err = json.Unmarshal(*valIsAutomaticTickLabelSpacing, &valueForIsAutomaticTickLabelSpacing)
if err != nil {
return err
}