@@ -8,49 +8,18 @@ const automizer = new Automizer({
88
99const pres = automizer
1010 . loadRoot ( `RootTemplate.pptx` )
11- . load ( `ChartScatter.pptx` , 'charts' ) ;
12-
13- const dataScatter = < ChartData > < unknown > {
14- series : [
15- { label : 'series s1' } ,
16- { label : 'series s2' } ,
17- { label : 'series s3' }
18- ] ,
19- categories : [
20- {
21- label : 'r1' , values : [
22- { x : 10 , y : 20 } , { x : 9 , y : 30 } , { x : 19 , y : 40 }
23- ] , styles : [
24- {
25- color : {
26- type : 'srgbClr' ,
27- value : 'cccccc'
28- }
29- }
30- ]
31- } ,
32- { label : 'r2' , values : [ { x : 21 , y : 11 } , { x : 8 , y : 31 } , { x : 18 , y : 41 } ] } ,
33- { label : 'r3' , values : [ { x : 22 , y : 28 } , { x : 7 , y : 26 } , { x : 17 , y : 36 } ] } ,
34- { label : 'r4' , values : [ { x : 13 , y : 13 } , { x : 16 , y : 28 } , { x : 26 , y : 38 } ] } ,
35- { label : 'r5' , values : [ { x : 18 , y : 24 } , { x : 15 , y : 24 } , { x : 25 , y : 34 } ] } ,
36- { label : 'r6' , values : [ { x : 28 , y : 34 } , { x : 25 , y : 34 } , { x : 35 , y : 44 } ] } ,
37- // {label: 'r1', values: [{x: 10, y: 20, label: "s1-1"}, {x: 9, y: 30, label: "s2-1"}, {x: 19, y: 40, label: "s3-1"}] },
38- // {label: 'r2', values: [{x: 21, y: 11, label: "s1-2"}, {x: 8, y: 31, label: "s2-2"}, {x: 18, y: 41, label: "s3-2"}] },
39- // {label: 'r3', values: [{x: 22, y: 28, label: "s1-3"}, {x: 7, y: 26, label: "s2-3"}, {x: 17, y: 36, label: "s3-3"}] },
40- // {label: 'r4', values: [{x: 13, y: 13, label: "s1-4"}, {x: 16, y: 28, label: "s2-4"}, {x: 26, y: 38, label: "s3-4"}] },
41- // {label: 'r5', values: [{x: 18, y: 24, label: "s1-5"}, {x: 15, y: 24, label: "s2-5"}, {x: 25, y: 34, label: "s3-5"}] },
42- // {label: 'r6', values: [{x: 28, y: 34, label: "s1-6"}, {x: 25, y: 34, label: "s2-6"}, {x: 35, y: 44, label: "s3-6"}] },
43- ] ,
44-
45- }
11+ . load ( `TemplateWithMaster.pptx` , 'master' ) ;
12+
13+
4614const run = async ( ) => {
4715 await pres
48- . addSlide ( 'charts' , 2 , ( slide ) => {
49- slide . modifyElement ( 'ScatterPoint' , [
50- modify . setChartScatter ( dataScatter ) ,
51- ] ) ;
16+ . addMaster ( 'master' , 2 , ( slide ) => {
17+
18+ } )
19+ . addSlide ( 'master' , 2 , ( slide ) => {
20+
5221 } )
53- . write ( `modify-chart-scatter-point .test.pptx` )
22+ . write ( `add-master .test.pptx` )
5423
5524 return pres ;
5625} ;
0 commit comments