@@ -17,7 +17,6 @@ import {
17
17
ChartJSRuntime ,
18
18
CustomizedDataSet ,
19
19
DataSet ,
20
- DatasetDesign ,
21
20
ExcelChartDataset ,
22
21
ExcelChartDefinition ,
23
22
} from "../../../types/chart/chart" ;
@@ -65,7 +64,7 @@ export class LineChart extends AbstractChart {
65
64
readonly type = "line" ;
66
65
readonly dataSetsHaveTitle : boolean ;
67
66
readonly cumulative : boolean ;
68
- readonly dataSetDesign ?: DatasetDesign [ ] ;
67
+ readonly customDatasets ?: CustomizedDataSet [ ] ;
69
68
readonly axesDesign ?: AxesDesign ;
70
69
readonly fillArea ?: boolean ;
71
70
readonly showValues ?: boolean ;
@@ -86,7 +85,7 @@ export class LineChart extends AbstractChart {
86
85
this . aggregated = definition . aggregated ;
87
86
this . dataSetsHaveTitle = definition . dataSetsHaveTitle ;
88
87
this . cumulative = definition . cumulative ;
89
- this . dataSetDesign = definition . dataSets ;
88
+ this . customDatasets = definition . dataSets ;
90
89
this . axesDesign = definition . axesDesign ;
91
90
this . fillArea = definition . fillArea ;
92
91
this . showValues = definition . showValues ;
@@ -137,7 +136,7 @@ export class LineChart extends AbstractChart {
137
136
const ranges : CustomizedDataSet [ ] = [ ] ;
138
137
for ( const [ i , dataSet ] of dataSets . entries ( ) ) {
139
138
ranges . push ( {
140
- ...this . dataSetDesign ?. [ i ] ,
139
+ ...this . customDatasets ?. [ i ] ,
141
140
dataRange : this . getters . getRangeString ( dataSet . dataRange , targetSheetId || this . sheetId ) ,
142
141
} ) ;
143
142
}
@@ -165,7 +164,7 @@ export class LineChart extends AbstractChart {
165
164
const range : CustomizedDataSet [ ] = [ ] ;
166
165
for ( const [ i , dataSet ] of this . dataSets . entries ( ) ) {
167
166
range . push ( {
168
- ...this . dataSetDesign ?. [ i ] ,
167
+ ...this . customDatasets ?. [ i ] ,
169
168
dataRange : this . getters . getRangeString ( dataSet . dataRange , this . sheetId ) ,
170
169
} ) ;
171
170
}
@@ -196,7 +195,7 @@ export class LineChart extends AbstractChart {
196
195
// Excel does not support aggregating labels
197
196
if ( this . aggregated ) return undefined ;
198
197
const dataSets : ExcelChartDataset [ ] = this . dataSets
199
- . map ( ( ds : DataSet ) => toExcelDataset ( this . getters , ds ) )
198
+ . map ( ( ds : DataSet , i : number ) => toExcelDataset ( this . getters , ds , this . customDatasets ?. [ i ] ) )
200
199
. filter ( ( ds ) => ds . range !== "" && ds . range !== CellErrorType . InvalidReference ) ;
201
200
const labelRange = toExcelLabelRange (
202
201
this . getters ,
0 commit comments