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
b505221a
Commit
b505221a
authored
Mar 30, 2023
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: chart support color config
parent
5c9c28db
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
14 deletions
+56
-14
ChinaMap.vue
components/ChinaMap/ChinaMap.vue
+7
-1
HorizontalBar.vue
components/HorizontalBar/HorizontalBar.vue
+9
-2
LineMixBar.vue
components/LineMixBar/LineMixBar.vue
+9
-2
NormalBar.vue
components/NormalBar/NormalBar.vue
+9
-2
NormalLine.vue
components/NormalLine/NormalLine.vue
+7
-3
NormalPie.vue
components/NormalPie/NormalPie.vue
+6
-2
NormalRadar.vue
components/NormalRadar/NormalRadar.vue
+9
-2
No files found.
components/ChinaMap/ChinaMap.vue
View file @
b505221a
...
...
@@ -86,7 +86,13 @@
const
index
=
finalData
.
map
(
child
=>
child
[
0
]).
indexOf
(
item
[
0
].
name
)
finalData
[
index
][
1
].
push
(
item
)
})
const
color
=
[
'#a6c84c'
,
'#ffa022'
]
// 航线的颜色
var
color
=
[
'#00f2f1'
,
'#ed3f35'
,
'#1089E7'
,
"#F8B448"
,
"#8B78F6"
,
'#8cd8ff'
,
'#f0ad54'
,
'#ffffff'
,
'#000000'
]
// 航线的颜色
if
(
this
.
elementInfo
.
option
.
colorConfig
&&
this
.
elementInfo
.
option
.
colorConfig
.
value
)
{
color
=
this
.
elementInfo
.
option
.
colorConfig
.
value
}
const
series
=
[]
finalData
.
forEach
((
item
,
i
)
=>
{
series
.
push
({
...
...
components/HorizontalBar/HorizontalBar.vue
View file @
b505221a
...
...
@@ -48,9 +48,16 @@ export default {
const
{
dataList
:
{
categories
,
series
}
}
=
this
.
elementData
const
that
=
this
const
that
=
this
var
color
=
[
'#00f2f1'
,
'#ed3f35'
,
'#1089E7'
,
"#F8B448"
,
"#8B78F6"
,
'#8cd8ff'
,
'#f0ad54'
,
'#ffffff'
,
'#000000'
]
if
(
that
.
elementInfo
.
option
.
colorConfig
&&
that
.
elementInfo
.
option
.
colorConfig
.
value
)
{
color
=
that
.
elementInfo
.
option
.
colorConfig
.
value
}
that
.
ec
.
option
=
{
...
that
.
elementInfo
.
option
,
...
that
.
elementInfo
.
option
,
color
:
color
,
yAxis
:
{
...
that
.
elementInfo
.
option
.
yAxis
,
data
:
categories
...
...
components/LineMixBar/LineMixBar.vue
View file @
b505221a
...
...
@@ -47,9 +47,16 @@
})
canvas
.
setChart
(
chart
)
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
const
that
=
this
const
that
=
this
var
color
=
[
'#00f2f1'
,
'#ed3f35'
,
'#1089E7'
,
"#F8B448"
,
"#8B78F6"
,
'#8cd8ff'
,
'#f0ad54'
,
'#ffffff'
,
'#000000'
]
if
(
that
.
elementInfo
.
option
.
colorConfig
&&
that
.
elementInfo
.
option
.
colorConfig
.
value
)
{
color
=
that
.
elementInfo
.
option
.
colorConfig
.
value
}
that
.
ec
.
option
=
{
...
that
.
elementInfo
.
option
,
...
that
.
elementInfo
.
option
,
color
:
color
,
xAxis
:
{
...
that
.
elementInfo
.
option
.
xAxis
,
data
:
categories
...
...
components/NormalBar/NormalBar.vue
View file @
b505221a
...
...
@@ -42,9 +42,16 @@
})
canvas
.
setChart
(
chart
)
const
{
categories
,
series
}
=
this
.
elementData
.
dataList
const
that
=
this
const
that
=
this
var
color
=
[
'#00f2f1'
,
'#ed3f35'
,
'#1089E7'
,
"#F8B448"
,
"#8B78F6"
,
'#8cd8ff'
,
'#f0ad54'
,
'#ffffff'
,
'#000000'
]
if
(
that
.
elementInfo
.
option
.
colorConfig
&&
that
.
elementInfo
.
option
.
colorConfig
.
value
)
{
color
=
that
.
elementInfo
.
option
.
colorConfig
.
value
}
that
.
ec
.
option
=
{
...
that
.
elementInfo
.
option
,
...
that
.
elementInfo
.
option
,
color
:
color
,
xAxis
:
{
...
that
.
elementInfo
.
option
.
xAxis
,
data
:
categories
...
...
components/NormalLine/NormalLine.vue
View file @
b505221a
...
...
@@ -42,11 +42,15 @@
canvas
.
setChart
(
chart
)
const
{
categories
=
[],
series
=
[]
}
=
this
.
elementData
.
dataList
const
that
=
this
var
color
=
[
'#00f2f1'
,
'#ed3f35'
,
'#1089E7'
,
"#F8B448"
,
"#8B78F6"
,
'#8cd8ff'
,
'#f0ad54'
,
'#ffffff'
,
'#000000'
]
if
(
that
.
elementInfo
.
option
.
colorConfig
&&
that
.
elementInfo
.
option
.
colorConfig
.
value
)
{
color
=
that
.
elementInfo
.
option
.
colorConfig
.
value
}
that
.
ec
.
option
=
{
...
that
.
elementInfo
.
option
,
color
:
[
'#00f2f1'
,
'#ed3f35'
,
'#1089E7'
,
"#F8B448"
,
"#8B78F6"
,
'#8cd8ff'
,
'#f0ad54'
,
'#ffffff'
,
'#000000'
],
color
:
color
,
xAxis
:
{
...
that
.
elementInfo
.
option
.
xAxis
,
data
:
categories
...
...
components/NormalPie/NormalPie.vue
View file @
b505221a
...
...
@@ -41,10 +41,14 @@ export default {
})
canvas
.
setChart
(
chart
)
const
{
series
}
=
this
.
elementData
.
dataList
const
that
=
this
const
that
=
this
var
color
=
[
'#1089E7'
,
'#F57474'
,
'#56D0E3'
,
'#F8B448'
,
'#8B78F6'
]
if
(
that
.
elementInfo
.
option
.
colorConfig
&&
that
.
elementInfo
.
option
.
colorConfig
.
value
)
{
color
=
that
.
elementInfo
.
option
.
colorConfig
.
value
}
this
.
ec
.
option
=
{
...
that
.
elementInfo
.
option
,
color
:
[
'#1089E7'
,
'#F57474'
,
'#56D0E3'
,
'#F8B448'
,
'#8B78F6'
]
,
color
:
color
,
tooltip
:
that
.
dealTooltip
(
that
.
elementInfo
.
option
.
tooltip
),
series
:
that
.
dealSeriesData
(
series
)
}
...
...
components/NormalRadar/NormalRadar.vue
View file @
b505221a
...
...
@@ -38,9 +38,16 @@
devicePixelRatio
:
canvasDpr
})
canvas
.
setChart
(
chart
)
const
{
indicator
,
series
}
=
this
.
elementData
.
dataList
const
{
indicator
,
series
}
=
this
.
elementData
.
dataList
var
color
=
[
'#00f2f1'
,
'#ed3f35'
,
'#1089E7'
,
"#F8B448"
,
"#8B78F6"
,
'#8cd8ff'
,
'#f0ad54'
,
'#ffffff'
,
'#000000'
]
if
(
this
.
elementInfo
.
option
.
colorConfig
&&
this
.
elementInfo
.
option
.
colorConfig
.
value
)
{
color
=
this
.
elementInfo
.
option
.
colorConfig
.
value
}
this
.
ec
.
option
=
{
...
this
.
elementInfo
.
option
,
...
this
.
elementInfo
.
option
,
color
:
color
,
tooltip
:
{},
radar
:
{
indicator
...
...
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