@@ -109,6 +109,7 @@ export function getSeriesConfig(props: EchartsConfigProps) {
109
109
}
110
110
return {
111
111
name : props . chartConfig . subtype === "waterfall" && index === 0 ?" " :s . getView ( ) . seriesName ,
112
+ columnName : props . chartConfig . subtype === "waterfall" && index === 0 ?" " :s . getView ( ) . columnName ,
112
113
selectedMode : "single" ,
113
114
select : {
114
115
itemStyle : {
@@ -128,10 +129,10 @@ export function getSeriesConfig(props: EchartsConfigProps) {
128
129
} ,
129
130
} ;
130
131
} else {
131
- // pie
132
132
const radiusAndCenter = getPieRadiusAndCenter ( seriesLength , index , props . chartConfig ) ;
133
133
return {
134
134
...props . chartConfig ,
135
+ columnName : s . getView ( ) . columnName ,
135
136
radius : radiusAndCenter . radius ,
136
137
center : radiusAndCenter . center ,
137
138
name : s . getView ( ) . seriesName ,
@@ -227,7 +228,7 @@ export function getEchartsConfig(
227
228
d [ ` ` ] = sum - d [ seriesColumnNames [ 0 ] ] ;
228
229
sum = d [ ` ` ] ;
229
230
} )
230
- transformedData = [ { [ seriesColumnNames [ 0 ] + "_placeholder "] : 0 , [ seriesColumnNames [ 0 ] ] : total , [ props . xAxisKey ] : "Total" } , ...transformedData ]
231
+ transformedData = [ { [ " "] : 0 , [ seriesColumnNames [ 0 ] ] : total , [ props . xAxisKey ] : "Total" } , ...transformedData ]
231
232
}
232
233
233
234
if ( props . chartConfig . subtype === "polar" ) {
@@ -272,7 +273,7 @@ export function getEchartsConfig(
272
273
lineStyle : {
273
274
...chartStyleWrapper ( props ?. chartStyle , theme ?. chartStyle )
274
275
} ,
275
- data : transformedData . map ( ( i : any ) => i [ series . name ] )
276
+ data : transformedData . map ( ( i : any ) => i [ series . columnName ] )
276
277
} ) ) ,
277
278
} ;
278
279
if ( axisChart ) {
@@ -334,7 +335,7 @@ export function getEchartsConfig(
334
335
}
335
336
}
336
337
}
337
- // log .log("Echarts transformedData and config", transformedData, config);
338
+ // console .log("Echarts transformedData and config", transformedData, config);
338
339
return config ;
339
340
}
340
341
0 commit comments