w-plot-vue 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/w-plot-vue.umd.js +7 -0
- package/dist/w-plot-vue.umd.js.map +1 -0
- package/docs/examples/app.html +1 -1
- package/docs/examples/app.umd.js +2 -2
- package/docs/examples/app.umd.js.map +1 -1
- package/docs/examples/w-bar_horizontal_multi-set(color).html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set(color, gradient).html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set(series color).html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set(series color, gradient).html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set.html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackNormal).html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackPercent).html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set__hide legned.html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set__show labels.html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor(gradient).html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor.html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set_barUseInnerLabelsForHorizontal_barGroupWidthRatio.html +496 -0
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio.html +10 -10
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio_barGroupWidthRatio.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set(color).html +10 -10
- package/docs/examples/w-bar_horizontal_one-set(color, gradient).html +10 -10
- package/docs/examples/w-bar_horizontal_one-set.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_barColor(gradient).html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_barColor.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_barKpColor(gradient).html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_barKpColor.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_barUseInnerLabelsForHorizontal.html +493 -0
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio_barGroupWidthRatio.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_hide labels.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_marginLeft_marginRight.html +10 -10
- package/docs/examples/w-bar_horizontal_one-set_show legned.html +10 -10
- package/docs/examples/w-bar_multi-set(color).html +10 -10
- package/docs/examples/w-bar_multi-set(color, gradient).html +10 -10
- package/docs/examples/w-bar_multi-set(series color).html +10 -10
- package/docs/examples/w-bar_multi-set(series color, gradient).html +10 -10
- package/docs/examples/w-bar_multi-set.html +10 -10
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal).html +10 -10
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal)_.html +10 -10
- package/docs/examples/w-bar_multi-set__barDisplay(stackPercent).html +10 -10
- package/docs/examples/w-bar_multi-set__hide legned.html +10 -10
- package/docs/examples/w-bar_multi-set__show labels.html +10 -10
- package/docs/examples/w-bar_multi-set_barKpColor(gradient).html +10 -10
- package/docs/examples/w-bar_multi-set_barKpColor.html +10 -10
- package/docs/examples/w-bar_multi-set_barWidthRatio.html +10 -10
- package/docs/examples/w-bar_multi-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +10 -10
- package/docs/examples/w-bar_one-set(color).html +10 -10
- package/docs/examples/w-bar_one-set(color, gradient).html +10 -10
- package/docs/examples/w-bar_one-set.html +10 -10
- package/docs/examples/w-bar_one-set_barColor(gradient).html +10 -10
- package/docs/examples/w-bar_one-set_barColor.html +10 -10
- package/docs/examples/w-bar_one-set_barKpColor(gradient).html +10 -10
- package/docs/examples/w-bar_one-set_barKpColor.html +10 -10
- package/docs/examples/w-bar_one-set_barWidthRatio.html +10 -10
- package/docs/examples/w-bar_one-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +10 -10
- package/docs/examples/w-bar_one-set_hide labels.html +10 -10
- package/docs/examples/w-bar_one-set_marginLeft_marginRight_marginTop.html +10 -10
- package/docs/examples/w-bar_one-set_show legned.html +10 -10
- package/docs/examples/w-pie_one-set(color).html +5 -5
- package/docs/examples/w-pie_one-set(color, gradient).html +5 -5
- package/docs/examples/w-pie_one-set.html +5 -5
- package/docs/examples/w-pie_one-set_hide labels.html +5 -5
- package/docs/examples/w-pie_one-set_hide legned.html +5 -5
- package/docs/examples/w-pie_one-set_marginLeft_marginRight_marginTop.html +5 -5
- package/docs/examples/w-pie_one-set_pieBorderRadius.html +5 -5
- package/docs/examples/w-pie_one-set_pieBorderWidth_pieBorderRadius.html +5 -5
- package/docs/examples/w-pie_one-set_pieKpColor(gradient).html +5 -5
- package/docs/examples/w-pie_one-set_pieKpColor.html +5 -5
- package/docs/examples/w-pie_one-set_pieThicknessRatio.html +5 -5
- package/docs/examples/w-plot_default.html +1 -1
- package/docs/examples/w-rose_multi-set(color).html +10 -10
- package/docs/examples/w-rose_multi-set(color, gradient).html +10 -10
- package/docs/examples/w-rose_multi-set(series color).html +10 -10
- package/docs/examples/w-rose_multi-set(series color, gradient).html +10 -10
- package/docs/examples/w-rose_multi-set.html +10 -10
- package/docs/examples/w-rose_multi-set__hide legned.html +10 -10
- package/docs/examples/w-rose_multi-set__show labels.html +10 -10
- package/docs/examples/w-rose_multi-set_roseBorderWidth.html +10 -10
- package/docs/examples/w-rose_multi-set_roseKpColor(gradient).html +10 -10
- package/docs/examples/w-rose_multi-set_roseKpColor.html +10 -10
- package/docs/examples/w-rose_multi-set_roseWidthRatio.html +10 -10
- package/docs/examples/w-rose_one-set(color).html +10 -10
- package/docs/examples/w-rose_one-set(color, gradient).html +10 -10
- package/docs/examples/w-rose_one-set.html +10 -10
- package/docs/examples/w-rose_one-set_marginLeft_marginRight_marginTop.html +10 -10
- package/docs/examples/w-rose_one-set_roseBorderWidth.html +10 -10
- package/docs/examples/w-rose_one-set_roseKpColor(gradient).html +10 -10
- package/docs/examples/w-rose_one-set_roseKpColor.html +10 -10
- package/docs/examples/w-rose_one-set_roseShowLabels.html +10 -10
- package/docs/examples/w-rose_one-set_roseWidthRatio.html +10 -10
- package/docs/examples/w-rose_one-set_showLegend.html +10 -10
- package/docs/examples/w-rose_one-set_showLegend_legendPosition.html +10 -10
- package/docs/examples/w-set-multi_default.html +221 -0
- package/docs/examples/w-set-multi_hide labels.html +222 -0
- package/docs/examples/w-set-multi_hide legned.html +222 -0
- package/docs/examples/w-set-multi_keySelect.html +226 -0
- package/docs/examples/w-set-multi_slot head.html +225 -0
- package/docs/examples/w-set-multi_textPlotType_kpSelectText_widthSelect.html +233 -0
- package/docs/examples/w-set-one_default.html +192 -0
- package/docs/examples/w-set-one_hide labels.html +193 -0
- package/docs/examples/w-set-one_keySelect.html +197 -0
- package/docs/examples/w-set-one_show legned.html +193 -0
- package/docs/examples/w-set-one_slot head.html +196 -0
- package/docs/examples/w-set-one_textPlotType_kpSelectText_widthSelect.html +201 -0
- package/docs/getDefAxis.mjs.html +5 -5
- package/docs/getDefChart.mjs.html +3 -3
- package/docs/getDefLegend.mjs.html +2 -2
- package/docs/getDefOpt.mjs.html +2 -2
- package/docs/global.html +2 -2
- package/docs/index.html +2 -2
- package/docs/module-WBar.html +2 -2
- package/docs/module-WPie.html +2 -2
- package/docs/module-WPlot.html +2 -2
- package/docs/module-WRose.html +2 -2
- package/docs/module-WSetMulti.html +216 -0
- package/docs/module-WSetOne.html +216 -0
- package/docs/setLegendLoc.mjs.html +2 -2
- package/package.json +1 -1
- package/src/App.vue +224 -20
- package/src/AppZoneWBar.vue +50 -9
- package/src/AppZoneWPie.vue +4 -4
- package/src/AppZoneWRose.vue +9 -9
- package/src/AppZoneWSetMulti.vue +225 -0
- package/src/AppZoneWSetOne.vue +193 -0
- package/src/components/WBar.vue +128 -18
- package/src/components/WPie.vue +21 -18
- package/src/components/{WGeoVue.vue → WPlotVue.vue} +8 -4
- package/src/components/WRose.vue +21 -18
- package/src/components/WSetMulti.vue +423 -0
- package/src/components/WSetOne.vue +57 -0
- package/src/js/genBarOpt.mjs +54 -7
- package/src/js/genPieOpt.mjs +1 -1
- package/src/js/genRoseOpt.mjs +1 -1
- package/src/js/getDefAxis.mjs +3 -3
- package/src/js/getDefChart.mjs +1 -1
- package/toolg/gDistRollupComps.mjs +1 -1
- package/toolg/gMergeComps.mjs +4 -4
- package/dist/w-geo-vue.umd.js +0 -7
- package/dist/w-geo-vue.umd.js.map +0 -1
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
|
|
8
|
+
/>
|
|
9
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
10
|
+
<title>w-plot-vue</title>
|
|
11
|
+
|
|
12
|
+
<!-- @babel/polyfill -->
|
|
13
|
+
<script
|
|
14
|
+
nomodule
|
|
15
|
+
src="https://cdn.jsdelivr.net/npm/@babel/polyfill/dist/polyfill.min.js"
|
|
16
|
+
></script>
|
|
17
|
+
|
|
18
|
+
<!-- vue -->
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
|
|
20
|
+
|
|
21
|
+
<!-- extractHtml已自動添加@babel/polyfill與vue -->
|
|
22
|
+
|
|
23
|
+
<!-- fontawesome -->
|
|
24
|
+
<link
|
|
25
|
+
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- mdi, 各組件使用mdi/js會於轉單頁時改為mdi icon, 故需引用mdi/css -->
|
|
30
|
+
<link
|
|
31
|
+
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.2.96/css/materialdesignicons.min.css"
|
|
32
|
+
rel="stylesheet"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<!-- google, 各組件使用mdi/js故不需引用 -->
|
|
36
|
+
<link
|
|
37
|
+
_href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
<link
|
|
41
|
+
_href="https://fonts.googleapis.com/css?family=Material+Icons"
|
|
42
|
+
rel="stylesheet"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<!-- data -->
|
|
46
|
+
<script
|
|
47
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataAAPL.js"
|
|
48
|
+
></script>
|
|
49
|
+
<script
|
|
50
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataUSD2EUR.js"
|
|
51
|
+
></script>
|
|
52
|
+
<script
|
|
53
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataTemperature.js"
|
|
54
|
+
></script>
|
|
55
|
+
<script
|
|
56
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataHousePriceArea.js"
|
|
57
|
+
></script>
|
|
58
|
+
<script
|
|
59
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataFlare.js"
|
|
60
|
+
></script>
|
|
61
|
+
<script
|
|
62
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRain.js"
|
|
63
|
+
></script>
|
|
64
|
+
<script
|
|
65
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRainClip.js"
|
|
66
|
+
></script>
|
|
67
|
+
|
|
68
|
+
<!-- w-plot-vue -->
|
|
69
|
+
<script src="https://cdn.jsdelivr.net/npm/w-plot-vue@1.0.2/dist/w-plot-vue.umd.js"></script>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.v-application--wrap {
|
|
73
|
+
/* width與max-width fix for IE11, 其外不能使用padding或margin避免失效 */
|
|
74
|
+
width: 100vw;
|
|
75
|
+
max-width: 100vw;
|
|
76
|
+
font-family: inherit;
|
|
77
|
+
background: #fff;
|
|
78
|
+
}
|
|
79
|
+
.item {
|
|
80
|
+
/* 因item位於demolink, 提取各範例html後會刪除demolink, 故得額外補上 */
|
|
81
|
+
border-left: 3px solid #ffba75;
|
|
82
|
+
margin: 5px 5px 8px 0px;
|
|
83
|
+
padding: 3px 3px 5px 10px;
|
|
84
|
+
font-size: 0.9rem;
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: flex-start;
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
.head1 {
|
|
90
|
+
margin: 0px;
|
|
91
|
+
padding: 0px 0px 20px 0px;
|
|
92
|
+
font-size: 2.5rem;
|
|
93
|
+
}
|
|
94
|
+
.bk {
|
|
95
|
+
vertical-align: top;
|
|
96
|
+
padding: 10px 0px 60px 0px;
|
|
97
|
+
}
|
|
98
|
+
@media screen and (min-width: 1000px) {
|
|
99
|
+
/* 寬版 */
|
|
100
|
+
.bk {
|
|
101
|
+
display: inline-block;
|
|
102
|
+
margin: 0px 80px 0px 0px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
106
|
+
</head>
|
|
107
|
+
<body
|
|
108
|
+
style="font-family:'Microsoft JhengHei','Avenir','Helvetica'; padding:0px; margin:0px;"
|
|
109
|
+
>
|
|
110
|
+
<v-app id="app" style="font-family:inherit; padding:0px 30px;">
|
|
111
|
+
<div class="head1">
|
|
112
|
+
<span
|
|
113
|
+
style="cursor:pointer;"
|
|
114
|
+
title="open for copy link to view component"
|
|
115
|
+
onclick="window.open('//yuda-lyu.github.io/w-plot-vue/examples/app.html?cmp='+this.innerText,'_blank')"
|
|
116
|
+
>w-set-multi</span>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="bk">
|
|
119
|
+
<div class="item">hide legned</div>
|
|
120
|
+
|
|
121
|
+
<w-set-multi
|
|
122
|
+
:opt="{
|
|
123
|
+
...WSetMulti.opt2e,
|
|
124
|
+
showLegend:false,
|
|
125
|
+
}"
|
|
126
|
+
></w-set-multi>
|
|
127
|
+
</div>
|
|
128
|
+
</v-app>
|
|
129
|
+
|
|
130
|
+
<script>
|
|
131
|
+
//install
|
|
132
|
+
Vue.use(window["w-plot-vue"]);
|
|
133
|
+
|
|
134
|
+
//initialize
|
|
135
|
+
new Vue({
|
|
136
|
+
el: "#app",
|
|
137
|
+
|
|
138
|
+
data: function() {
|
|
139
|
+
let keys = ["USA", "China", "Brazil", "EU", "India", "Russia"];
|
|
140
|
+
let rds2e = [
|
|
141
|
+
{
|
|
142
|
+
name: "Corn",
|
|
143
|
+
data: {
|
|
144
|
+
USA: {
|
|
145
|
+
value: 406.292,
|
|
146
|
+
color: ["rgb(255, 205, 210)", "rgb(229, 115, 115)"]
|
|
147
|
+
},
|
|
148
|
+
China: {
|
|
149
|
+
value: 260.0,
|
|
150
|
+
color: ["rgb(255, 185, 210)", "rgb(229, 95, 115)"]
|
|
151
|
+
},
|
|
152
|
+
Brazil: {
|
|
153
|
+
value: 107.0,
|
|
154
|
+
color: ["rgb(255, 165, 210)", "rgb(229, 75, 115)"]
|
|
155
|
+
},
|
|
156
|
+
EU: {
|
|
157
|
+
value: 68.3,
|
|
158
|
+
color: ["rgb(255, 145, 210)", "rgb(229, 55, 115)"]
|
|
159
|
+
},
|
|
160
|
+
India: {
|
|
161
|
+
value: 27.5,
|
|
162
|
+
color: ["rgb(255, 125, 210)", "rgb(229, 35, 115)"]
|
|
163
|
+
},
|
|
164
|
+
Russia: {
|
|
165
|
+
value: 14.5,
|
|
166
|
+
color: ["rgb(255, 105, 210)", "rgb(229, 15, 115)"]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "Wheat",
|
|
172
|
+
data: {
|
|
173
|
+
USA: {
|
|
174
|
+
value: 51.086,
|
|
175
|
+
color: ["rgb(210, 205, 255)", "rgb(115, 115, 229)"]
|
|
176
|
+
},
|
|
177
|
+
China: {
|
|
178
|
+
value: 136.0,
|
|
179
|
+
color: ["rgb(210, 185, 255)", "rgb(115, 95, 229)"]
|
|
180
|
+
},
|
|
181
|
+
Brazil: {
|
|
182
|
+
value: 5.5,
|
|
183
|
+
color: ["rgb(210, 165, 255)", "rgb(115, 75, 229)"]
|
|
184
|
+
},
|
|
185
|
+
EU: {
|
|
186
|
+
value: 141.0,
|
|
187
|
+
color: ["rgb(210, 145, 255)", "rgb(115, 55, 229)"]
|
|
188
|
+
},
|
|
189
|
+
India: {
|
|
190
|
+
value: 107.18,
|
|
191
|
+
color: ["rgb(210, 125, 255)", "rgb(115, 35, 229)"]
|
|
192
|
+
},
|
|
193
|
+
Russia: {
|
|
194
|
+
value: 77.0,
|
|
195
|
+
color: ["rgb(210, 105, 255)", "rgb(115, 15, 229)"]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
];
|
|
200
|
+
return {
|
|
201
|
+
WSetMulti: {
|
|
202
|
+
keySelect: "bar-v-normal",
|
|
203
|
+
opt2e: {
|
|
204
|
+
width: 400,
|
|
205
|
+
height: 400,
|
|
206
|
+
keys,
|
|
207
|
+
rds: rds2e,
|
|
208
|
+
xTitle: "Countries",
|
|
209
|
+
yTitle: "Weight (MT)"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
mounted: function() {
|
|
215
|
+
return {};
|
|
216
|
+
},
|
|
217
|
+
computed: {},
|
|
218
|
+
methods: {}
|
|
219
|
+
});
|
|
220
|
+
</script>
|
|
221
|
+
</body>
|
|
222
|
+
</html>
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
|
|
8
|
+
/>
|
|
9
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
10
|
+
<title>w-plot-vue</title>
|
|
11
|
+
|
|
12
|
+
<!-- @babel/polyfill -->
|
|
13
|
+
<script
|
|
14
|
+
nomodule
|
|
15
|
+
src="https://cdn.jsdelivr.net/npm/@babel/polyfill/dist/polyfill.min.js"
|
|
16
|
+
></script>
|
|
17
|
+
|
|
18
|
+
<!-- vue -->
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
|
|
20
|
+
|
|
21
|
+
<!-- extractHtml已自動添加@babel/polyfill與vue -->
|
|
22
|
+
|
|
23
|
+
<!-- fontawesome -->
|
|
24
|
+
<link
|
|
25
|
+
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- mdi, 各組件使用mdi/js會於轉單頁時改為mdi icon, 故需引用mdi/css -->
|
|
30
|
+
<link
|
|
31
|
+
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.2.96/css/materialdesignicons.min.css"
|
|
32
|
+
rel="stylesheet"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<!-- google, 各組件使用mdi/js故不需引用 -->
|
|
36
|
+
<link
|
|
37
|
+
_href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
<link
|
|
41
|
+
_href="https://fonts.googleapis.com/css?family=Material+Icons"
|
|
42
|
+
rel="stylesheet"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<!-- data -->
|
|
46
|
+
<script
|
|
47
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataAAPL.js"
|
|
48
|
+
></script>
|
|
49
|
+
<script
|
|
50
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataUSD2EUR.js"
|
|
51
|
+
></script>
|
|
52
|
+
<script
|
|
53
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataTemperature.js"
|
|
54
|
+
></script>
|
|
55
|
+
<script
|
|
56
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataHousePriceArea.js"
|
|
57
|
+
></script>
|
|
58
|
+
<script
|
|
59
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataFlare.js"
|
|
60
|
+
></script>
|
|
61
|
+
<script
|
|
62
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRain.js"
|
|
63
|
+
></script>
|
|
64
|
+
<script
|
|
65
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRainClip.js"
|
|
66
|
+
></script>
|
|
67
|
+
|
|
68
|
+
<!-- w-plot-vue -->
|
|
69
|
+
<script src="https://cdn.jsdelivr.net/npm/w-plot-vue@1.0.2/dist/w-plot-vue.umd.js"></script>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.v-application--wrap {
|
|
73
|
+
/* width與max-width fix for IE11, 其外不能使用padding或margin避免失效 */
|
|
74
|
+
width: 100vw;
|
|
75
|
+
max-width: 100vw;
|
|
76
|
+
font-family: inherit;
|
|
77
|
+
background: #fff;
|
|
78
|
+
}
|
|
79
|
+
.item {
|
|
80
|
+
/* 因item位於demolink, 提取各範例html後會刪除demolink, 故得額外補上 */
|
|
81
|
+
border-left: 3px solid #ffba75;
|
|
82
|
+
margin: 5px 5px 8px 0px;
|
|
83
|
+
padding: 3px 3px 5px 10px;
|
|
84
|
+
font-size: 0.9rem;
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: flex-start;
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
.head1 {
|
|
90
|
+
margin: 0px;
|
|
91
|
+
padding: 0px 0px 20px 0px;
|
|
92
|
+
font-size: 2.5rem;
|
|
93
|
+
}
|
|
94
|
+
.bk {
|
|
95
|
+
vertical-align: top;
|
|
96
|
+
padding: 10px 0px 60px 0px;
|
|
97
|
+
}
|
|
98
|
+
@media screen and (min-width: 1000px) {
|
|
99
|
+
/* 寬版 */
|
|
100
|
+
.bk {
|
|
101
|
+
display: inline-block;
|
|
102
|
+
margin: 0px 80px 0px 0px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
106
|
+
</head>
|
|
107
|
+
<body
|
|
108
|
+
style="font-family:'Microsoft JhengHei','Avenir','Helvetica'; padding:0px; margin:0px;"
|
|
109
|
+
>
|
|
110
|
+
<v-app id="app" style="font-family:inherit; padding:0px 30px;">
|
|
111
|
+
<div class="head1">
|
|
112
|
+
<span
|
|
113
|
+
style="cursor:pointer;"
|
|
114
|
+
title="open for copy link to view component"
|
|
115
|
+
onclick="window.open('//yuda-lyu.github.io/w-plot-vue/examples/app.html?cmp='+this.innerText,'_blank')"
|
|
116
|
+
>w-set-multi</span>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="bk">
|
|
119
|
+
<div class="item">keySelect</div>
|
|
120
|
+
|
|
121
|
+
<div
|
|
122
|
+
style="padding-bottom:5px; font-size:0.8rem;"
|
|
123
|
+
>keySelect: {{WSetMulti.keySelect}}</div>
|
|
124
|
+
|
|
125
|
+
<w-set-multi
|
|
126
|
+
:opt="{
|
|
127
|
+
...WSetMulti.opt2e,
|
|
128
|
+
}"
|
|
129
|
+
:key-select.sync="WSetMulti.keySelect"
|
|
130
|
+
></w-set-multi>
|
|
131
|
+
</div>
|
|
132
|
+
</v-app>
|
|
133
|
+
|
|
134
|
+
<script>
|
|
135
|
+
//install
|
|
136
|
+
Vue.use(window["w-plot-vue"]);
|
|
137
|
+
|
|
138
|
+
//initialize
|
|
139
|
+
new Vue({
|
|
140
|
+
el: "#app",
|
|
141
|
+
|
|
142
|
+
data: function() {
|
|
143
|
+
let keys = ["USA", "China", "Brazil", "EU", "India", "Russia"];
|
|
144
|
+
let rds2e = [
|
|
145
|
+
{
|
|
146
|
+
name: "Corn",
|
|
147
|
+
data: {
|
|
148
|
+
USA: {
|
|
149
|
+
value: 406.292,
|
|
150
|
+
color: ["rgb(255, 205, 210)", "rgb(229, 115, 115)"]
|
|
151
|
+
},
|
|
152
|
+
China: {
|
|
153
|
+
value: 260.0,
|
|
154
|
+
color: ["rgb(255, 185, 210)", "rgb(229, 95, 115)"]
|
|
155
|
+
},
|
|
156
|
+
Brazil: {
|
|
157
|
+
value: 107.0,
|
|
158
|
+
color: ["rgb(255, 165, 210)", "rgb(229, 75, 115)"]
|
|
159
|
+
},
|
|
160
|
+
EU: {
|
|
161
|
+
value: 68.3,
|
|
162
|
+
color: ["rgb(255, 145, 210)", "rgb(229, 55, 115)"]
|
|
163
|
+
},
|
|
164
|
+
India: {
|
|
165
|
+
value: 27.5,
|
|
166
|
+
color: ["rgb(255, 125, 210)", "rgb(229, 35, 115)"]
|
|
167
|
+
},
|
|
168
|
+
Russia: {
|
|
169
|
+
value: 14.5,
|
|
170
|
+
color: ["rgb(255, 105, 210)", "rgb(229, 15, 115)"]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "Wheat",
|
|
176
|
+
data: {
|
|
177
|
+
USA: {
|
|
178
|
+
value: 51.086,
|
|
179
|
+
color: ["rgb(210, 205, 255)", "rgb(115, 115, 229)"]
|
|
180
|
+
},
|
|
181
|
+
China: {
|
|
182
|
+
value: 136.0,
|
|
183
|
+
color: ["rgb(210, 185, 255)", "rgb(115, 95, 229)"]
|
|
184
|
+
},
|
|
185
|
+
Brazil: {
|
|
186
|
+
value: 5.5,
|
|
187
|
+
color: ["rgb(210, 165, 255)", "rgb(115, 75, 229)"]
|
|
188
|
+
},
|
|
189
|
+
EU: {
|
|
190
|
+
value: 141.0,
|
|
191
|
+
color: ["rgb(210, 145, 255)", "rgb(115, 55, 229)"]
|
|
192
|
+
},
|
|
193
|
+
India: {
|
|
194
|
+
value: 107.18,
|
|
195
|
+
color: ["rgb(210, 125, 255)", "rgb(115, 35, 229)"]
|
|
196
|
+
},
|
|
197
|
+
Russia: {
|
|
198
|
+
value: 77.0,
|
|
199
|
+
color: ["rgb(210, 105, 255)", "rgb(115, 15, 229)"]
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
];
|
|
204
|
+
return {
|
|
205
|
+
WSetMulti: {
|
|
206
|
+
keySelect: "bar-v-normal",
|
|
207
|
+
opt2e: {
|
|
208
|
+
width: 400,
|
|
209
|
+
height: 400,
|
|
210
|
+
keys,
|
|
211
|
+
rds: rds2e,
|
|
212
|
+
xTitle: "Countries",
|
|
213
|
+
yTitle: "Weight (MT)"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
mounted: function() {
|
|
219
|
+
return {};
|
|
220
|
+
},
|
|
221
|
+
computed: {},
|
|
222
|
+
methods: {}
|
|
223
|
+
});
|
|
224
|
+
</script>
|
|
225
|
+
</body>
|
|
226
|
+
</html>
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
|
|
8
|
+
/>
|
|
9
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
10
|
+
<title>w-plot-vue</title>
|
|
11
|
+
|
|
12
|
+
<!-- @babel/polyfill -->
|
|
13
|
+
<script
|
|
14
|
+
nomodule
|
|
15
|
+
src="https://cdn.jsdelivr.net/npm/@babel/polyfill/dist/polyfill.min.js"
|
|
16
|
+
></script>
|
|
17
|
+
|
|
18
|
+
<!-- vue -->
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
|
|
20
|
+
|
|
21
|
+
<!-- extractHtml已自動添加@babel/polyfill與vue -->
|
|
22
|
+
|
|
23
|
+
<!-- fontawesome -->
|
|
24
|
+
<link
|
|
25
|
+
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- mdi, 各組件使用mdi/js會於轉單頁時改為mdi icon, 故需引用mdi/css -->
|
|
30
|
+
<link
|
|
31
|
+
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.2.96/css/materialdesignicons.min.css"
|
|
32
|
+
rel="stylesheet"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<!-- google, 各組件使用mdi/js故不需引用 -->
|
|
36
|
+
<link
|
|
37
|
+
_href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
<link
|
|
41
|
+
_href="https://fonts.googleapis.com/css?family=Material+Icons"
|
|
42
|
+
rel="stylesheet"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<!-- data -->
|
|
46
|
+
<script
|
|
47
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataAAPL.js"
|
|
48
|
+
></script>
|
|
49
|
+
<script
|
|
50
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataUSD2EUR.js"
|
|
51
|
+
></script>
|
|
52
|
+
<script
|
|
53
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataTemperature.js"
|
|
54
|
+
></script>
|
|
55
|
+
<script
|
|
56
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataHousePriceArea.js"
|
|
57
|
+
></script>
|
|
58
|
+
<script
|
|
59
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataFlare.js"
|
|
60
|
+
></script>
|
|
61
|
+
<script
|
|
62
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRain.js"
|
|
63
|
+
></script>
|
|
64
|
+
<script
|
|
65
|
+
src="https://cdn.jsdelivr.net/npm/w-demores@1.0.23/res/data/dataRainClip.js"
|
|
66
|
+
></script>
|
|
67
|
+
|
|
68
|
+
<!-- w-plot-vue -->
|
|
69
|
+
<script src="https://cdn.jsdelivr.net/npm/w-plot-vue@1.0.2/dist/w-plot-vue.umd.js"></script>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.v-application--wrap {
|
|
73
|
+
/* width與max-width fix for IE11, 其外不能使用padding或margin避免失效 */
|
|
74
|
+
width: 100vw;
|
|
75
|
+
max-width: 100vw;
|
|
76
|
+
font-family: inherit;
|
|
77
|
+
background: #fff;
|
|
78
|
+
}
|
|
79
|
+
.item {
|
|
80
|
+
/* 因item位於demolink, 提取各範例html後會刪除demolink, 故得額外補上 */
|
|
81
|
+
border-left: 3px solid #ffba75;
|
|
82
|
+
margin: 5px 5px 8px 0px;
|
|
83
|
+
padding: 3px 3px 5px 10px;
|
|
84
|
+
font-size: 0.9rem;
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: flex-start;
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
.head1 {
|
|
90
|
+
margin: 0px;
|
|
91
|
+
padding: 0px 0px 20px 0px;
|
|
92
|
+
font-size: 2.5rem;
|
|
93
|
+
}
|
|
94
|
+
.bk {
|
|
95
|
+
vertical-align: top;
|
|
96
|
+
padding: 10px 0px 60px 0px;
|
|
97
|
+
}
|
|
98
|
+
@media screen and (min-width: 1000px) {
|
|
99
|
+
/* 寬版 */
|
|
100
|
+
.bk {
|
|
101
|
+
display: inline-block;
|
|
102
|
+
margin: 0px 80px 0px 0px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
106
|
+
</head>
|
|
107
|
+
<body
|
|
108
|
+
style="font-family:'Microsoft JhengHei','Avenir','Helvetica'; padding:0px; margin:0px;"
|
|
109
|
+
>
|
|
110
|
+
<v-app id="app" style="font-family:inherit; padding:0px 30px;">
|
|
111
|
+
<div class="head1">
|
|
112
|
+
<span
|
|
113
|
+
style="cursor:pointer;"
|
|
114
|
+
title="open for copy link to view component"
|
|
115
|
+
onclick="window.open('//yuda-lyu.github.io/w-plot-vue/examples/app.html?cmp='+this.innerText,'_blank')"
|
|
116
|
+
>w-set-multi</span>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="bk">
|
|
119
|
+
<div class="item">slot head</div>
|
|
120
|
+
|
|
121
|
+
<w-set-multi
|
|
122
|
+
:opt="{
|
|
123
|
+
...WSetMulti.opt2e,
|
|
124
|
+
}"
|
|
125
|
+
>
|
|
126
|
+
<template v-slot:head>
|
|
127
|
+
<div style="padding-right:8px; font-size:1.3rem;">🌿</div>
|
|
128
|
+
</template>
|
|
129
|
+
</w-set-multi>
|
|
130
|
+
</div>
|
|
131
|
+
</v-app>
|
|
132
|
+
|
|
133
|
+
<script>
|
|
134
|
+
//install
|
|
135
|
+
Vue.use(window["w-plot-vue"]);
|
|
136
|
+
|
|
137
|
+
//initialize
|
|
138
|
+
new Vue({
|
|
139
|
+
el: "#app",
|
|
140
|
+
|
|
141
|
+
data: function() {
|
|
142
|
+
let keys = ["USA", "China", "Brazil", "EU", "India", "Russia"];
|
|
143
|
+
let rds2e = [
|
|
144
|
+
{
|
|
145
|
+
name: "Corn",
|
|
146
|
+
data: {
|
|
147
|
+
USA: {
|
|
148
|
+
value: 406.292,
|
|
149
|
+
color: ["rgb(255, 205, 210)", "rgb(229, 115, 115)"]
|
|
150
|
+
},
|
|
151
|
+
China: {
|
|
152
|
+
value: 260.0,
|
|
153
|
+
color: ["rgb(255, 185, 210)", "rgb(229, 95, 115)"]
|
|
154
|
+
},
|
|
155
|
+
Brazil: {
|
|
156
|
+
value: 107.0,
|
|
157
|
+
color: ["rgb(255, 165, 210)", "rgb(229, 75, 115)"]
|
|
158
|
+
},
|
|
159
|
+
EU: {
|
|
160
|
+
value: 68.3,
|
|
161
|
+
color: ["rgb(255, 145, 210)", "rgb(229, 55, 115)"]
|
|
162
|
+
},
|
|
163
|
+
India: {
|
|
164
|
+
value: 27.5,
|
|
165
|
+
color: ["rgb(255, 125, 210)", "rgb(229, 35, 115)"]
|
|
166
|
+
},
|
|
167
|
+
Russia: {
|
|
168
|
+
value: 14.5,
|
|
169
|
+
color: ["rgb(255, 105, 210)", "rgb(229, 15, 115)"]
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: "Wheat",
|
|
175
|
+
data: {
|
|
176
|
+
USA: {
|
|
177
|
+
value: 51.086,
|
|
178
|
+
color: ["rgb(210, 205, 255)", "rgb(115, 115, 229)"]
|
|
179
|
+
},
|
|
180
|
+
China: {
|
|
181
|
+
value: 136.0,
|
|
182
|
+
color: ["rgb(210, 185, 255)", "rgb(115, 95, 229)"]
|
|
183
|
+
},
|
|
184
|
+
Brazil: {
|
|
185
|
+
value: 5.5,
|
|
186
|
+
color: ["rgb(210, 165, 255)", "rgb(115, 75, 229)"]
|
|
187
|
+
},
|
|
188
|
+
EU: {
|
|
189
|
+
value: 141.0,
|
|
190
|
+
color: ["rgb(210, 145, 255)", "rgb(115, 55, 229)"]
|
|
191
|
+
},
|
|
192
|
+
India: {
|
|
193
|
+
value: 107.18,
|
|
194
|
+
color: ["rgb(210, 125, 255)", "rgb(115, 35, 229)"]
|
|
195
|
+
},
|
|
196
|
+
Russia: {
|
|
197
|
+
value: 77.0,
|
|
198
|
+
color: ["rgb(210, 105, 255)", "rgb(115, 15, 229)"]
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
];
|
|
203
|
+
return {
|
|
204
|
+
WSetMulti: {
|
|
205
|
+
keySelect: "bar-v-normal",
|
|
206
|
+
opt2e: {
|
|
207
|
+
width: 400,
|
|
208
|
+
height: 400,
|
|
209
|
+
keys,
|
|
210
|
+
rds: rds2e,
|
|
211
|
+
xTitle: "Countries",
|
|
212
|
+
yTitle: "Weight (MT)"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
},
|
|
217
|
+
mounted: function() {
|
|
218
|
+
return {};
|
|
219
|
+
},
|
|
220
|
+
computed: {},
|
|
221
|
+
methods: {}
|
|
222
|
+
});
|
|
223
|
+
</script>
|
|
224
|
+
</body>
|
|
225
|
+
</html>
|