@@ -143,10 +143,10 @@ export function getEchartsConfig(
143
143
'top' : props . echartsLegendConfig . top === 'bottom' ?'top' :'bottom' ,
144
144
"left" :props . echartsTitleConfig . top ,
145
145
"textStyle" : {
146
- "fontFamily" : props ?. titleStyle ?. fontFamily || theme ?. style ?. fontFamily ,
147
- "fontSize" : props ?. titleStyle ?. textSize || theme ?. style ?. textSize ,
148
- "fontWeight" : props ?. titleStyle ?. textWeight || theme ?. style ?. textWeight ,
149
- "color" : props ?. titleStyle ?. text || theme ?. style ?. text ,
146
+ "fontFamily" : props ?. titleStyle ?. fontFamily || theme ?. style ?. fontFamily || "Arial" ,
147
+ "fontSize" : props ?. titleStyle ?. textSize || theme ?. style ?. textSize || 18 ,
148
+ "fontWeight" : props ?. titleStyle ?. textWeight || theme ?. style ?. textWeight || "bold" ,
149
+ "color" : props ?. titleStyle ?. text || theme ?. style ?. text || "#333" ,
150
150
"fontStyle" : props ?. titleStyle ?. fontStyle || theme ?. style ?. fontStyle ,
151
151
"textShadowColor" : props ?. titleStyle ?. boxShadowColor || theme ?. style ?. boxShadowColor ,
152
152
"textShadowBlur" : props ?. titleStyle ?. boxShadow ?. split ( ' ' ) [ 0 ] ,
@@ -163,6 +163,17 @@ export function getEchartsConfig(
163
163
"legend" :props . legendVisibility && {
164
164
"data" : props . echartsOption . data ?. map ( data => data . name ) ,
165
165
"top" : props . echartsLegendConfig . top ,
166
+ "textStyle" : {
167
+ "fontFamily" : props ?. legendStyle ?. fontFamily || theme ?. style ?. fontFamily || "Arial" ,
168
+ "fontSize" : props ?. legendStyle ?. textSize || theme ?. style ?. textSize ,
169
+ "fontWeight" : props ?. legendStyle ?. textWeight || theme ?. style ?. textWeight ,
170
+ "color" : props ?. legendStyle ?. text || theme ?. style ?. text || "#000000" ,
171
+ "fontStyle" : props ?. legendStyle ?. fontStyle || theme ?. style ?. fontStyle ,
172
+ "textShadowColor" : props ?. legendStyle ?. boxShadowColor || theme ?. style ?. boxShadowColor ,
173
+ "textShadowBlur" : props ?. legendStyle ?. boxShadow ?. split ( ' ' ) [ 0 ] ,
174
+ "textShadowOffsetX" : props ?. legendStyle ?. boxShadow ?. split ( ' ' ) [ 1 ] ,
175
+ "textShadowOffsetY" : props ?. legendStyle ?. boxShadow ?. split ( ' ' ) [ 2 ]
176
+ }
166
177
} ,
167
178
"series" : [
168
179
{
@@ -191,7 +202,7 @@ export function getEchartsConfig(
191
202
"label" : {
192
203
"show" : props . label ,
193
204
"position" : props . echartsLabelConfig . top ,
194
- "fontFamily" : props ?. style ?. fontFamily || theme ?. style ?. fontFamily ,
205
+ "fontFamily" : props ?. style ?. fontFamily || theme ?. style ?. fontFamily || "Arial" ,
195
206
"fontSize" : props ?. style ?. textSize || theme ?. style ?. textSize ,
196
207
"fontWeight" : props ?. style ?. textWeight || theme ?. style ?. textWeight ,
197
208
"color" : props ?. style ?. text || theme ?. style ?. text ,
0 commit comments