11import { XmlHelper } from './xml-helper' ;
22import { ModifyChart } from '../modify/modify-chart' ;
33import { Workbook } from '../types/types' ;
4- import { ChartData , ChartBubble , ChartSlot , ChartCategory , ChartSeries } from '../types/chart-types' ;
4+ import {
5+ ChartData ,
6+ ChartBubble ,
7+ ChartSlot ,
8+ ChartCategory ,
9+ ChartSeries ,
10+ } from '../types/chart-types' ;
511import { TableData } from '../types/table-types' ;
612import { ShapeCoordinates } from '../types/shape-types' ;
713
@@ -53,19 +59,18 @@ export const setChartData = (data: ChartData) => (
5359 chart : Document ,
5460 workbook : Workbook ,
5561) : void => {
56-
57- const slots = [ ] as ChartSlot [ ]
62+ const slots = [ ] as ChartSlot [ ] ;
5863 data . series . forEach ( ( series : ChartSeries , s : number ) => {
5964 slots . push ( {
6065 index : s ,
6166 series : series ,
6267 targetCol : s + 1 ,
6368 type : 'defaultSeries' ,
64- } )
69+ } ) ;
6570 } ) ;
6671
6772 new ModifyChart ( chart , workbook , data , slots ) . modify ( ) ;
68-
73+
6974 // XmlHelper.dump(chart)
7075} ;
7176
@@ -74,7 +79,7 @@ export const setChartVerticalLines = (data: ChartData) => (
7479 chart : Document ,
7580 workbook : Workbook ,
7681) : void => {
77- const slots = [ ] as ChartSlot [ ]
82+ const slots = [ ] as ChartSlot [ ] ;
7883
7984 slots . push ( {
8085 label : `Y-Values` ,
@@ -88,7 +93,7 @@ export const setChartVerticalLines = (data: ChartData) => (
8893 series : series ,
8994 targetCol : s + 2 ,
9095 type : 'xySeries' ,
91- } )
96+ } ) ;
9297 } ) ;
9398
9499 new ModifyChart ( chart , workbook , data , slots ) . modify ( ) ;
@@ -99,7 +104,7 @@ export const setChartBubbles = (data: ChartData) => (
99104 chart : Document ,
100105 workbook : Workbook ,
101106) : void => {
102- const slots = [ ] as ChartSlot [ ]
107+ const slots = [ ] as ChartSlot [ ] ;
103108
104109 data . series . forEach ( ( series : ChartSeries , s : number ) => {
105110 const colId = s * 3 ;
@@ -110,7 +115,7 @@ export const setChartBubbles = (data: ChartData) => (
110115 type : 'customSeries' ,
111116 tag : 'c:xVal' ,
112117 mapData : ( point : ChartBubble ) : number => point . x ,
113- } )
118+ } ) ;
114119 slots . push ( {
115120 label : `${ series . label } -Y-Value` ,
116121 index : s ,
@@ -119,8 +124,8 @@ export const setChartBubbles = (data: ChartData) => (
119124 type : 'customSeries' ,
120125 tag : 'c:yVal' ,
121126 mapData : ( point : ChartBubble ) : number => point . y ,
122- isStrRef : false
123- } )
127+ isStrRef : false ,
128+ } ) ;
124129 slots . push ( {
125130 label : `${ series . label } -Size` ,
126131 index : s ,
@@ -129,15 +134,15 @@ export const setChartBubbles = (data: ChartData) => (
129134 type : 'customSeries' ,
130135 tag : 'c:bubbleSize' ,
131136 mapData : ( point : ChartBubble ) : number => point . size ,
132- isStrRef : false
133- } )
137+ isStrRef : false ,
138+ } ) ;
134139 } ) ;
135140
136141 new ModifyChart ( chart , workbook , data , slots ) . modify ( ) ;
137142} ;
138143
139144export const setTableData = ( data : TableData ) => (
140- element : XMLDocument | Document | Element
145+ element : XMLDocument | Document | Element ,
141146) : void => {
142147 XmlHelper . dump ( element ) ;
143148} ;
0 commit comments