@@ -134,9 +134,13 @@ export function getEchartsConfig(
134
134
chartSize ?: ChartSize ,
135
135
theme ?: any ,
136
136
) : EChartsOptionWithMap {
137
+
138
+ console . log ( "props" , props ) ;
139
+ console . log ( "theme" , theme ) ;
140
+
137
141
const backgroundColor = props ?. chartStyle ?. background || theme ?. chartStyle ?. backgroundColor ;
138
142
const gradientColor = props ?. chartStyle ?. gradientBackground || theme ?. chartStyle ?. gradientColor ;
139
- const opacity = props ?. chartStyle ?. opacity || theme ?. chartStyle ?. opacity ;
143
+ const opacity = props ?. chartStyle ?. chartOpacity || theme ?. chartStyle ?. opacity ;
140
144
const direction = props ?. chartStyle ?. direction || theme ?. chartStyle ?. direction ;
141
145
142
146
console . log ( "props" , props ) ;
@@ -149,15 +153,15 @@ export function getEchartsConfig(
149
153
'top' : props . echartsLegendConfig . top === 'bottom' ?'top' :'bottom' ,
150
154
"left" :props . echartsTitleConfig . top ,
151
155
"textStyle" : {
152
- "fontFamily" : props ?. titleStyle ?. fontFamily || theme ?. titleStyle ?. fontFamily ,
153
- "fontSize" : props ?. titleStyle ?. textSize || theme ?. titleStyle ?. fontSize ,
154
- "fontWeight" : props ?. titleStyle ?. textWeight || theme ?. titleStyle ?. fontWeight ,
156
+ "fontFamily" : props ?. titleStyle ?. chartFontFamily || theme ?. titleStyle ?. fontFamily ,
157
+ "fontSize" : props ?. titleStyle ?. chartTextSize || theme ?. titleStyle ?. fontSize ,
158
+ "fontWeight" : props ?. titleStyle ?. chartTextWeight || theme ?. titleStyle ?. fontWeight ,
155
159
"color" : props ?. titleStyle ?. text || theme ?. titleStyle ?. fontColor ,
156
- "fontStyle" : props ?. titleStyle ?. fontStyle || theme ?. titleStyle ?. fontStyle ,
160
+ "fontStyle" : props ?. titleStyle ?. chartFontStyle || theme ?. titleStyle ?. fontStyle ,
157
161
"textShadowColor" : props ?. titleStyle ?. boxShadowColor || theme ?. titleStyle ?. shadowColor ,
158
- "textShadowBlur" : props ?. titleStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] || theme ?. titleStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
159
- "textShadowOffsetX" : props ?. titleStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] || theme ?. titleStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
160
- "textShadowOffsetY" : props ?. titleStyle ?. boxShadow ?. split ( 'px' ) [ 2 ] || theme ?. titleStyle ?. boxShadow . split ( 'px' ) [ 2 ]
162
+ "textShadowBlur" : props ?. titleStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. titleStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
163
+ "textShadowOffsetX" : props ?. titleStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. titleStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
164
+ "textShadowOffsetY" : props ?. titleStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. titleStyle ?. boxShadow . split ( 'px' ) [ 2 ]
161
165
}
162
166
} ,
163
167
"backgroundColor" : gradientColor && backgroundColor
@@ -181,15 +185,15 @@ export function getEchartsConfig(
181
185
"data" : props . echartsOption . data ?. map ( data => data . name ) ,
182
186
"top" : props . echartsLegendConfig . top ,
183
187
"textStyle" : {
184
- "fontFamily" : props ?. legendStyle ?. fontFamily || theme ?. legendStyle ?. fontFamily ,
185
- "fontSize" : props ?. legendStyle ?. textSize || theme ?. legendStyle ?. fontSize ,
186
- "fontWeight" : props ?. legendStyle ?. textWeight || theme ?. legendStyle ?. fontWeight ,
188
+ "fontFamily" : props ?. legendStyle ?. chartFontFamily || theme ?. legendStyle ?. fontFamily ,
189
+ "fontSize" : props ?. legendStyle ?. chartTextSize || theme ?. legendStyle ?. fontSize ,
190
+ "fontWeight" : props ?. legendStyle ?. chartTextWeight || theme ?. legendStyle ?. fontWeight ,
187
191
"color" : props ?. legendStyle ?. text || theme ?. legendStyle ?. fontColor ,
188
- "fontStyle" : props ?. legendStyle ?. fontStyle || theme ?. legendStyle ?. fontStyle ,
192
+ "fontStyle" : props ?. legendStyle ?. chartFontStyle || theme ?. legendStyle ?. fontStyle ,
189
193
"textShadowColor" : props ?. legendStyle ?. boxShadowColor || theme ?. legendStyle ?. shadowColor ,
190
- "textShadowBlur" : props ?. legendStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] || theme ?. legendStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
191
- "textShadowOffsetX" : props ?. legendStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] || theme ?. legendStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
192
- "textShadowOffsetY" : props ?. legendStyle ?. boxShadow ?. split ( 'px' ) [ 2 ] || theme ?. legendStyle ?. boxShadow . split ( 'px' ) [ 2 ]
194
+ "textShadowBlur" : props ?. legendStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. legendStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
195
+ "textShadowOffsetX" : props ?. legendStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. legendStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
196
+ "textShadowOffsetY" : props ?. legendStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. legendStyle ?. boxShadow . split ( 'px' ) [ 2 ]
193
197
}
194
198
} ,
195
199
"series" : [
@@ -208,26 +212,26 @@ export function getEchartsConfig(
208
212
"itemStyle" : {
209
213
"opacity" : props . opacity ,
210
214
"borderColor" : props ?. chartStyle ?. border || theme ?. chartStyle ?. borderColor ,
211
- "borderWidth" : props ?. chartStyle ?. borderWidth || theme ?. chartStyle ?. borderWidth ,
212
- "borderType" : props ?. chartStyle ?. borderStyle || theme ?. chartStyle ?. borderType ,
213
- "borderRadius" : props ?. chartStyle ?. radius || theme ?. chartStyle ?. borderRadius ,
215
+ "borderWidth" : props ?. chartStyle ?. chartBorderWidth || theme ?. chartStyle ?. borderWidth ,
216
+ "borderType" : props ?. chartStyle ?. chartBorderStyle || theme ?. chartStyle ?. borderType ,
217
+ "borderRadius" : props ?. chartStyle ?. chartBorderRadius || theme ?. chartStyle ?. borderRadius ,
214
218
"shadowColor" : props ?. chartStyle ?. boxShadowColor || theme ?. chartStyle ?. shadowColor ,
215
- "shadowBlur" : props ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
216
- "shadowOffsetX" : props ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
217
- "shadowOffsetY" : props ?. chartStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow . split ( 'px' ) [ 2 ]
219
+ "shadowBlur" : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
220
+ "shadowOffsetX" : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
221
+ "shadowOffsetY" : props ?. chartStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. chartStyle ?. boxShadow . split ( 'px' ) [ 2 ]
218
222
} ,
219
223
"label" : {
220
224
"show" : props . label ,
221
225
"position" : props . echartsLabelConfig . top ,
222
- "fontFamily" : props ?. labelStyle ?. fontFamily || theme ?. labelStyle ?. fontFamily ,
223
- "fontSize" : props ?. labelStyle ?. textSize || theme ?. labelStyle ?. fontSize ,
224
- "fontWeight" : props ?. labelStyle ?. textWeight || theme ?. labelStyle ?. fontWeight ,
226
+ "fontFamily" : props ?. labelStyle ?. chartFontFamily || theme ?. labelStyle ?. fontFamily ,
227
+ "fontSize" : props ?. labelStyle ?. chartTextSize || theme ?. labelStyle ?. fontSize ,
228
+ "fontWeight" : props ?. labelStyle ?. chartTextWeight || theme ?. labelStyle ?. fontWeight ,
225
229
"color" : props ?. labelStyle ?. text || theme ?. labelStyle ?. fontColor ,
226
- "fontStyle" : props ?. labelStyle ?. fontStyle || theme ?. labelStyle ?. fontStyle ,
230
+ "fontStyle" : props ?. labelStyle ?. chartFontStyle || theme ?. labelStyle ?. fontStyle ,
227
231
"textShadowColor" : props ?. labelStyle ?. boxShadowColor || theme ?. labelStyle ?. shadowColor ,
228
- "textShadowBlur" : props ?. labelStyle ?. boxShadow ?. split ( 'px' ) [ 0 ] || theme ?. labelStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
229
- "textShadowOffsetX" : props ?. labelStyle ?. boxShadow ?. split ( 'px' ) [ 1 ] || theme ?. labelStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
230
- "textShadowOffsetY" : props ?. labelStyle ?. boxShadow ?. split ( 'px' ) [ 2 ] || theme ?. labelStyle ?. boxShadow . split ( 'px' ) [ 2 ]
232
+ "textShadowBlur" : props ?. labelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 0 ] || theme ?. labelStyle ?. boxShadow . split ( 'px' ) [ 0 ] ,
233
+ "textShadowOffsetX" : props ?. labelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 1 ] || theme ?. labelStyle ?. boxShadow . split ( 'px' ) [ 1 ] ,
234
+ "textShadowOffsetY" : props ?. labelStyle ?. chartBoxShadow ?. split ( 'px' ) [ 2 ] || theme ?. labelStyle ?. boxShadow . split ( 'px' ) [ 2 ]
231
235
} ,
232
236
"data" : props . echartsOption . data
233
237
}
0 commit comments