@@ -174,6 +174,7 @@ export function getEchartsConfig(
174
174
"trigger" : "item" ,
175
175
"formatter" : "{a} <br/>{b} : {c}%"
176
176
} ,
177
+ "color" : props ?. echartsOption ?. data ?. map ( data => data . color ) ,
177
178
"series" : [
178
179
{
179
180
"name" : props . echartsConfig . type ,
@@ -182,7 +183,7 @@ export function getEchartsConfig(
182
183
"left" : `${ props . left } %` ,
183
184
"top" : props . top ,
184
185
"bottom" : props . bottom ,
185
- "width" : `${ props . left } %` ,
186
+ "width" :`${ props . left } %` ,
186
187
"min" : props . min ,
187
188
"max" : props . max ,
188
189
"gap" : props . gap ,
@@ -195,8 +196,7 @@ export function getEchartsConfig(
195
196
"width" : props ?. pointerWidth ,
196
197
} ,
197
198
"itemStyle" : {
198
- "color" : props . echartsOption . data ?. map ( data => data . color ) ,
199
- "opacity" : props . opacity ,
199
+ "opacity" : props ?. opacity ,
200
200
"borderColor" : props ?. chartStyle ?. chartBorderColor || theme ?. chartStyle ?. borderColor ,
201
201
"borderWidth" : props ?. chartStyle ?. chartBorderWidth || theme ?. chartStyle ?. borderWidth ,
202
202
"borderType" : props ?. chartStyle ?. chartBorderStyle || theme ?. chartStyle ?. borderType ,
@@ -207,27 +207,27 @@ export function getEchartsConfig(
207
207
"shadowOffsetY" : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
208
208
} ,
209
209
"progress" : {
210
- "roundCap" : true ,
210
+ "roundCap" : props . roundCap ,
211
211
"show" : props ?. progressBar ,
212
212
"width" : props ?. progressBarWidth
213
213
} ,
214
214
"axisLine" : {
215
- "roundCap" : true ,
215
+ "roundCap" : props . roundCap ,
216
216
"lineStyle" : {
217
217
"width" : props ?. progressBarWidth
218
218
}
219
219
} ,
220
220
"axisLabel" : {
221
- "distance" : props ?. progressBarWidth + "10" , // Distance of the labels from the axis
222
- "fontFamily" : props ?. axixLabelStyle ?. chartFontFamily || theme ?. axixLabelStyle ?. fontFamily ,
223
- "fontSize" : props ?. axixLabelStyle ?. chartTextSize || theme ?. axixLabelStyle ?. fontSize || 12 ,
224
- "fontWeight" : props ?. axixLabelStyle ?. chartTextWeight || theme ?. axixLabelStyle ?. fontWeight ,
225
- "color" : props ?. axixLabelStyle ?. chartTextColor || theme ?. axixLabelStyle ?. fontColor || "#000000" ,
226
- "fontStyle" : props ?. axixLabelStyle ?. chartFontStyle || theme ?. axixLabelStyle ?. fontStyle ,
227
- "textShadowColor" : props ?. axixLabelStyle ?. chartShadowColor || theme ?. axixLabelStyle ?. shadowColor ,
228
- "textShadowBlur" : props ?. axixLabelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. axixLabelStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
229
- "textShadowOffsetX" : props ?. axixLabelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. axixLabelStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
230
- "textShadowOffsetY" : props ?. axixLabelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. axixLabelStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
221
+ "distance" : Number ( props ?. progressBarWidth ) + 10 ,
222
+ "fontFamily" : props ?. axisLabelStyle ?. chartFontFamily || theme ?. axisLabelStyle ?. fontFamily ,
223
+ "fontSize" : props ?. axisLabelStyle ?. chartTextSize || theme ?. axisLabelStyle ?. fontSize || 12 ,
224
+ "fontWeight" : props ?. axisLabelStyle ?. chartTextWeight || theme ?. axisLabelStyle ?. fontWeight ,
225
+ "color" : props ?. axisLabelStyle ?. chartTextColor || theme ?. axisLabelStyle ?. fontColor || "#000000" ,
226
+ "fontStyle" : props ?. axisLabelStyle ?. chartFontStyle || theme ?. axisLabelStyle ?. fontStyle ,
227
+ "textShadowColor" : props ?. axisLabelStyle ?. chartShadowColor || theme ?. axisLabelStyle ?. shadowColor ,
228
+ "textShadowBlur" : props ?. axisLabelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. axisLabelStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] ,
229
+ "textShadowOffsetX" : props ?. axisLabelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. axisLabelStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] ,
230
+ "textShadowOffsetY" : props ?. axisLabelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. axisLabelStyle ?. boxShadow ?. split ( 'px' ) [ 2 ]
231
231
} ,
232
232
'detail' : {
233
233
"fontFamily" : props ?. legendStyle ?. chartFontFamily || theme ?. legendStyle ?. fontFamily ,
@@ -245,7 +245,8 @@ export function getEchartsConfig(
245
245
"position" : props . echartsLabelConfig . top ,
246
246
} ,
247
247
"data" : props . echartsOption . data ?. map ( item => ( {
248
- ...item ,
248
+ "value" : item . value ,
249
+ "name" : item . name ,
249
250
title : {
250
251
"fontFamily" : props ?. labelStyle ?. chartFontFamily || theme ?. labelStyle ?. fontFamily ,
251
252
"fontSize" : props ?. labelStyle ?. chartTextSize || theme ?. labelStyle ?. fontSize ,
0 commit comments