@@ -134,9 +134,13 @@ export function getEchartsConfig(
134134 chartSize ?: ChartSize ,
135135 theme ?: any ,
136136) : EChartsOptionWithMap {
137+
138+ console . log ( "props" , props ) ;
139+ console . log ( "theme" , theme ) ;
140+
137141 const backgroundColor = props ?. chartStyle ?. background || theme ?. chartStyle ?. backgroundColor ;
138142 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 ;
140144 const direction = props ?. chartStyle ?. direction || theme ?. chartStyle ?. direction ;
141145
142146 console . log ( "props" , props ) ;
@@ -149,15 +153,15 @@ export function getEchartsConfig(
149153 'top' : props . echartsLegendConfig . top === 'bottom' ?'top' :'bottom' ,
150154 "left" :props . echartsTitleConfig . top ,
151155 "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 ,
155159 "color" : props ?. titleStyle ?. text || theme ?. titleStyle ?. fontColor ,
156- "fontStyle" : props ?. titleStyle ?. fontStyle || theme ?. titleStyle ?. fontStyle ,
160+ "fontStyle" : props ?. titleStyle ?. chartFontStyle || theme ?. titleStyle ?. fontStyle ,
157161 "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 ]
161165 }
162166 } ,
163167 "backgroundColor" : gradientColor && backgroundColor
@@ -181,15 +185,15 @@ export function getEchartsConfig(
181185 "data" : props . echartsOption . data ?. map ( data => data . name ) ,
182186 "top" : props . echartsLegendConfig . top ,
183187 "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 ,
187191 "color" : props ?. legendStyle ?. text || theme ?. legendStyle ?. fontColor ,
188- "fontStyle" : props ?. legendStyle ?. fontStyle || theme ?. legendStyle ?. fontStyle ,
192+ "fontStyle" : props ?. legendStyle ?. chartFontStyle || theme ?. legendStyle ?. fontStyle ,
189193 "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 ]
193197 }
194198 } ,
195199 "series" : [
@@ -208,26 +212,26 @@ export function getEchartsConfig(
208212 "itemStyle" : {
209213 "opacity" : props . opacity ,
210214 "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 ,
214218 "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 ]
218222 } ,
219223 "label" : {
220224 "show" : props . label ,
221225 "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 ,
225229 "color" : props ?. labelStyle ?. text || theme ?. labelStyle ?. fontColor ,
226- "fontStyle" : props ?. labelStyle ?. fontStyle || theme ?. labelStyle ?. fontStyle ,
230+ "fontStyle" : props ?. labelStyle ?. chartFontStyle || theme ?. labelStyle ?. fontStyle ,
227231 "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 ]
231235 } ,
232236 "data" : props . echartsOption . data
233237 }
0 commit comments