We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4a262b commit 163bb3cCopy full SHA for 163bb3c
src/Line.tsx
@@ -46,8 +46,20 @@ const Line: React.FC<ProgressProps> = ({
46
fillOpacity="0"
47
/>
48
{percentList.map((ptg, index) => {
49
+ let dashPercent = 1;
50
+ switch (strokeLinecap) {
51
+ case 'round':
52
+ dashPercent = 1 - strokeWidth / 100;
53
+ break;
54
+ case 'square':
55
+ dashPercent = 1 - strokeWidth / 2 / 100;
56
57
+ default:
58
+ dashPercent = 1;
59
60
+ }
61
const pathStyle = {
- strokeDasharray: `${ptg}px, 100px`,
62
+ strokeDasharray: `${ptg * dashPercent}px, 100px`,
63
strokeDashoffset: `-${stackPtg}px`,
64
transition:
65
transition ||
0 commit comments