Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lihuizhen
ec-report-refactor
Commits
0027e935
Commit
0027e935
authored
Jan 20, 2022
by
peco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:仪表盘缺口方向和角度计算
parent
812ae707
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
3 deletions
+39
-3
DashboardProgress.vue
components/DashboardProgress/DashboardProgress.vue
+39
-3
No files found.
components/DashboardProgress/DashboardProgress.vue
View file @
0027e935
...
@@ -52,6 +52,41 @@
...
@@ -52,6 +52,41 @@
[
1
,
this
.
elementInfo
.
option
.
progress
.
trailColor
]
[
1
,
this
.
elementInfo
.
option
.
progress
.
trailColor
]
]
]
const
strokeWidth
=
this
.
elementInfo
.
option
.
progress
.
strokeWidth
const
strokeWidth
=
this
.
elementInfo
.
option
.
progress
.
strokeWidth
var
startAngle
=
180
var
endAngle
=
0
switch
(
this
.
elementInfo
.
option
.
progress
.
gapPosition
)
{
case
'bottom'
:
if
(
this
.
elementInfo
.
option
.
progress
.
gapDegree
>
180
)
{
startAngle
=
90
+
(
360
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
)
/
2
endAngle
=
90
-
(
360
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
)
/
2
}
else
{
startAngle
=
270
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
endAngle
=
0
-
(
90
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
)
}
break
;
case
'top'
:
if
(
this
.
elementInfo
.
option
.
progress
.
gapDegree
>
180
)
{
startAngle
=
270
+
(
360
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
)
/
2
endAngle
=
270
-
(
360
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
)
/
2
}
else
{
startAngle
=
360
+
(
90
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
)
endAngle
=
90
+
(
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
)
}
break
;
case
'left'
:
if
(
this
.
elementInfo
.
option
.
progress
.
gapDegree
>
180
)
{
startAngle
=
0
+
(
360
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
)
/
2
endAngle
=
0
-
(
360
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
)
/
2
}
else
{
startAngle
=
180
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
endAngle
=
-
180
+
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
}
break
;
default
:
startAngle
=
360
-
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
endAngle
=
0
+
this
.
elementInfo
.
option
.
progress
.
gapDegree
/
2
break
;
}
const
options
=
{
const
options
=
{
...
this
.
elementInfo
.
option
,
...
this
.
elementInfo
.
option
,
tooltip
:
{
tooltip
:
{
...
@@ -63,15 +98,15 @@
...
@@ -63,15 +98,15 @@
top
:
'45%'
,
top
:
'45%'
,
textStyle
:
{
textStyle
:
{
fontSize
:
30
,
fontSize
:
30
,
color
:
'#
000000
'
,
color
:
'#
ffffff
'
,
},
},
}],
}],
series
:
[{
series
:
[{
type
:
'gauge'
,
type
:
'gauge'
,
// center: ['50%', '50%'],
// center: ['50%', '50%'],
radius
:
'50%'
,
radius
:
'50%'
,
startAngle
:
'180'
,
startAngle
:
startAngle
,
endAngle
:
'0'
,
endAngle
:
endAngle
,
pointer
:
{
pointer
:
{
show
:
false
,
show
:
false
,
},
},
...
@@ -84,6 +119,7 @@
...
@@ -84,6 +119,7 @@
shadowOffsetY
:
0
,
shadowOffsetY
:
0
,
opacity
:
1
,
opacity
:
1
,
},
},
roundCap
:
this
.
elementInfo
.
option
.
progress
.
strokeLinecap
==
'round'
?
true
:
false
},
},
splitLine
:
{
splitLine
:
{
show
:
false
show
:
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment