Skip to content

Commit bc5936a

Browse files
committed
Added initial value of funnelChartUtils.
1 parent 4de9835 commit bc5936a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

client/packages/lowcoder-comps/src/comps/funnelChartComp/funnelChartUtils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function getEchartsConfig(
138138
console.log("props", props);
139139
console.log("theme", theme);
140140

141-
const backgroundColor = props?.chartStyle?.chartBackgroundColor || theme?.chartStyle?.backgroundColor;
141+
const backgroundColor = props?.chartStyle?.chartBackgroundColor || theme?.chartStyle?.backgroundColor || "#FFFFFF";
142142
const gradientColor = props?.chartStyle?.chartGradientColor || theme?.chartStyle?.gradientColor;
143143
const opacity = props?.chartStyle?.chartOpacity || theme?.chartStyle?.opacity;
144144
const direction = props?.chartStyle?.direction || theme?.chartStyle?.direction;
@@ -154,9 +154,9 @@ export function getEchartsConfig(
154154
"left":props.echartsTitleConfig.top,
155155
"textStyle": {
156156
"fontFamily": props?.titleStyle?.chartFontFamily || theme?.titleStyle?.fontFamily,
157-
"fontSize": props?.titleStyle?.chartTextSize || theme?.titleStyle?.fontSize,
157+
"fontSize": props?.titleStyle?.chartTextSize || theme?.titleStyle?.fontSize || '18',
158158
"fontWeight": props?.titleStyle?.chartTextWeight || theme?.titleStyle?.fontWeight,
159-
"color": props?.titleStyle?.chartTextColor || theme?.titleStyle?.fontColor,
159+
"color": props?.titleStyle?.chartTextColor || theme?.titleStyle?.fontColor || "#000000",
160160
"fontStyle": props?.titleStyle?.chartFontStyle || theme?.titleStyle?.fontStyle,
161161
"textShadowColor": props?.titleStyle?.chartShadowColor || theme?.titleStyle?.shadowColor,
162162
"textShadowBlur": props?.titleStyle?.chartBoxShadow?.split('px')[0] || theme?.titleStyle?.boxShadow.split('px')[0],
@@ -171,8 +171,8 @@ export function getEchartsConfig(
171171
"x2": direction?.split(' ')[2],
172172
"y2": direction?.split(' ')[3],
173173
"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)}
176176
]
177177
}
178178
: backgroundColor + opacityToHex(opacity),
@@ -188,7 +188,7 @@ export function getEchartsConfig(
188188
"fontFamily": props?.legendStyle?.chartFontFamily || theme?.legendStyle?.fontFamily,
189189
"fontSize": props?.legendStyle?.chartTextSize || theme?.legendStyle?.fontSize,
190190
"fontWeight": props?.legendStyle?.chartTextWeight || theme?.legendStyle?.fontWeight,
191-
"color": props?.legendStyle?.chartTextColor || theme?.legendStyle?.fontColor,
191+
"color": props?.legendStyle?.chartTextColor || theme?.legendStyle?.fontColor || "#000000",
192192
"fontStyle": props?.legendStyle?.chartFontStyle || theme?.legendStyle?.fontStyle,
193193
"textShadowColor": props?.legendStyle?.chartShadowColor || theme?.legendStyle?.shadowColor,
194194
"textShadowBlur": props?.legendStyle?.chartBoxShadow?.split('px')[0] || theme?.legendStyle?.boxShadow.split('px')[0],
@@ -226,7 +226,7 @@ export function getEchartsConfig(
226226
"fontFamily": props?.labelStyle?.chartFontFamily || theme?.labelStyle?.fontFamily,
227227
"fontSize": props?.labelStyle?.chartTextSize || theme?.labelStyle?.fontSize,
228228
"fontWeight": props?.labelStyle?.chartTextWeight || theme?.labelStyle?.fontWeight,
229-
"color": props?.labelStyle?.chartTextColor || theme?.labelStyle?.fontColor,
229+
"color": props?.labelStyle?.chartTextColor || theme?.labelStyle?.fontColor || "#000000",
230230
"fontStyle": props?.labelStyle?.chartFontStyle || theme?.labelStyle?.fontStyle,
231231
"textShadowColor": props?.labelStyle?.chartShadowColor || theme?.labelStyle?.shadowColor,
232232
"textShadowBlur": props?.labelStyle?.chartBoxShadow?.split('px')[0] || theme?.labelStyle?.boxShadow.split('px')[0],

0 commit comments

Comments
 (0)