FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
iClient-JavaScript/examples/component/l_chart_vue.html at v12.0.0 · SuperMap/iClient-JavaScript · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
SuperMap
/
iClient-JavaScript
Public
Notifications
You must be signed in to change notification settings
Fork
288
Star
908
Code
Issues
5
Pull requests
14
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
iClient-JavaScript
/
examples
/
component
/
l_chart_vue.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
144 lines (137 loc) · 4.99 KB
Breadcrumbs
iClient-JavaScript
/
examples
/
component
/
l_chart_vue.html
Copy path
File metadata and controls
144 lines (137 loc) · 4.99 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!--********************************************************************
* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!--********************************************************************
* 该示例需要引入
* Echarts (https://github.com/apache/echarts)
* vue-echarts (https://github.com/ecomfe/vue-echarts)
*********************************************************************-->
<!DOCTYPE html
>
<
html
>
<
head
>
<
meta
charset
="
UTF-8
"
/>
<
title
data-i18n
="
resources.title_componentsChart_Vue
"
>
</
title
>
<
script
type
="
text/javascript
"
include
="
vue
"
src
="
../js/include-web.js
"
>
</
script
>
<
script
include
="
echarts-vue,iclient-leaflet-vue
"
src
="
../../dist/leaflet/include-leaflet.js
"
>
</
script
>
<
style
>
#
main
{
margin
:
0
auto;
width
:
100
%
;
height
:
100
%
;
}
.
sm-component-chart
{
z-index
:
500
;
}
.
sm-component-chart
.
sm-component-collapse-card__content
{
height
:
300
px
;
}
</
style
>
</
head
>
<
body
style
="
margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;
"
>
<
div
id
="
main
"
>
<
sm-web-map
server-url
='
https://iportal.supermap.io/iportal
'
map-id
="
801571284
"
>
</
sm-web-map
>
<
sm-chart
icon-class
=""
:style
="
chartStyle
"
:options
="
echartOptions
"
:dataset
="
dataset
"
:dataset-options
="
datasetOptions
"
background
="
rgba(255,255,255,0.5)
"
>
</
sm-chart
>
<
sm-chart
icon-class
=""
:style
="
chartStyle1
"
:options
="
echartOptions1
"
:dataset
="
dataset
"
:dataset-options
="
datasetOptions1
"
background
="
rgba(255,255,255,0.5)
"
>
</
sm-chart
>
<
sm-chart
icon-class
=""
:style
="
chartStyle2
"
:options
="
echartOptions2
"
:dataset
="
dataset
"
:dataset-options
="
datasetOptions2
"
background
="
rgba(255,255,255,0.5)
"
>
</
sm-chart
>
</
div
>
<
script
>
new
Vue
(
{
el
:
'#main'
,
data
(
)
{
return
{
chartStyle
:
{
position
:
"absolute"
,
bottom
:
"10px"
,
right
:
"10px"
}
,
chartStyle1
:
{
position
:
"absolute"
,
bottom
:
"10px"
,
right
:
"420px"
}
,
chartStyle2
:
{
position
:
"absolute"
,
bottom
:
"10px"
,
right
:
"830px"
}
,
dataset
:
new
SuperMap
.
Components
.
commontypes
.
iPortalDataParameter
(
{
url
:
"https://iportal.supermap.io/iportal/web/datas/676516522"
,
maxFeatures
:
20
}
)
,
// echarts中涉及到超图数据series和坐标轴的字段的配置
datasetOptions
:
[
{
seriesType
:
"bar"
,
//图表类型
isStastic
:
true
,
//是否统计, 默认不统计
isStack
:
true
,
//是否堆叠, 默认不堆叠
xField
:
"机场"
,
//x坐标轴数据字段
yField
:
"2016起降架次(架次)"
//统计的数据,legned默认名字
}
,
{
seriesType
:
"bar"
,
isStastic
:
true
,
isStack
:
true
,
xField
:
"机场"
,
yField
:
"2017起降架次(架次)"
,
}
]
,
datasetOptions1
:
[
{
seriesType
:
"line"
,
//图表类型
isStastic
:
true
,
//是否统计, 默认不统计
isStack
:
true
,
//是否堆叠, 默认不堆叠
xField
:
"机场"
,
//x坐标轴数据字段
yField
:
"2016旅客吞吐量(人次)"
//统计的数据,legned默认名字
}
,
{
seriesType
:
"line"
,
isStastic
:
true
,
isStack
:
true
,
xField
:
"机场"
,
yField
:
"2017旅客吞吐量(人次)"
}
]
,
datasetOptions2
:
[
{
seriesType
:
"scatter"
,
//图表类型
isStastic
:
true
,
//是否统计, 默认不统计
isStack
:
false
,
//是否堆叠, 默认不堆叠
xField
:
"机场"
,
//x坐标轴数据字段
yField
:
"同比增速%"
//统计的数据,legned默认名字
}
]
,
// 和echarts一样的配置
echartOptions
:
{
legend
:
{
data
:
[
'2016起降架次(架次)'
,
'2017起降架次(架次)'
]
}
,
//与yField数据一致
tooltip
:
{
formatter
:
"{b0}: {c0}"
}
,
grid
:
{
top
:
30
,
bottom
:
60
,
left
:
60
,
right
:
30
}
}
,
echartOptions1
:
{
legend
:
{
data
:
[
'2016旅客吞吐量(人次)'
,
'2017旅客吞吐量(人次)'
]
}
,
//与yField数据一致
tooltip
:
{
formatter
:
"{b0}: {c0}"
}
,
grid
:
{
top
:
30
,
bottom
:
60
,
left
:
60
,
right
:
30
}
}
,
echartOptions2
:
{
legend
:
{
data
:
[
'同比增速%'
]
}
,
//与yField数据一致
tooltip
:
{
formatter
:
"{b0}: {c0}"
}
,
}
}
;
}
}
)
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL