/
one_value_series.go
754 lines (672 loc) · 21.3 KB
/
one_value_series.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
/*
* --------------------------------------------------------------------------------------------------------------------
* <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"
)
// One value series.
type IOneValueSeries interface {
// Series type.
getType() string
setType(newValue string)
// Series name.
getName() string
setName(newValue string)
// True if each data marker in the series has a different color.
getIsColorVaried() bool
setIsColorVaried(newValue bool)
// Invert solid color for the series.
getInvertedSolidFillColor() string
setInvertedSolidFillColor(newValue string)
// True if curve smoothing is turned on. Applies only to line and scatter connected by lines charts.
getSmooth() bool
setSmooth(newValue bool)
// True if the series is plotted on second value axis.
getPlotOnSecondAxis() bool
setPlotOnSecondAxis(newValue bool)
// Series order.
getOrder() int32
setOrder(newValue int32)
// The number format for the series y values.
getNumberFormatOfYValues() string
setNumberFormatOfYValues(newValue string)
// The number format for the series x values.
getNumberFormatOfXValues() string
setNumberFormatOfXValues(newValue string)
// The number format for the series values.
getNumberFormatOfValues() string
setNumberFormatOfValues(newValue string)
// The number format for the series bubble sizes.
getNumberFormatOfBubbleSizes() string
setNumberFormatOfBubbleSizes(newValue string)
// True if the series shall invert its colors if the value is negative. Applies to bar, column and bubble series.
getInvertIfNegative() bool
setInvertIfNegative(newValue bool)
// The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
getExplosion() int32
setExplosion(newValue int32)
// Series marker.
getMarker() ISeriesMarker
setMarker(newValue ISeriesMarker)
// Fill properties set for the series.
getFillFormat() IFillFormat
setFillFormat(newValue IFillFormat)
// Effect properties set for the series.
getEffectFormat() IEffectFormat
setEffectFormat(newValue IEffectFormat)
// Line properties set for the series.
getLineFormat() ILineFormat
setLineFormat(newValue ILineFormat)
// Data point type.
getDataPointType() string
setDataPointType(newValue string)
// Gets or sets the values.
getDataPoints() []IOneValueChartDataPoint
setDataPoints(newValue []IOneValueChartDataPoint)
}
type OneValueSeries struct {
// Series type.
Type_ string `json:"Type,omitempty"`
// Series name.
Name string `json:"Name,omitempty"`
// True if each data marker in the series has a different color.
IsColorVaried bool `json:"IsColorVaried"`
// Invert solid color for the series.
InvertedSolidFillColor string `json:"InvertedSolidFillColor,omitempty"`
// True if curve smoothing is turned on. Applies only to line and scatter connected by lines charts.
Smooth bool `json:"Smooth"`
// True if the series is plotted on second value axis.
PlotOnSecondAxis bool `json:"PlotOnSecondAxis"`
// Series order.
Order int32 `json:"Order,omitempty"`
// The number format for the series y values.
NumberFormatOfYValues string `json:"NumberFormatOfYValues,omitempty"`
// The number format for the series x values.
NumberFormatOfXValues string `json:"NumberFormatOfXValues,omitempty"`
// The number format for the series values.
NumberFormatOfValues string `json:"NumberFormatOfValues,omitempty"`
// The number format for the series bubble sizes.
NumberFormatOfBubbleSizes string `json:"NumberFormatOfBubbleSizes,omitempty"`
// True if the series shall invert its colors if the value is negative. Applies to bar, column and bubble series.
InvertIfNegative bool `json:"InvertIfNegative"`
// The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
Explosion int32 `json:"Explosion,omitempty"`
// Series marker.
Marker ISeriesMarker `json:"Marker,omitempty"`
// Fill properties set for the series.
FillFormat IFillFormat `json:"FillFormat,omitempty"`
// Effect properties set for the series.
EffectFormat IEffectFormat `json:"EffectFormat,omitempty"`
// Line properties set for the series.
LineFormat ILineFormat `json:"LineFormat,omitempty"`
// Data point type.
DataPointType string `json:"DataPointType"`
// Gets or sets the values.
DataPoints []IOneValueChartDataPoint `json:"DataPoints,omitempty"`
}
func NewOneValueSeries() *OneValueSeries {
instance := new(OneValueSeries)
instance.Type_ = ""
instance.DataPointType = "OneValue"
return instance
}
func (this *OneValueSeries) getType() string {
return this.Type_
}
func (this *OneValueSeries) setType(newValue string) {
this.Type_ = newValue
}
func (this *OneValueSeries) getName() string {
return this.Name
}
func (this *OneValueSeries) setName(newValue string) {
this.Name = newValue
}
func (this *OneValueSeries) getIsColorVaried() bool {
return this.IsColorVaried
}
func (this *OneValueSeries) setIsColorVaried(newValue bool) {
this.IsColorVaried = newValue
}
func (this *OneValueSeries) getInvertedSolidFillColor() string {
return this.InvertedSolidFillColor
}
func (this *OneValueSeries) setInvertedSolidFillColor(newValue string) {
this.InvertedSolidFillColor = newValue
}
func (this *OneValueSeries) getSmooth() bool {
return this.Smooth
}
func (this *OneValueSeries) setSmooth(newValue bool) {
this.Smooth = newValue
}
func (this *OneValueSeries) getPlotOnSecondAxis() bool {
return this.PlotOnSecondAxis
}
func (this *OneValueSeries) setPlotOnSecondAxis(newValue bool) {
this.PlotOnSecondAxis = newValue
}
func (this *OneValueSeries) getOrder() int32 {
return this.Order
}
func (this *OneValueSeries) setOrder(newValue int32) {
this.Order = newValue
}
func (this *OneValueSeries) getNumberFormatOfYValues() string {
return this.NumberFormatOfYValues
}
func (this *OneValueSeries) setNumberFormatOfYValues(newValue string) {
this.NumberFormatOfYValues = newValue
}
func (this *OneValueSeries) getNumberFormatOfXValues() string {
return this.NumberFormatOfXValues
}
func (this *OneValueSeries) setNumberFormatOfXValues(newValue string) {
this.NumberFormatOfXValues = newValue
}
func (this *OneValueSeries) getNumberFormatOfValues() string {
return this.NumberFormatOfValues
}
func (this *OneValueSeries) setNumberFormatOfValues(newValue string) {
this.NumberFormatOfValues = newValue
}
func (this *OneValueSeries) getNumberFormatOfBubbleSizes() string {
return this.NumberFormatOfBubbleSizes
}
func (this *OneValueSeries) setNumberFormatOfBubbleSizes(newValue string) {
this.NumberFormatOfBubbleSizes = newValue
}
func (this *OneValueSeries) getInvertIfNegative() bool {
return this.InvertIfNegative
}
func (this *OneValueSeries) setInvertIfNegative(newValue bool) {
this.InvertIfNegative = newValue
}
func (this *OneValueSeries) getExplosion() int32 {
return this.Explosion
}
func (this *OneValueSeries) setExplosion(newValue int32) {
this.Explosion = newValue
}
func (this *OneValueSeries) getMarker() ISeriesMarker {
return this.Marker
}
func (this *OneValueSeries) setMarker(newValue ISeriesMarker) {
this.Marker = newValue
}
func (this *OneValueSeries) getFillFormat() IFillFormat {
return this.FillFormat
}
func (this *OneValueSeries) setFillFormat(newValue IFillFormat) {
this.FillFormat = newValue
}
func (this *OneValueSeries) getEffectFormat() IEffectFormat {
return this.EffectFormat
}
func (this *OneValueSeries) setEffectFormat(newValue IEffectFormat) {
this.EffectFormat = newValue
}
func (this *OneValueSeries) getLineFormat() ILineFormat {
return this.LineFormat
}
func (this *OneValueSeries) setLineFormat(newValue ILineFormat) {
this.LineFormat = newValue
}
func (this *OneValueSeries) getDataPointType() string {
return this.DataPointType
}
func (this *OneValueSeries) setDataPointType(newValue string) {
this.DataPointType = newValue
}
func (this *OneValueSeries) getDataPoints() []IOneValueChartDataPoint {
return this.DataPoints
}
func (this *OneValueSeries) setDataPoints(newValue []IOneValueChartDataPoint) {
this.DataPoints = newValue
}
func (this *OneValueSeries) UnmarshalJSON(b []byte) error {
var objMap map[string]*json.RawMessage
err := json.Unmarshal(b, &objMap)
if err != nil {
return err
}
this.Type_ = ""
if valType, ok := objMap["type"]; ok {
if valType != nil {
var valueForType string
err = json.Unmarshal(*valType, &valueForType)
if err != nil {
var valueForTypeInt int32
err = json.Unmarshal(*valType, &valueForTypeInt)
if err != nil {
return err
}
this.Type_ = string(valueForTypeInt)
} else {
this.Type_ = valueForType
}
}
}
if valTypeCap, ok := objMap["Type"]; ok {
if valTypeCap != nil {
var valueForType string
err = json.Unmarshal(*valTypeCap, &valueForType)
if err != nil {
var valueForTypeInt int32
err = json.Unmarshal(*valTypeCap, &valueForTypeInt)
if err != nil {
return err
}
this.Type_ = string(valueForTypeInt)
} else {
this.Type_ = valueForType
}
}
}
if valName, ok := objMap["name"]; ok {
if valName != nil {
var valueForName string
err = json.Unmarshal(*valName, &valueForName)
if err != nil {
return err
}
this.Name = valueForName
}
}
if valNameCap, ok := objMap["Name"]; ok {
if valNameCap != nil {
var valueForName string
err = json.Unmarshal(*valNameCap, &valueForName)
if err != nil {
return err
}
this.Name = valueForName
}
}
if valIsColorVaried, ok := objMap["isColorVaried"]; ok {
if valIsColorVaried != nil {
var valueForIsColorVaried bool
err = json.Unmarshal(*valIsColorVaried, &valueForIsColorVaried)
if err != nil {
return err
}
this.IsColorVaried = valueForIsColorVaried
}
}
if valIsColorVariedCap, ok := objMap["IsColorVaried"]; ok {
if valIsColorVariedCap != nil {
var valueForIsColorVaried bool
err = json.Unmarshal(*valIsColorVariedCap, &valueForIsColorVaried)
if err != nil {
return err
}
this.IsColorVaried = valueForIsColorVaried
}
}
if valInvertedSolidFillColor, ok := objMap["invertedSolidFillColor"]; ok {
if valInvertedSolidFillColor != nil {
var valueForInvertedSolidFillColor string
err = json.Unmarshal(*valInvertedSolidFillColor, &valueForInvertedSolidFillColor)
if err != nil {
return err
}
this.InvertedSolidFillColor = valueForInvertedSolidFillColor
}
}
if valInvertedSolidFillColorCap, ok := objMap["InvertedSolidFillColor"]; ok {
if valInvertedSolidFillColorCap != nil {
var valueForInvertedSolidFillColor string
err = json.Unmarshal(*valInvertedSolidFillColorCap, &valueForInvertedSolidFillColor)
if err != nil {
return err
}
this.InvertedSolidFillColor = valueForInvertedSolidFillColor
}
}
if valSmooth, ok := objMap["smooth"]; ok {
if valSmooth != nil {
var valueForSmooth bool
err = json.Unmarshal(*valSmooth, &valueForSmooth)
if err != nil {
return err
}
this.Smooth = valueForSmooth
}
}
if valSmoothCap, ok := objMap["Smooth"]; ok {
if valSmoothCap != nil {
var valueForSmooth bool
err = json.Unmarshal(*valSmoothCap, &valueForSmooth)
if err != nil {
return err
}
this.Smooth = valueForSmooth
}
}
if valPlotOnSecondAxis, ok := objMap["plotOnSecondAxis"]; ok {
if valPlotOnSecondAxis != nil {
var valueForPlotOnSecondAxis bool
err = json.Unmarshal(*valPlotOnSecondAxis, &valueForPlotOnSecondAxis)
if err != nil {
return err
}
this.PlotOnSecondAxis = valueForPlotOnSecondAxis
}
}
if valPlotOnSecondAxisCap, ok := objMap["PlotOnSecondAxis"]; ok {
if valPlotOnSecondAxisCap != nil {
var valueForPlotOnSecondAxis bool
err = json.Unmarshal(*valPlotOnSecondAxisCap, &valueForPlotOnSecondAxis)
if err != nil {
return err
}
this.PlotOnSecondAxis = valueForPlotOnSecondAxis
}
}
if valOrder, ok := objMap["order"]; ok {
if valOrder != nil {
var valueForOrder int32
err = json.Unmarshal(*valOrder, &valueForOrder)
if err != nil {
return err
}
this.Order = valueForOrder
}
}
if valOrderCap, ok := objMap["Order"]; ok {
if valOrderCap != nil {
var valueForOrder int32
err = json.Unmarshal(*valOrderCap, &valueForOrder)
if err != nil {
return err
}
this.Order = valueForOrder
}
}
if valNumberFormatOfYValues, ok := objMap["numberFormatOfYValues"]; ok {
if valNumberFormatOfYValues != nil {
var valueForNumberFormatOfYValues string
err = json.Unmarshal(*valNumberFormatOfYValues, &valueForNumberFormatOfYValues)
if err != nil {
return err
}
this.NumberFormatOfYValues = valueForNumberFormatOfYValues
}
}
if valNumberFormatOfYValuesCap, ok := objMap["NumberFormatOfYValues"]; ok {
if valNumberFormatOfYValuesCap != nil {
var valueForNumberFormatOfYValues string
err = json.Unmarshal(*valNumberFormatOfYValuesCap, &valueForNumberFormatOfYValues)
if err != nil {
return err
}
this.NumberFormatOfYValues = valueForNumberFormatOfYValues
}
}
if valNumberFormatOfXValues, ok := objMap["numberFormatOfXValues"]; ok {
if valNumberFormatOfXValues != nil {
var valueForNumberFormatOfXValues string
err = json.Unmarshal(*valNumberFormatOfXValues, &valueForNumberFormatOfXValues)
if err != nil {
return err
}
this.NumberFormatOfXValues = valueForNumberFormatOfXValues
}
}
if valNumberFormatOfXValuesCap, ok := objMap["NumberFormatOfXValues"]; ok {
if valNumberFormatOfXValuesCap != nil {
var valueForNumberFormatOfXValues string
err = json.Unmarshal(*valNumberFormatOfXValuesCap, &valueForNumberFormatOfXValues)
if err != nil {
return err
}
this.NumberFormatOfXValues = valueForNumberFormatOfXValues
}
}
if valNumberFormatOfValues, ok := objMap["numberFormatOfValues"]; ok {
if valNumberFormatOfValues != nil {
var valueForNumberFormatOfValues string
err = json.Unmarshal(*valNumberFormatOfValues, &valueForNumberFormatOfValues)
if err != nil {
return err
}
this.NumberFormatOfValues = valueForNumberFormatOfValues
}
}
if valNumberFormatOfValuesCap, ok := objMap["NumberFormatOfValues"]; ok {
if valNumberFormatOfValuesCap != nil {
var valueForNumberFormatOfValues string
err = json.Unmarshal(*valNumberFormatOfValuesCap, &valueForNumberFormatOfValues)
if err != nil {
return err
}
this.NumberFormatOfValues = valueForNumberFormatOfValues
}
}
if valNumberFormatOfBubbleSizes, ok := objMap["numberFormatOfBubbleSizes"]; ok {
if valNumberFormatOfBubbleSizes != nil {
var valueForNumberFormatOfBubbleSizes string
err = json.Unmarshal(*valNumberFormatOfBubbleSizes, &valueForNumberFormatOfBubbleSizes)
if err != nil {
return err
}
this.NumberFormatOfBubbleSizes = valueForNumberFormatOfBubbleSizes
}
}
if valNumberFormatOfBubbleSizesCap, ok := objMap["NumberFormatOfBubbleSizes"]; ok {
if valNumberFormatOfBubbleSizesCap != nil {
var valueForNumberFormatOfBubbleSizes string
err = json.Unmarshal(*valNumberFormatOfBubbleSizesCap, &valueForNumberFormatOfBubbleSizes)
if err != nil {
return err
}
this.NumberFormatOfBubbleSizes = valueForNumberFormatOfBubbleSizes
}
}
if valInvertIfNegative, ok := objMap["invertIfNegative"]; ok {
if valInvertIfNegative != nil {
var valueForInvertIfNegative bool
err = json.Unmarshal(*valInvertIfNegative, &valueForInvertIfNegative)
if err != nil {
return err
}
this.InvertIfNegative = valueForInvertIfNegative
}
}
if valInvertIfNegativeCap, ok := objMap["InvertIfNegative"]; ok {
if valInvertIfNegativeCap != nil {
var valueForInvertIfNegative bool
err = json.Unmarshal(*valInvertIfNegativeCap, &valueForInvertIfNegative)
if err != nil {
return err
}
this.InvertIfNegative = valueForInvertIfNegative
}
}
if valExplosion, ok := objMap["explosion"]; ok {
if valExplosion != nil {
var valueForExplosion int32
err = json.Unmarshal(*valExplosion, &valueForExplosion)
if err != nil {
return err
}
this.Explosion = valueForExplosion
}
}
if valExplosionCap, ok := objMap["Explosion"]; ok {
if valExplosionCap != nil {
var valueForExplosion int32
err = json.Unmarshal(*valExplosionCap, &valueForExplosion)
if err != nil {
return err
}
this.Explosion = valueForExplosion
}
}
if valMarker, ok := objMap["marker"]; ok {
if valMarker != nil {
var valueForMarker SeriesMarker
err = json.Unmarshal(*valMarker, &valueForMarker)
if err != nil {
return err
}
this.Marker = &valueForMarker
}
}
if valMarkerCap, ok := objMap["Marker"]; ok {
if valMarkerCap != nil {
var valueForMarker SeriesMarker
err = json.Unmarshal(*valMarkerCap, &valueForMarker)
if err != nil {
return err
}
this.Marker = &valueForMarker
}
}
if valFillFormat, ok := objMap["fillFormat"]; ok {
if valFillFormat != nil {
var valueForFillFormat FillFormat
err = json.Unmarshal(*valFillFormat, &valueForFillFormat)
if err != nil {
return err
}
this.FillFormat = &valueForFillFormat
}
}
if valFillFormatCap, ok := objMap["FillFormat"]; ok {
if valFillFormatCap != nil {
var valueForFillFormat FillFormat
err = json.Unmarshal(*valFillFormatCap, &valueForFillFormat)
if err != nil {
return err
}
this.FillFormat = &valueForFillFormat
}
}
if valEffectFormat, ok := objMap["effectFormat"]; ok {
if valEffectFormat != nil {
var valueForEffectFormat EffectFormat
err = json.Unmarshal(*valEffectFormat, &valueForEffectFormat)
if err != nil {
return err
}
this.EffectFormat = &valueForEffectFormat
}
}
if valEffectFormatCap, ok := objMap["EffectFormat"]; ok {
if valEffectFormatCap != nil {
var valueForEffectFormat EffectFormat
err = json.Unmarshal(*valEffectFormatCap, &valueForEffectFormat)
if err != nil {
return err
}
this.EffectFormat = &valueForEffectFormat
}
}
if valLineFormat, ok := objMap["lineFormat"]; ok {
if valLineFormat != nil {
var valueForLineFormat LineFormat
err = json.Unmarshal(*valLineFormat, &valueForLineFormat)
if err != nil {
return err
}
this.LineFormat = &valueForLineFormat
}
}
if valLineFormatCap, ok := objMap["LineFormat"]; ok {
if valLineFormatCap != nil {
var valueForLineFormat LineFormat
err = json.Unmarshal(*valLineFormatCap, &valueForLineFormat)
if err != nil {
return err
}
this.LineFormat = &valueForLineFormat
}
}
this.DataPointType = "OneValue"
if valDataPointType, ok := objMap["dataPointType"]; ok {
if valDataPointType != nil {
var valueForDataPointType string
err = json.Unmarshal(*valDataPointType, &valueForDataPointType)
if err != nil {
var valueForDataPointTypeInt int32
err = json.Unmarshal(*valDataPointType, &valueForDataPointTypeInt)
if err != nil {
return err
}
this.DataPointType = string(valueForDataPointTypeInt)
} else {
this.DataPointType = valueForDataPointType
}
}
}
if valDataPointTypeCap, ok := objMap["DataPointType"]; ok {
if valDataPointTypeCap != nil {
var valueForDataPointType string
err = json.Unmarshal(*valDataPointTypeCap, &valueForDataPointType)
if err != nil {
var valueForDataPointTypeInt int32
err = json.Unmarshal(*valDataPointTypeCap, &valueForDataPointTypeInt)
if err != nil {
return err
}
this.DataPointType = string(valueForDataPointTypeInt)
} else {
this.DataPointType = valueForDataPointType
}
}
}
if valDataPoints, ok := objMap["dataPoints"]; ok {
if valDataPoints != nil {
var valueForDataPoints []OneValueChartDataPoint
err = json.Unmarshal(*valDataPoints, &valueForDataPoints)
if err != nil {
return err
}
valueForIDataPoints := make([]IOneValueChartDataPoint, len(valueForDataPoints))
for i, v := range valueForDataPoints {
valueForIDataPoints[i] = IOneValueChartDataPoint(&v)
}
this.DataPoints = valueForIDataPoints
}
}
if valDataPointsCap, ok := objMap["DataPoints"]; ok {
if valDataPointsCap != nil {
var valueForDataPoints []OneValueChartDataPoint
err = json.Unmarshal(*valDataPointsCap, &valueForDataPoints)
if err != nil {
return err
}
valueForIDataPoints := make([]IOneValueChartDataPoint, len(valueForDataPoints))
for i, v := range valueForDataPoints {
valueForIDataPoints[i] = IOneValueChartDataPoint(&v)
}
this.DataPoints = valueForIDataPoints
}
}
return nil
}