@@ -138,7 +138,7 @@ export function getEchartsConfig(
138
138
console . log ( "props" , props ) ;
139
139
console . log ( "theme" , theme ) ;
140
140
141
- const backgroundColor = props ?. chartStyle ?. chartBackgroundColor || theme ?. chartStyle ?. backgroundColor ;
141
+ const backgroundColor = props ?. chartStyle ?. chartBackgroundColor || theme ?. chartStyle ?. backgroundColor || "#FFFFFF" ;
142
142
const gradientColor = props ?. chartStyle ?. chartGradientColor || theme ?. chartStyle ?. gradientColor ;
143
143
const opacity = props ?. chartStyle ?. chartOpacity || theme ?. chartStyle ?. opacity ;
144
144
const direction = props ?. chartStyle ?. direction || theme ?. chartStyle ?. direction ;
@@ -154,9 +154,9 @@ export function getEchartsConfig(
154
154
"left" :props . echartsTitleConfig . top ,
155
155
"textStyle" : {
156
156
"fontFamily" : props ?. titleStyle ?. chartFontFamily || theme ?. titleStyle ?. fontFamily ,
157
- "fontSize" : props ?. titleStyle ?. chartTextSize || theme ?. titleStyle ?. fontSize ,
157
+ "fontSize" : props ?. titleStyle ?. chartTextSize || theme ?. titleStyle ?. fontSize || '18' ,
158
158
"fontWeight" : props ?. titleStyle ?. chartTextWeight || theme ?. titleStyle ?. fontWeight ,
159
- "color" : props ?. titleStyle ?. chartTextColor || theme ?. titleStyle ?. fontColor ,
159
+ "color" : props ?. titleStyle ?. chartTextColor || theme ?. titleStyle ?. fontColor || "#000000" ,
160
160
"fontStyle" : props ?. titleStyle ?. chartFontStyle || theme ?. titleStyle ?. fontStyle ,
161
161
"textShadowColor" : props ?. titleStyle ?. chartShadowColor || theme ?. titleStyle ?. shadowColor ,
162
162
"textShadowBlur" : props ?. titleStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. titleStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
@@ -171,8 +171,8 @@ export function getEchartsConfig(
171
171
"x2" : direction ?. split ( ' ' ) [ 2 ] ,
172
172
"y2" : direction ?. split ( ' ' ) [ 3 ] ,
173
173
"colorStops" : [
174
- { "offset" : 0 , "color" : opacity ? backgroundColor + opacityToHex ( opacity ) : backgroundColor || "#FFFFFF" } ,
175
- { "offset" : 1 , "color" : opacity ? gradientColor + opacityToHex ( opacity ) : gradientColor || "#FFFFFF" }
174
+ { "offset" : 0 , "color" : backgroundColor + opacityToHex ( opacity ) } ,
175
+ { "offset" : 1 , "color" : gradientColor + opacityToHex ( opacity ) }
176
176
]
177
177
}
178
178
: backgroundColor + opacityToHex ( opacity ) ,
@@ -188,7 +188,7 @@ export function getEchartsConfig(
188
188
"fontFamily" : props ?. legendStyle ?. chartFontFamily || theme ?. legendStyle ?. fontFamily ,
189
189
"fontSize" : props ?. legendStyle ?. chartTextSize || theme ?. legendStyle ?. fontSize ,
190
190
"fontWeight" : props ?. legendStyle ?. chartTextWeight || theme ?. legendStyle ?. fontWeight ,
191
- "color" : props ?. legendStyle ?. chartTextColor || theme ?. legendStyle ?. fontColor ,
191
+ "color" : props ?. legendStyle ?. chartTextColor || theme ?. legendStyle ?. fontColor || "#000000" ,
192
192
"fontStyle" : props ?. legendStyle ?. chartFontStyle || theme ?. legendStyle ?. fontStyle ,
193
193
"textShadowColor" : props ?. legendStyle ?. chartShadowColor || theme ?. legendStyle ?. shadowColor ,
194
194
"textShadowBlur" : props ?. legendStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. legendStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
@@ -226,7 +226,7 @@ export function getEchartsConfig(
226
226
"fontFamily" : props ?. labelStyle ?. chartFontFamily || theme ?. labelStyle ?. fontFamily ,
227
227
"fontSize" : props ?. labelStyle ?. chartTextSize || theme ?. labelStyle ?. fontSize ,
228
228
"fontWeight" : props ?. labelStyle ?. chartTextWeight || theme ?. labelStyle ?. fontWeight ,
229
- "color" : props ?. labelStyle ?. chartTextColor || theme ?. labelStyle ?. fontColor ,
229
+ "color" : props ?. labelStyle ?. chartTextColor || theme ?. labelStyle ?. fontColor || "#000000" ,
230
230
"fontStyle" : props ?. labelStyle ?. chartFontStyle || theme ?. labelStyle ?. fontStyle ,
231
231
"textShadowColor" : props ?. labelStyle ?. chartShadowColor || theme ?. labelStyle ?. shadowColor ,
232
232
"textShadowBlur" : props ?. labelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. labelStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
0 commit comments