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
80bffbda
Commit
80bffbda
authored
Jan 14, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 地图混合柱状图
parent
2702efe3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
1 deletion
+66
-1
BarMixMap.vue
components/BarMixMap/BarMixMap.vue
+63
-0
ChinaMap.vue
components/ChinaMap/ChinaMap.vue
+1
-1
geoCoordMap.js
components/uni-ec-canvas/geoCoordMap.js
+0
-0
index.vue
pages/index/index.vue
+2
-0
No files found.
components/BarMixMap/BarMixMap.vue
0 → 100644
View file @
80bffbda
<
template
>
<view>
柱状图混合地图
<uni-ec-canvas
class=
"uni-ec-canvas"
id=
"bar-mix-map"
ref=
"barMixMapCanvas"
canvas-id=
"bar-mix-map-chart"
:ec=
"ec"
></uni-ec-canvas>
</view>
</
template
>
<
script
>
import
uniEcCanvas
from
'@/components/uni-ec-canvas/uni-ec-canvas'
import
*
as
echarts
from
'@/components/uni-ec-canvas/echarts'
import
*
as
chinaJson
from
'@/components/uni-ec-canvas/china.json'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
{
geoCoordMapList
}
from
'@/components/uni-ec-canvas/geoCoordMap.js'
let
chart
=
null
export
default
{
name
:
"BarMixMap"
,
mixins
:
[
echartElementData
],
data
()
{
return
{
ec
:
{
lazyLoad
:
true
}
}
},
components
:
{
uniEcCanvas
},
methods
:
{
initChart
()
{
this
.
$nextTick
(()
=>
{
})
},
/**
* 柱状图数据处理
*/
dealSeriesData
(
data
)
{
const
categories
=
[],
series
=
[]
data
.
sort
((
a
,
b
)
=>
{
return
a
.
value
-
b
.
value
})
data
.
forEach
(
item
=>
{
categories
.
push
(
item
.
name
)
series
.
push
(
item
.
value
)
})
return
{
categories
,
series
}
}
}
}
</
script
>
<
style
>
</
style
>
components/ChinaMap/ChinaMap.vue
View file @
80bffbda
...
...
@@ -15,7 +15,7 @@
import
*
as
echarts
from
'@/components/uni-ec-canvas/echarts'
import
*
as
chinaJson
from
'@/components/uni-ec-canvas/china.json'
import
echartElementData
from
'@/mixins/echartElementData.js'
import
{
geoCoordMapList
}
from
'
./geoCoordMap
'
import
{
geoCoordMapList
}
from
'
@/components/uni-ec-canvas/geoCoordMap.js
'
let
chart
=
null
export
default
{
name
:
"ChinaMap"
,
...
...
components/
ChinaMap
/geoCoordMap.js
→
components/
uni-ec-canvas
/geoCoordMap.js
View file @
80bffbda
File moved
pages/index/index.vue
View file @
80bffbda
...
...
@@ -18,6 +18,8 @@
<NormalPie
v-if=
"element.type == 'NormalPie'"
:elementInfo=
"element"
></NormalPie>
<!-- 中国地图 -->
<ChinaMap
v-if=
"element.type == 'ChinaMap'"
:elementInfo=
"element"
></ChinaMap>
<!-- 柱状图混合地图 -->
<BarMixMap
v-if=
"element.type == 'BarMixMap'"
:elementInfo=
"element"
></BarMixMap>
<!-- 雷达图 -->
<NormalRadar
v-if=
"element.type == 'NormalRadar'"
:elementInfo=
"element"
></NormalRadar>
</view>
...
...
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