Skip to content

Commit b2ee751

Browse files
committed
Fixed direction and label style.
1 parent fb58dfa commit b2ee751

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ export function getEchartsConfig(
211211
"label": {
212212
"show": props.label,
213213
"position": props.echartsLabelConfig.top,
214-
"fontFamily": props?.style?.fontFamily,
215-
"fontSize": props?.style?.textSize,
216-
"fontWeight": props?.style?.textWeight,
217-
"color": props?.style?.text,
218-
"fontStyle": props?.style?.fontStyle,
219-
"textShadowColor": props?.style?.boxShadowColor,
220-
"textShadowBlur": props?.style?.boxShadow?.split(' ')[0],
221-
"textShadowOffsetX": props?.style?.boxShadow?.split(' ')[1],
222-
"textShadowOffsetY": props?.style?.boxShadow?.split(' ')[2]
214+
"fontFamily": props?.labelStyle?.fontFamily,
215+
"fontSize": props?.labelStyle?.textSize,
216+
"fontWeight": props?.labelStyle?.textWeight,
217+
"color": props?.labelStyle?.text,
218+
"fontStyle": props?.labelStyle?.fontStyle,
219+
"textShadowColor": props?.labelStyle?.boxShadowColor,
220+
"textShadowBlur": props?.labelStyle?.boxShadow?.split(' ')[0],
221+
"textShadowOffsetX": props?.labelStyle?.boxShadow?.split(' ')[1],
222+
"textShadowOffsetY": props?.labelStyle?.boxShadow?.split(' ')[2]
223223
},
224224
"data": props.echartsOption.data
225225
}

client/packages/lowcoder/src/comps/controls/styleControl.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function isBorderStyleConfig(config: SingleColorConfig): config is borderStyleCo
188188
}
189189

190190
function isMarginConfig(config: SingleColorConfig): config is MarginConfig {
191-
return config.hasOwnProperty("direction");
191+
return config.hasOwnProperty("margin");
192192
}
193193

194194
function isDirectionConfig(config: SingleColorConfig): config is DirectionConfig {
@@ -634,6 +634,9 @@ function calcColors<ColorMap extends Record<string, string>>(
634634
if (isMarginConfig(config)) {
635635
res[name] = themeWithDefault[config.margin];
636636
}
637+
if (isDirectionConfig(config)) {
638+
res[name] = themeWithDefault[config.direction] || '0 0 1 1';
639+
}
637640
if (isPaddingConfig(config)) {
638641
res[name] = themeWithDefault[config.padding];
639642
}
@@ -998,6 +1001,7 @@ export function styleControl<T extends readonly SingleColorConfig[]>(
9981001
if (
9991002
name === 'radius' ||
10001003
name === 'margin' ||
1004+
name === 'direction' ||
10011005
name === 'padding' ||
10021006
name === 'containerHeaderPadding' ||
10031007
name === 'containerSiderPadding' ||

0 commit comments

Comments
 (0)