Skip to content

Commit 4468ede

Browse files
authored
Merge pull request #884 from thundersdata-frontend/rn-issue
fix: 优化进度条图
2 parents a61eeef + b3db6b9 commit 4468ede

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.changeset/wise-sheep-glow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@td-design/lego': patch
3+
---
4+
5+
fix: 优化进度条图

packages/lego/src/progress/index.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ export default forwardRef<ReactEcharts, ProgressProps>(
7373
},
7474
grid: {
7575
...baseChartConfig.grid,
76-
left: '8%',
77-
right: '4%',
76+
left: '5%',
77+
right: '5%',
78+
top: 20,
79+
bottom: 0,
7880
},
7981
xAxis: {
8082
show: false,
@@ -103,8 +105,10 @@ export default forwardRef<ReactEcharts, ProgressProps>(
103105
yAxisIndex: 0,
104106
data: data,
105107
z: 3,
108+
barCategoryGap: '30%',
106109
label: {
107110
...baseBarConfig.label,
111+
offset: [-5, -3],
108112
position: 'insideBottomLeft',
109113
formatter: '{b}',
110114
},
@@ -119,6 +123,7 @@ export default forwardRef<ReactEcharts, ProgressProps>(
119123
barWidth: 6,
120124
yAxisIndex: 0,
121125
barGap: '-100%',
126+
barCategoryGap: '30%',
122127
z: 2,
123128
silent: true,
124129
data: data.map(item => ({
@@ -128,6 +133,7 @@ export default forwardRef<ReactEcharts, ProgressProps>(
128133
label: {
129134
...baseBarConfig.label,
130135
position: 'insideBottomRight',
136+
offset: [5, -3],
131137
formatter: '{b}',
132138
},
133139
itemStyle: {
@@ -140,11 +146,11 @@ export default forwardRef<ReactEcharts, ProgressProps>(
140146
type: 'scatter',
141147
data,
142148
yAxisIndex: 0,
143-
symbolSize: 12,
149+
symbolSize: 10,
144150
itemStyle: {
145151
color: theme.colors.assist1000,
146152
opacity: 1,
147-
borderWidth: 1,
153+
borderWidth: 0.5,
148154
borderColor: theme.colors.gray50,
149155
},
150156
z: 4,

0 commit comments

Comments
 (0)