Skip to content

Commit d261d3e

Browse files
committed
gauge chart utils updated
1 parent 3c3806f commit d261d3e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

client/packages/lowcoder-comps/src/comps/gaugeChartComp/gaugeChartUtils.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function getEchartsConfig(props: EchartsConfigProps, chartSize?: ChartSiz
134134
"title": {
135135
"text": props.echartsTitle,
136136
'top': props.echartsLegendConfig.top === 'bottom' ?'top':'bottom',
137-
"left":"center"
137+
"left":props.echartsTitleConfig.top
138138
},
139139
"backgroundColor": props?.style?.background,
140140
"color": props.echartsOption.data?.map(data => data.color),
@@ -146,15 +146,18 @@ export function getEchartsConfig(props: EchartsConfigProps, chartSize?: ChartSiz
146146
{
147147
"name": props.echartsConfig.type,
148148
"type": props.echartsConfig.type,
149-
"left": "10%",
150-
"top": 60,
151-
"bottom": 60,
152-
"width": "80%",
153-
"min": 0,
154-
"max": 100,
155-
"gap": 2,
149+
"left": `${props.left}%`,
150+
"top": props.top,
151+
"bottom": props.bottom,
152+
"width": `${props.left}%`,
153+
"min": props.min,
154+
"max": props.max,
155+
"gap": props.gap,
156+
'detail': {
157+
"backgroundColor": props?.style?.background,
158+
},
156159
"label": {
157-
"show": true,
160+
"show": props.label,
158161
"position": props.echartsLabelConfig.top
159162
},
160163
"detail": {

0 commit comments

Comments
 (0)