Skip to content

Commit fb58dfa

Browse files
committed
Fixed an issue that style order would appear different in theme settings and right panel.
1 parent 4058b81 commit fb58dfa

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

client/packages/lowcoder-comps/src/comps/funnelChartComp/funnelChartConstants.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ let chartJsonModeChildren: any = {
278278
if (EchartsStyle) {
279279
chartJsonModeChildren = {
280280
...chartJsonModeChildren,
281-
style: styleControl(FunnelTextStyle, 'style'),
281+
chartStyle: styleControl(FunnelChartStyle, 'chartStyle'),
282282
titleStyle: styleControl(FunnelTextStyle, 'titleStyle'),
283+
labelStyle: styleControl(FunnelTextStyle, 'labelStyle'),
283284
legendStyle: styleControl(FunnelTextStyle, 'legendStyle'),
284-
chartStyle: styleControl(FunnelChartStyle, 'chartStyle')
285285
}
286286
}
287287

client/packages/lowcoder-comps/src/comps/funnelChartComp/funnelChartPropertyView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function funnelChartPropertyView(
6161
{
6262
children.label.getView() ?
6363
<Section name={sectionNames.labelStyle}>
64-
{children.style?.getPropertyView()}
64+
{children.labelStyle?.getPropertyView()}
6565
</Section> : <></>
6666
}
6767
{

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ export function getEchartsConfig(
141141
'top': props.echartsLegendConfig.top === 'bottom' ?'top':'bottom',
142142
"left":props.echartsTitleConfig.top,
143143
"textStyle": {
144-
"fontFamily": props?.titleStyle?.fontFamily || theme?.style?.fontFamily || "Arial",
145-
"fontSize": props?.titleStyle?.textSize || theme?.style?.textSize || 18,
146-
"fontWeight": props?.titleStyle?.textWeight || theme?.style?.textWeight,
147-
"color": props?.titleStyle?.text || theme?.style?.text || "#333",
148-
"fontStyle": props?.titleStyle?.fontStyle || theme?.style?.fontStyle,
149-
"textShadowColor": props?.titleStyle?.boxShadowColor || theme?.style?.boxShadowColor,
144+
"fontFamily": props?.titleStyle?.fontFamily,
145+
"fontSize": props?.titleStyle?.textSize,
146+
"fontWeight": props?.titleStyle?.textWeight,
147+
"color": props?.titleStyle?.text,
148+
"fontStyle": props?.titleStyle?.fontStyle,
149+
"textShadowColor": props?.titleStyle?.boxShadowColor,
150150
"textShadowBlur": props?.titleStyle?.boxShadow?.split(' ')[0],
151151
"textShadowOffsetX": props?.titleStyle?.boxShadow?.split(' ')[1],
152152
"textShadowOffsetY": props?.titleStyle?.boxShadow?.split(' ')[2]
@@ -159,11 +159,11 @@ export function getEchartsConfig(
159159
"x2": props?.chartStyle?.direction?.split(' ')[2],
160160
"y2": props?.chartStyle?.direction?.split(' ')[3],
161161
"colorStops": [
162-
{ "offset": 0, "color": props?.chartStyle?.opacity ? props?.chartStyle?.background + opacityToHex(props?.chartStyle?.opacity) : props?.chartStyle?.background || "#FFFFFF" },
163-
{ "offset": 1, "color": props?.chartStyle?.opacity ? props?.chartStyle?.gradientBackground + opacityToHex(props?.chartStyle?.opacity) : props?.chartStyle?.gradientBackground || "#FFFFFF" }
162+
{ "offset": 0, "color": props?.chartStyle?.opacity ? props?.chartStyle?.background + opacityToHex(props?.chartStyle?.opacity) : props?.chartStyle?.background},
163+
{ "offset": 1, "color": props?.chartStyle?.opacity ? props?.chartStyle?.gradientBackground + opacityToHex(props?.chartStyle?.opacity) : props?.chartStyle?.gradientBackground}
164164
]
165165
}
166-
: props?.chartStyle?.opacity ? (props?.chartStyle?.background || theme?.style?.background) + opacityToHex(props?.chartStyle?.opacity) : props?.chartStyle?.background || theme?.style?.background,
166+
: props?.chartStyle?.opacity ? (props?.chartStyle?.background) + opacityToHex(props?.chartStyle?.opacity) : props?.chartStyle?.background,
167167
"color": props.echartsOption.data?.map(data => data.color),
168168
"tooltip": props.tooltip&&{
169169
"trigger": "item",
@@ -173,12 +173,12 @@ export function getEchartsConfig(
173173
"data": props.echartsOption.data?.map(data=>data.name),
174174
"top": props.echartsLegendConfig.top,
175175
"textStyle": {
176-
"fontFamily": props?.legendStyle?.fontFamily || theme?.style?.fontFamily || "Arial",
177-
"fontSize": props?.legendStyle?.textSize || theme?.style?.textSize,
178-
"fontWeight": props?.legendStyle?.textWeight || theme?.style?.textWeight,
179-
"color": props?.legendStyle?.text || theme?.style?.text || "#000000",
180-
"fontStyle": props?.legendStyle?.fontStyle || theme?.style?.fontStyle,
181-
"textShadowColor": props?.legendStyle?.boxShadowColor || theme?.style?.boxShadowColor,
176+
"fontFamily": props?.legendStyle?.fontFamily,
177+
"fontSize": props?.legendStyle?.textSize,
178+
"fontWeight": props?.legendStyle?.textWeight,
179+
"color": props?.legendStyle?.text,
180+
"fontStyle": props?.legendStyle?.fontStyle,
181+
"textShadowColor": props?.legendStyle?.boxShadowColor,
182182
"textShadowBlur": props?.legendStyle?.boxShadow?.split(' ')[0],
183183
"textShadowOffsetX": props?.legendStyle?.boxShadow?.split(' ')[1],
184184
"textShadowOffsetY": props?.legendStyle?.boxShadow?.split(' ')[2]
@@ -199,24 +199,24 @@ export function getEchartsConfig(
199199
"sort": props.echartsSortingConfig.sort,
200200
"itemStyle": {
201201
"opacity": props.opacity,
202-
"borderColor": props?.chartStyle?.border || theme?.style?.border,
202+
"borderColor": props?.chartStyle?.border,
203203
"borderWidth": props?.chartStyle?.borderWidth,
204204
"borderType": props?.chartStyle?.borderStyle,
205205
"borderRadius": props?.chartStyle?.radius,
206-
"shadowColor": props?.chartStyle?.boxShadowColor || theme?.style?.boxShadowColor,
206+
"shadowColor": props?.chartStyle?.boxShadowColor,
207207
"shadowBlur": props?.chartStyle?.boxShadow?.split(' ')[0],
208208
"shadowOffsetX": props?.chartStyle?.boxShadow?.split(' ')[0],
209209
"shadowOffsetY": props?.chartStyle?.boxShadow?.split(' ')[0]
210210
},
211211
"label": {
212212
"show": props.label,
213213
"position": props.echartsLabelConfig.top,
214-
"fontFamily": props?.style?.fontFamily || theme?.style?.fontFamily || "Arial",
215-
"fontSize": props?.style?.textSize || theme?.style?.textSize,
216-
"fontWeight": props?.style?.textWeight || theme?.style?.textWeight,
217-
"color": props?.style?.text || theme?.style?.text,
218-
"fontStyle": props?.style?.fontStyle || theme?.style?.fontStyle,
219-
"textShadowColor": props?.style?.boxShadowColor || theme?.style?.boxShadowColor,
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,
220220
"textShadowBlur": props?.style?.boxShadow?.split(' ')[0],
221221
"textShadowOffsetX": props?.style?.boxShadow?.split(' ')[1],
222222
"textShadowOffsetY": props?.style?.boxShadow?.split(' ')[2]

0 commit comments

Comments
 (0)