/
excel.chartseries.yml
861 lines (770 loc) · 32.9 KB
/
excel.chartseries.yml
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
### YamlMime:TSType
name: Excel.ChartSeries
uid: 'excel!Excel.ChartSeries:class'
package: excel!
fullName: Excel.ChartSeries
summary: Represents a series in a chart.
remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
type: class
properties:
- name: axisGroup
uid: 'excel!Excel.ChartSeries#axisGroup:member'
package: excel!
fullName: axisGroup
summary: Specifies the group for the specified series.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'axisGroup: Excel.ChartAxisGroup | "Primary" | "Secondary";'
return:
type: '<xref uid="excel!Excel.ChartAxisGroup:enum" /> | "Primary" | "Secondary"'
- name: chartType
uid: 'excel!Excel.ChartSeries#chartType:member'
package: excel!
fullName: chartType
summary: Represents the chart type of a series. See `Excel.ChartType` for details.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
chartType: Excel.ChartType | "Invalid" | "ColumnClustered" | "ColumnStacked" | "ColumnStacked100" |
"3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" | "BarStacked" | "BarStacked100"
| "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" | "LineStacked100" | "LineMarkers" |
"LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded" | "3DPieExploded" | "BarOfPie" |
"XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" | "XYScatterLinesNoMarkers" | "AreaStacked" |
"AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" | "DoughnutExploded" | "RadarMarkers" | "RadarFilled" |
"Surface" | "SurfaceWireframe" | "SurfaceTopView" | "SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" |
"StockHLC" | "StockOHLC" | "StockVHLC" | "StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" |
"CylinderColStacked100" | "CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" |
"CylinderCol" | "ConeColClustered" | "ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" |
"ConeBarStacked" | "ConeBarStacked100" | "ConeCol" | "PyramidColClustered" | "PyramidColStacked" |
"PyramidColStacked100" | "PyramidBarClustered" | "PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" |
"3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie" | "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" |
"Histogram" | "Boxwhisker" | "Pareto" | "RegionMap" | "Treemap" | "Waterfall" | "Sunburst" | "Funnel";
return:
type: >-
<xref uid="excel!Excel.ChartType:enum" /> | "Invalid" | "ColumnClustered" | "ColumnStacked" |
"ColumnStacked100" | "3DColumnClustered" | "3DColumnStacked" | "3DColumnStacked100" | "BarClustered" |
"BarStacked" | "BarStacked100" | "3DBarClustered" | "3DBarStacked" | "3DBarStacked100" | "LineStacked" |
"LineStacked100" | "LineMarkers" | "LineMarkersStacked" | "LineMarkersStacked100" | "PieOfPie" | "PieExploded"
| "3DPieExploded" | "BarOfPie" | "XYScatterSmooth" | "XYScatterSmoothNoMarkers" | "XYScatterLines" |
"XYScatterLinesNoMarkers" | "AreaStacked" | "AreaStacked100" | "3DAreaStacked" | "3DAreaStacked100" |
"DoughnutExploded" | "RadarMarkers" | "RadarFilled" | "Surface" | "SurfaceWireframe" | "SurfaceTopView" |
"SurfaceTopViewWireframe" | "Bubble" | "Bubble3DEffect" | "StockHLC" | "StockOHLC" | "StockVHLC" |
"StockVOHLC" | "CylinderColClustered" | "CylinderColStacked" | "CylinderColStacked100" |
"CylinderBarClustered" | "CylinderBarStacked" | "CylinderBarStacked100" | "CylinderCol" | "ConeColClustered" |
"ConeColStacked" | "ConeColStacked100" | "ConeBarClustered" | "ConeBarStacked" | "ConeBarStacked100" |
"ConeCol" | "PyramidColClustered" | "PyramidColStacked" | "PyramidColStacked100" | "PyramidBarClustered" |
"PyramidBarStacked" | "PyramidBarStacked100" | "PyramidCol" | "3DColumn" | "Line" | "3DLine" | "3DPie" | "Pie"
| "XYScatter" | "3DArea" | "Area" | "Doughnut" | "Radar" | "Histogram" | "Boxwhisker" | "Pareto" | "RegionMap"
| "Treemap" | "Waterfall" | "Sunburst" | "Funnel"
- name: context
uid: 'excel!Excel.ChartSeries#context:member'
package: excel!
fullName: context
summary: >-
The request context associated with the object. This connects the add-in's process to the Office host
application's process.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'context: RequestContext;'
return:
type: '<xref uid="excel!Excel.RequestContext:class" />'
- name: dataLabels
uid: 'excel!Excel.ChartSeries#dataLabels:member'
package: excel!
fullName: dataLabels
summary: Represents a collection of all data labels in the series.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly dataLabels: Excel.ChartDataLabels;'
return:
type: '<xref uid="excel!Excel.ChartDataLabels:class" />'
- name: doughnutHoleSize
uid: 'excel!Excel.ChartSeries#doughnutHoleSize:member'
package: excel!
fullName: doughnutHoleSize
summary: >-
Represents the doughnut hole size of a chart series. Only valid on doughnut and doughnut exploded charts. Throws
an `InvalidArgument` error on invalid charts.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'doughnutHoleSize: number;'
return:
type: number
- name: explosion
uid: 'excel!Excel.ChartSeries#explosion:member'
package: excel!
fullName: explosion
summary: >-
Specifies the explosion value for a pie-chart or doughnut-chart slice. Returns 0 (zero) if there's no explosion
(the tip of the slice is in the center of the pie).
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'explosion: number;'
return:
type: number
- name: filtered
uid: 'excel!Excel.ChartSeries#filtered:member'
package: excel!
fullName: filtered
summary: Specifies if the series is filtered. Not applicable for surface charts.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'filtered: boolean;'
return:
type: boolean
- name: firstSliceAngle
uid: 'excel!Excel.ChartSeries#firstSliceAngle:member'
package: excel!
fullName: firstSliceAngle
summary: >-
Specifies the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies
only to pie, 3-D pie, and doughnut charts. Can be a value from 0 through 360.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'firstSliceAngle: number;'
return:
type: number
- name: format
uid: 'excel!Excel.ChartSeries#format:member'
package: excel!
fullName: format
summary: 'Represents the formatting of a chart series, which includes fill and line formatting.'
remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly format: Excel.ChartSeriesFormat;'
return:
type: '<xref uid="excel!Excel.ChartSeriesFormat:class" />'
- name: gapWidth
uid: 'excel!Excel.ChartSeries#gapWidth:member'
package: excel!
fullName: gapWidth
summary: >-
Represents the gap width of a chart series. Only valid on bar and column charts, as well as specific classes of
line and pie charts. Throws an invalid argument exception on invalid charts.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'gapWidth: number;'
return:
type: number
- name: hasDataLabels
uid: 'excel!Excel.ChartSeries#hasDataLabels:member'
package: excel!
fullName: hasDataLabels
summary: Specifies if the series has data labels.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'hasDataLabels: boolean;'
return:
type: boolean
- name: invertIfNegative
uid: 'excel!Excel.ChartSeries#invertIfNegative:member'
package: excel!
fullName: invertIfNegative
summary: True if Excel inverts the pattern in the item when it corresponds to a negative number.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'invertIfNegative: boolean;'
return:
type: boolean
- name: markerBackgroundColor
uid: 'excel!Excel.ChartSeries#markerBackgroundColor:member'
package: excel!
fullName: markerBackgroundColor
summary: Specifies the marker background color of a chart series.
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-series-markers.yaml
await Excel.run(async (context) => {
let sheet = context.workbook.worksheets.getItem("Sample");
let salesTable = sheet.tables.getItem("SalesTable");
let dataRange = sheet.getRange("A1:E7");
// Create an XY scatter chart.
let chart = sheet.charts.add("XYScatterSmooth", dataRange, "Auto");
chart.title.text = "Bicycle Parts Quarterly Sales";
let series = chart.series;
let series0 = series.getItemAt(0);
let series1 = series.getItemAt(1);
let series2 = series.getItemAt(2);
let series3 = series.getItemAt(3);
// Set markers.
series0.markerStyle = "Dash";
series0.markerForegroundColor = "black";
series1.markerStyle = "Star";
series1.markerForegroundColor = "black";
series2.markerStyle = "X";
series2.markerSize = 12;
series3.markerStyle = "Triangle";
series3.markerBackgroundColor = "purple";
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'markerBackgroundColor: string;'
return:
type: string
- name: markerForegroundColor
uid: 'excel!Excel.ChartSeries#markerForegroundColor:member'
package: excel!
fullName: markerForegroundColor
summary: Specifies the marker foreground color of a chart series.
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-series-markers.yaml
await Excel.run(async (context) => {
let sheet = context.workbook.worksheets.getItem("Sample");
let salesTable = sheet.tables.getItem("SalesTable");
let dataRange = sheet.getRange("A1:E7");
// Create an XY scatter chart.
let chart = sheet.charts.add("XYScatterSmooth", dataRange, "Auto");
chart.title.text = "Bicycle Parts Quarterly Sales";
let series = chart.series;
let series0 = series.getItemAt(0);
let series1 = series.getItemAt(1);
let series2 = series.getItemAt(2);
let series3 = series.getItemAt(3);
// Set markers.
series0.markerStyle = "Dash";
series0.markerForegroundColor = "black";
series1.markerStyle = "Star";
series1.markerForegroundColor = "black";
series2.markerStyle = "X";
series2.markerSize = 12;
series3.markerStyle = "Triangle";
series3.markerBackgroundColor = "purple";
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'markerForegroundColor: string;'
return:
type: string
- name: markerSize
uid: 'excel!Excel.ChartSeries#markerSize:member'
package: excel!
fullName: markerSize
summary: >-
Specifies the marker size of a chart series. The supported size range is 2 to 72. This method returns an
InvalidArgument error if it's set with a size outside of the supported range.
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-series-markers.yaml
await Excel.run(async (context) => {
let sheet = context.workbook.worksheets.getItem("Sample");
let salesTable = sheet.tables.getItem("SalesTable");
let dataRange = sheet.getRange("A1:E7");
// Create an XY scatter chart.
let chart = sheet.charts.add("XYScatterSmooth", dataRange, "Auto");
chart.title.text = "Bicycle Parts Quarterly Sales";
let series = chart.series;
let series0 = series.getItemAt(0);
let series1 = series.getItemAt(1);
let series2 = series.getItemAt(2);
let series3 = series.getItemAt(3);
// Set markers.
series0.markerStyle = "Dash";
series0.markerForegroundColor = "black";
series1.markerStyle = "Star";
series1.markerForegroundColor = "black";
series2.markerStyle = "X";
series2.markerSize = 12;
series3.markerStyle = "Triangle";
series3.markerBackgroundColor = "purple";
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'markerSize: number;'
return:
type: number
- name: markerStyle
uid: 'excel!Excel.ChartSeries#markerStyle:member'
package: excel!
fullName: markerStyle
summary: Specifies the marker style of a chart series. See `Excel.ChartMarkerStyle` for details.
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-series-markers.yaml
await Excel.run(async (context) => {
let sheet = context.workbook.worksheets.getItem("Sample");
let salesTable = sheet.tables.getItem("SalesTable");
let dataRange = sheet.getRange("A1:E7");
// Create an XY scatter chart.
let chart = sheet.charts.add("XYScatterSmooth", dataRange, "Auto");
chart.title.text = "Bicycle Parts Quarterly Sales";
let series = chart.series;
let series0 = series.getItemAt(0);
let series1 = series.getItemAt(1);
let series2 = series.getItemAt(2);
let series3 = series.getItemAt(3);
// Set markers.
series0.markerStyle = "Dash";
series0.markerForegroundColor = "black";
series1.markerStyle = "Star";
series1.markerForegroundColor = "black";
series2.markerStyle = "X";
series2.markerSize = 12;
series3.markerStyle = "Triangle";
series3.markerBackgroundColor = "purple";
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: >-
markerStyle: Excel.ChartMarkerStyle | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" | "Triangle" | "X"
| "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture";
return:
type: >-
<xref uid="excel!Excel.ChartMarkerStyle:enum" /> | "Invalid" | "Automatic" | "None" | "Square" | "Diamond" |
"Triangle" | "X" | "Star" | "Dot" | "Dash" | "Circle" | "Plus" | "Picture"
- name: name
uid: 'excel!Excel.ChartSeries#name:member'
package: excel!
fullName: name
summary: Specifies the name of a series in a chart. The name's length should not be greater than 255 characters.
remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'name: string;'
return:
type: string
- name: overlap
uid: 'excel!Excel.ChartSeries#overlap:member'
package: excel!
fullName: overlap
summary: >-
Specifies how bars and columns are positioned. Can be a value between -100 and 100. Applies only to 2-D bar and
2-D column charts.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'overlap: number;'
return:
type: number
- name: plotOrder
uid: 'excel!Excel.ChartSeries#plotOrder:member'
package: excel!
fullName: plotOrder
summary: Specifies the plot order of a chart series within the chart group.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'plotOrder: number;'
return:
type: number
- name: points
uid: 'excel!Excel.ChartSeries#points:member'
package: excel!
fullName: points
summary: Returns a collection of all points in the series.
remarks: '\[ [API set: ExcelApi 1.1](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly points: Excel.ChartPointsCollection;'
return:
type: '<xref uid="excel!Excel.ChartPointsCollection:class" />'
- name: secondPlotSize
uid: 'excel!Excel.ChartSeries#secondPlotSize:member'
package: excel!
fullName: secondPlotSize
summary: >-
Specifies the size of the secondary section of either a pie-of-pie chart or a bar-of-pie chart, as a percentage of
the size of the primary pie. Can be a value from 5 to 200.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'secondPlotSize: number;'
return:
type: number
- name: showShadow
uid: 'excel!Excel.ChartSeries#showShadow:member'
package: excel!
fullName: showShadow
summary: Specifies if the series has a shadow.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'showShadow: boolean;'
return:
type: boolean
- name: smooth
uid: 'excel!Excel.ChartSeries#smooth:member'
package: excel!
fullName: smooth
summary: Specifies if the series is smooth. Only applicable to line and scatter charts.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'smooth: boolean;'
return:
type: boolean
- name: splitType
uid: 'excel!Excel.ChartSeries#splitType:member'
package: excel!
fullName: splitType
summary: Specifies the way the two sections of either a pie-of-pie chart or a bar-of-pie chart are split.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
splitType: Excel.ChartSplitType | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" |
"SplitByCustomSplit";
return:
type: >-
<xref uid="excel!Excel.ChartSplitType:enum" /> | "SplitByPosition" | "SplitByValue" | "SplitByPercentValue" |
"SplitByCustomSplit"
- name: trendlines
uid: 'excel!Excel.ChartSeries#trendlines:member'
package: excel!
fullName: trendlines
summary: The collection of trendlines in the series.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly trendlines: Excel.ChartTrendlineCollection;'
return:
type: '<xref uid="excel!Excel.ChartTrendlineCollection:class" />'
- name: varyByCategories
uid: 'excel!Excel.ChartSeries#varyByCategories:member'
package: excel!
fullName: varyByCategories
summary: True if Excel assigns a different color or pattern to each data marker. The chart must contain only one series.
remarks: '\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'varyByCategories: boolean;'
return:
type: boolean
methods:
- name: delete()
uid: 'excel!Excel.ChartSeries#delete:member(1)'
package: excel!
fullName: delete()
summary: Deletes the chart series.
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-series.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Sample");
const seriesCollection = sheet.charts.getItemAt(0).series;
seriesCollection.load("count");
await context.sync();
if (seriesCollection.count > 0) {
const series = seriesCollection.getItemAt(0);
// Delete the first series.
series.delete();
}
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'delete(): void;'
return:
type: void
description: ''
- name: load(options)
uid: 'excel!Excel.ChartSeries#load:member(1)'
package: excel!
fullName: load(options)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'load(options?: Excel.Interfaces.ChartSeriesLoadOptions): Excel.ChartSeries;'
parameters:
- id: options
description: Provides options for which properties of the object to load.
type: '<xref uid="excel!Excel.Interfaces.ChartSeriesLoadOptions:interface" />'
return:
type: '<xref uid="excel!Excel.ChartSeries:class" />'
description: ''
- name: load(propertyNames)
uid: 'excel!Excel.ChartSeries#load:member(2)'
package: excel!
fullName: load(propertyNames)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'load(propertyNames?: string | string[]): Excel.ChartSeries;'
parameters:
- id: propertyNames
description: A comma-delimited string or an array of strings that specify the properties to load.
type: 'string | string[]'
return:
type: '<xref uid="excel!Excel.ChartSeries:class" />'
description: |-
#### Examples
```TypeScript
// Rename the 1st series of Chart1 to "New Series Name".
await Excel.run(async (context) => {
const chart = context.workbook.worksheets.getItem("Sheet1").charts.getItem("Chart1");
chart.series.getItemAt(0).name = "New Series Name";
await context.sync();
console.log("Series1 Renamed");
});
```
- name: load(propertyNamesAndPaths)
uid: 'excel!Excel.ChartSeries#load:member(3)'
package: excel!
fullName: load(propertyNamesAndPaths)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: |-
load(propertyNamesAndPaths?: {
select?: string;
expand?: string;
}): Excel.ChartSeries;
parameters:
- id: propertyNamesAndPaths
description: >-
`propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and
`propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
type: |-
{
select?: string;
expand?: string;
}
return:
type: '<xref uid="excel!Excel.ChartSeries:class" />'
description: ''
- name: 'set(properties, options)'
uid: 'excel!Excel.ChartSeries#set:member(1)'
package: excel!
fullName: 'set(properties, options)'
summary: >-
Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate
properties, or another API object of the same type.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'set(properties: Interfaces.ChartSeriesUpdateData, options?: OfficeExtension.UpdateOptions): void;'
parameters:
- id: properties
description: >-
A JavaScript object with properties that are structured isomorphically to the properties of the object on
which the method is called.
type: '<xref uid="excel!Excel.Interfaces.ChartSeriesUpdateData:interface" />'
- id: options
description: Provides an option to suppress errors if the properties object tries to set any read-only properties.
type: '<xref uid="office!OfficeExtension.UpdateOptions:interface" />'
return:
type: void
description: ''
- name: set(properties)
uid: 'excel!Excel.ChartSeries#set:member(2)'
package: excel!
fullName: set(properties)
summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'set(properties: Excel.ChartSeries): void;'
parameters:
- id: properties
description: ''
type: '<xref uid="excel!Excel.ChartSeries:class" />'
return:
type: void
description: ''
- name: setBubbleSizes(sourceData)
uid: 'excel!Excel.ChartSeries#setBubbleSizes:member(1)'
package: excel!
fullName: setBubbleSizes(sourceData)
summary: Sets the bubble sizes for a chart series. Only works for bubble charts.
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-bubble-chart.yaml
await Excel.run(async (context) => {
/*
The table is expected to look like this:
Product, Inventory, Price, Current Market Share
Calamansi, 2000, $2.45, 10%
...
We want each bubble to represent a single row.
*/
// Get the worksheet and table data.
const sheet = context.workbook.worksheets.getItem("Sample");
const table = sheet.tables.getItem("Sales");
const dataRange = table.getDataBodyRange();
// Get the table data without the row names.
const valueRange = dataRange.getOffsetRange(0, 1).getResizedRange(0, -1);
// Create the chart.
const bubbleChart = sheet.charts.add(Excel.ChartType.bubble, valueRange);
bubbleChart.name = "Product Chart";
// Remove the default series, since we want a unique series for each row.
bubbleChart.series.getItemAt(0).delete();
// Load the data necessary to make a chart series.
dataRange.load(["rowCount", "values"]);
await context.sync();
// For each row, create a chart series (a bubble).
for (let i = 0; i < dataRange.rowCount; i++) {
const newSeries = bubbleChart.series.add(dataRange.values[i][0], i);
newSeries.setXAxisValues(dataRange.getCell(i, 1));
newSeries.setValues(dataRange.getCell(i, 2));
newSeries.setBubbleSizes(dataRange.getCell(i, 3));
// Show the product name and market share percentage.
newSeries.dataLabels.showSeriesName = true;
newSeries.dataLabels.showBubbleSize = true;
newSeries.dataLabels.showValue = false;
}
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'setBubbleSizes(sourceData: Range): void;'
parameters:
- id: sourceData
description: The `Range` object corresponding to the source data.
type: '<xref uid="excel!Excel.Range:class" />'
return:
type: void
description: ''
- name: setValues(sourceData)
uid: 'excel!Excel.ChartSeries#setValues:member(1)'
package: excel!
fullName: setValues(sourceData)
summary: 'Sets the values for a chart series. For scatter charts, it refers to y-axis values.'
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/10-chart/chart-series.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getItem("Sample");
let seriesCollection = sheet.charts.getItemAt(0);
let rangeSelection = sheet.getRange("C2:C7");
let xRangeSelection = sheet.getRange("A1:A7");
// Add a series.
let newSeries = seriesCollection.series.add("Qtr2");
newSeries.setValues(rangeSelection);
newSeries.setXAxisValues(xRangeSelection);
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'setValues(sourceData: Range): void;'
parameters:
- id: sourceData
description: The `Range` object corresponding to the source data.
type: '<xref uid="excel!Excel.Range:class" />'
return:
type: void
description: ''
- name: setXAxisValues(sourceData)
uid: 'excel!Excel.ChartSeries#setXAxisValues:member(1)'
package: excel!
fullName: setXAxisValues(sourceData)
summary: Sets the values of the x-axis for a chart series.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'setXAxisValues(sourceData: Range): void;'
parameters:
- id: sourceData
description: The `Range` object corresponding to the source data.
type: '<xref uid="excel!Excel.Range:class" />'
return:
type: void
description: ''
- name: toJSON()
uid: 'excel!Excel.ChartSeries#toJSON:member(1)'
package: excel!
fullName: toJSON()
summary: >-
Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to
`JSON.stringify()`<!-- -->. (`JSON.stringify`<!-- -->, in turn, calls the `toJSON` method of the object that is
passed to it.) Whereas the original Excel.ChartSeries object is an API object, the `toJSON` method returns a plain
JavaScript object (typed as `Excel.Interfaces.ChartSeriesData`<!-- -->) that contains shallow copies of any loaded
child properties from the original object.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'toJSON(): Excel.Interfaces.ChartSeriesData;'
return:
type: '<xref uid="excel!Excel.Interfaces.ChartSeriesData:interface" />'
description: ''
extends: '<xref uid="office!OfficeExtension.ClientObject:class" />'