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
553e7aed
Commit
553e7aed
authored
Jan 13, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 饼图数据
parent
99fe34be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
NormalPie.vue
components/NormalPie/NormalPie.vue
+9
-6
No files found.
components/NormalPie/NormalPie.vue
View file @
553e7aed
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<uni-ec-canvas
<uni-ec-canvas
class=
"uni-ec-canvas"
class=
"uni-ec-canvas"
id=
"normal-pie"
id=
"normal-pie"
ref=
"
c
anvas"
ref=
"
normalPieC
anvas"
canvas-id=
"
lazy-load
-chart"
canvas-id=
"
normal-pie
-chart"
:ec=
"ec"
:ec=
"ec"
></uni-ec-canvas>
></uni-ec-canvas>
</view>
</view>
...
@@ -39,14 +39,14 @@ export default {
...
@@ -39,14 +39,14 @@ export default {
methods
:
{
methods
:
{
initChart
()
{
initChart
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
c
anvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
this
.
$refs
[
'
normalPieC
anvas'
].
init
((
canvas
,
width
,
height
,
canvasDpr
)
=>
{
chart
=
echarts
.
init
(
canvas
,
null
,
{
chart
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
width
:
width
,
height
:
height
,
height
:
height
,
devicePixelRatio
:
canvasDpr
devicePixelRatio
:
canvasDpr
})
})
canvas
.
setChart
(
chart
)
canvas
.
setChart
(
chart
)
const
{
dataList
:
{
categories
,
series
}
}
=
this
.
elementData
const
{
dataList
:
{
series
}
}
=
this
.
elementData
const
options
=
{
const
options
=
{
...
this
.
elementInfo
.
option
,
...
this
.
elementInfo
.
option
,
color
:
[
'#1089E7'
,
'#F57474'
,
'#56D0E3'
,
'#F8B448'
,
'#8B78F6'
],
color
:
[
'#1089E7'
,
'#F57474'
,
'#56D0E3'
,
'#F8B448'
,
'#8B78F6'
],
...
@@ -67,9 +67,12 @@ export default {
...
@@ -67,9 +67,12 @@ export default {
const
series
=
[{
const
series
=
[{
type
:
'pie'
,
type
:
'pie'
,
center
:
[
"50%"
,
"50%"
],
center
:
[
"50%"
,
"50%"
],
...
prop
s
.
elementInfo
.
option
.
pie
,
...
thi
s
.
elementInfo
.
option
.
pie
,
label
:
{
label
:
{
...
props
.
elementInfo
.
option
.
dataset
...
this
.
elementInfo
.
option
.
dataset
,
formatter
:
(
val
)
=>
{
return
this
.
$u
.
common
.
converFunction
(
this
.
elementInfo
.
option
.
dataset
.
formatter
,
val
)
}
},
},
labelLine
:
{
labelLine
:
{
show
:
true
show
:
true
...
...
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