8
8
}"
9
9
>
10
10
<path
11
- :stroke-width =" emptyThickness"
12
11
:fill =" computedEmptyColorFill"
12
+ :d =" emptyFillPath"
13
+ :style =" {
14
+ transition: styles.transition,
15
+ }"
16
+ :class =" { 'ep-circle--nodata': !dataIsAvailable }"
17
+ >
18
+ </path >
19
+ <path
20
+ :stroke-width =" emptyThickness"
21
+ fill =" transparent"
13
22
:stroke =" computedEmptyColor"
14
23
class =" ep-half-circle--empty"
15
24
:d =" emptyPath"
28
37
</g >
29
38
</fade-in-transition >
30
39
40
+ <path class =" ep-half-circle--progress__fill" :d =" fillPath" :fill =" computedColorFill" > </path >
31
41
<path
32
42
:stroke-width =" thickness"
33
43
class =" ep-half-circle--progress ep-circle--progress"
34
44
:class =" animationClass"
35
45
:d =" path"
36
- : fill =" computedColorFill "
46
+ fill =" transparent "
37
47
:stroke =" computedColor"
38
48
:stroke-dasharray =" circumference"
39
49
:stroke-linecap =" options.line"
@@ -58,17 +68,33 @@ export default {
58
68
path () {
59
69
return ` M ${ this .position } , ${ this .options .size / 2 } a ${ this .radius } ,${ this .radius } 0 1,1 ${ this .radius * 2 } ,0` ;
60
70
},
71
+ fillPath () {
72
+ return ` M ${ this .fillPosition } , ${ this .options .size / 2 } a ${ this .fillRadius } ,${ this .fillRadius } 0 1,1 ${
73
+ this .fillRadius * 2
74
+ } ,0` ;
75
+ },
61
76
emptyPath () {
62
77
return ` M ${ this .emptyPosition } , ${ this .options .size / 2 } a ${ this .emptyRadius } ,${ this .emptyRadius } 0 1,1 ${
63
78
this .emptyRadius * 2
64
79
} ,0` ;
65
80
},
81
+ emptyFillPath () {
82
+ return ` M ${ this .emptyFillPosition } , ${ this .options .size / 2 } a ${ this .emptyFillRadius } ,${
83
+ this .emptyFillRadius
84
+ } 0 1,1 ${ this .emptyFillRadius * 2 } ,0` ;
85
+ },
66
86
position () {
67
87
return this .options .size / 2 - this .radius ;
68
88
},
89
+ fillPosition () {
90
+ return this .options .size / 2 - this .fillRadius ;
91
+ },
69
92
emptyPosition () {
70
93
return this .options .size / 2 - this .emptyRadius ;
71
94
},
95
+ emptyFillPosition () {
96
+ return this .options .size / 2 - this .emptyFillRadius ;
97
+ },
72
98
},
73
99
};
74
100
</script >
0 commit comments