Skip to content

Commit 9e1f789

Browse files
committed
align label
1 parent aabc0ef commit 9e1f789

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

client/packages/lowcoder-comps/src/comps/basicChartComp/chartConfigs/scatterChartConfig.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ export const ScatterChartConfig = (function () {
5050
symbol: props.shape,
5151
label: {
5252
show: props.showLabel,
53+
position: 'right',
54+
formatter: function (param) {
55+
return param.data[2];
56+
},
57+
},
58+
labelLayout: function () {
59+
return {
60+
x: '88%',
61+
moveOverlap: 'shiftY'
62+
};
63+
},
64+
labelLine: {
65+
show: true,
66+
length2: 5,
67+
lineStyle: {
68+
color: '#bbb'
69+
}
5370
},
5471
singleAxis: props.singleAxis,
5572
divider: props.divider,

client/packages/lowcoder-comps/src/comps/scatterChartComp/scatterChartUtils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ export function getSeriesConfig(props: EchartsConfigProps) {
6868
let config = {
6969
...props.chartConfig,
7070
name: s.seriesName,
71-
label: {
72-
show: s.showLabel,
73-
},
7471
encode: {
7572
itemName: props.xAxisKey,
7673
value: s.columnName,
@@ -212,7 +209,7 @@ export function getEchartsConfig(
212209
lineStyle: {
213210
...chartStyleWrapper(props?.chartStyle, theme?.chartStyle)
214211
},
215-
data: transformedData.map(d => [d[props.xAxisKey], d[series.encode.value]]),
212+
data: transformedData.map(d => [d[props.xAxisKey], d[series.encode.value], ...Object.values(d)]),
216213
})),
217214
};
218215

0 commit comments

Comments
 (0)