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,216 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>WSetOne - Documentation</title>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<script src="scripts/prettify/prettify.js"></script>
|
|
10
|
+
<script src="scripts/prettify/lang-css.js"></script>
|
|
11
|
+
<!--[if lt IE 9]>
|
|
12
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
13
|
+
<![endif]-->
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
15
|
+
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
16
|
+
<script src="scripts/nav.js" defer></script>
|
|
17
|
+
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
|
|
22
|
+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
|
23
|
+
<label for="nav-trigger" class="navicon-button x">
|
|
24
|
+
<div class="navicon"></div>
|
|
25
|
+
</label>
|
|
26
|
+
|
|
27
|
+
<label for="nav-trigger" class="overlay"></label>
|
|
28
|
+
|
|
29
|
+
<nav >
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-WBar.html">WBar</a></li><li><a href="module-WPie.html">WPie</a></li><li><a href="module-WPlot.html">WPlot</a></li><li><a href="module-WRose.html">WRose</a></li><li><a href="module-WSetMulti.html">WSetMulti</a></li><li><a href="module-WSetOne.html">WSetOne</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getDefAxis">getDefAxis</a></li><li><a href="global.html#getDefChart">getDefChart</a></li><li><a href="global.html#getDefLegend">getDefLegend</a></li><li><a href="global.html#getDefOpt">getDefOpt</a></li><li><a href="global.html#setLegendLoc">setLegendLoc</a></li></ul>
|
|
33
|
+
|
|
34
|
+
</nav>
|
|
35
|
+
|
|
36
|
+
<div id="main">
|
|
37
|
+
|
|
38
|
+
<h1 class="page-title">WSetOne</h1>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<section>
|
|
47
|
+
|
|
48
|
+
<header>
|
|
49
|
+
|
|
50
|
+
</header>
|
|
51
|
+
|
|
52
|
+
<article>
|
|
53
|
+
|
|
54
|
+
<div class="container-overview">
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
<dl class="details">
|
|
59
|
+
|
|
60
|
+
<dt class="tag-description">Description:</dt>
|
|
61
|
+
<dd class="tag-description"><ul class="dummy"><li></p></div></div>
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
<h3 class="subsection-title" style="margin-top: 1em" data-jsdoc-vuejs="section-props">Props</h3>
|
|
65
|
+
<table data-jsdoc-vuejs="table-props">
|
|
66
|
+
<thead>
|
|
67
|
+
<tr>
|
|
68
|
+
<th>Name</th>
|
|
69
|
+
<th>Type</th>
|
|
70
|
+
<th>Default value</th>
|
|
71
|
+
<th>Required?</th>
|
|
72
|
+
<th>Description</th>
|
|
73
|
+
</tr>
|
|
74
|
+
</thead>
|
|
75
|
+
<tbody><tr>
|
|
76
|
+
<td><code>opt</code></td>
|
|
77
|
+
<td>Object</td>
|
|
78
|
+
<td><code>{}</code></td>
|
|
79
|
+
<td>No</td>
|
|
80
|
+
<td>輸入設定物件,預設{}</td>
|
|
81
|
+
</tr></tbody>
|
|
82
|
+
</table>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<div class="container-overview"><div><p>
|
|
93
|
+
</li></ul></dd>
|
|
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
|
+
</dl>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
<div class="description usertext"></p></div></div>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
<h3 class="subsection-title" style="margin-top: 1em" data-jsdoc-vuejs="section-props">Props</h3>
|
|
137
|
+
<table data-jsdoc-vuejs="table-props">
|
|
138
|
+
<thead>
|
|
139
|
+
<tr>
|
|
140
|
+
<th>Name</th>
|
|
141
|
+
<th>Type</th>
|
|
142
|
+
<th>Default value</th>
|
|
143
|
+
<th>Required?</th>
|
|
144
|
+
<th>Description</th>
|
|
145
|
+
</tr>
|
|
146
|
+
</thead>
|
|
147
|
+
<tbody><tr>
|
|
148
|
+
<td><code>opt</code></td>
|
|
149
|
+
<td>Object</td>
|
|
150
|
+
<td><code>{}</code></td>
|
|
151
|
+
<td>No</td>
|
|
152
|
+
<td>輸入設定物件,預設{}</td>
|
|
153
|
+
</tr></tbody>
|
|
154
|
+
</table>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<div class="container-overview"><div><p>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
</article>
|
|
193
|
+
|
|
194
|
+
</section>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<br class="clear">
|
|
204
|
+
|
|
205
|
+
<footer>
|
|
206
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Dec 14 2023 23:32:41 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
207
|
+
</footer>
|
|
208
|
+
|
|
209
|
+
<script>prettyPrint();</script>
|
|
210
|
+
<script src="scripts/polyfill.js"></script>
|
|
211
|
+
<script src="scripts/linenumber.js"></script>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</body>
|
|
216
|
+
</html>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-WBar.html">WBar</a></li><li><a href="module-WPie.html">WPie</a></li><li><a href="module-WPlot.html">WPlot</a></li><li><a href="module-WRose.html">WRose</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getDefAxis">getDefAxis</a></li><li><a href="global.html#getDefChart">getDefChart</a></li><li><a href="global.html#getDefLegend">getDefLegend</a></li><li><a href="global.html#getDefOpt">getDefOpt</a></li><li><a href="global.html#setLegendLoc">setLegendLoc</a></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-WBar.html">WBar</a></li><li><a href="module-WPie.html">WPie</a></li><li><a href="module-WPlot.html">WPlot</a></li><li><a href="module-WRose.html">WRose</a></li><li><a href="module-WSetMulti.html">WSetMulti</a></li><li><a href="module-WSetOne.html">WSetOne</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getDefAxis">getDefAxis</a></li><li><a href="global.html#getDefChart">getDefChart</a></li><li><a href="global.html#getDefLegend">getDefLegend</a></li><li><a href="global.html#getDefOpt">getDefOpt</a></li><li><a href="global.html#setLegendLoc">setLegendLoc</a></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -163,7 +163,7 @@ export default setLegendLoc
|
|
|
163
163
|
<br class="clear">
|
|
164
164
|
|
|
165
165
|
<footer>
|
|
166
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on
|
|
166
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Dec 14 2023 23:32:41 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
167
167
|
</footer>
|
|
168
168
|
|
|
169
169
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
style=""
|
|
4
|
+
:changeMenus="changeMenus"
|
|
5
|
+
>
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
<template v-if="!isNarrow">
|
|
@@ -10,21 +13,61 @@
|
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
<div style="background:#f5f5f5;">
|
|
13
|
-
|
|
16
|
+
|
|
17
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL1">
|
|
18
|
+
<WListHorizontal
|
|
19
|
+
:items="cmpsL1"
|
|
20
|
+
:itemActive.sync="cmpP1"
|
|
21
|
+
:itemBackgroundColor="'transparent'"
|
|
22
|
+
:itemBackgroundColorHover="'transparent'"
|
|
23
|
+
:itemBackgroundColorActive="'transparent'"
|
|
24
|
+
:keyText="'name'"
|
|
25
|
+
@update:itemActive="(v)=>{indP2=0;indP1=getInd(v,cmpsL1)}"
|
|
26
|
+
>
|
|
27
|
+
<template v-slot:item="props">
|
|
28
|
+
<div style="">
|
|
29
|
+
{{kebabCase(props.item.name)}}
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
</WListHorizontal>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL2">
|
|
14
36
|
<WListHorizontal
|
|
15
|
-
:items="
|
|
16
|
-
:itemActive.sync="
|
|
37
|
+
:items="cmpsL2"
|
|
38
|
+
:itemActive.sync="cmpP2"
|
|
17
39
|
:itemBackgroundColor="'transparent'"
|
|
18
40
|
:itemBackgroundColorHover="'transparent'"
|
|
19
41
|
:itemBackgroundColorActive="'transparent'"
|
|
42
|
+
:keyText="'name'"
|
|
43
|
+
@update:itemActive="(v)=>{indP2=getInd(v,cmpsL2)}"
|
|
20
44
|
>
|
|
21
45
|
<template v-slot:item="props">
|
|
22
|
-
<div style="
|
|
23
|
-
{{kebabCase(props.item)}}
|
|
46
|
+
<div style="">
|
|
47
|
+
{{kebabCase(props.item.name)}}
|
|
24
48
|
</div>
|
|
25
49
|
</template>
|
|
26
50
|
</WListHorizontal>
|
|
27
51
|
</div>
|
|
52
|
+
|
|
53
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL3">
|
|
54
|
+
<WListHorizontal
|
|
55
|
+
:items="cmpsL3"
|
|
56
|
+
:itemActive.sync="cmpP3"
|
|
57
|
+
:itemBackgroundColor="'transparent'"
|
|
58
|
+
:itemBackgroundColorHover="'transparent'"
|
|
59
|
+
:itemBackgroundColorActive="'transparent'"
|
|
60
|
+
:keyText="'name'"
|
|
61
|
+
@update:itemActive="(v)=>{indP3=getInd(v,cmpsL3)}"
|
|
62
|
+
>
|
|
63
|
+
<template v-slot:item="props">
|
|
64
|
+
<div style="">
|
|
65
|
+
{{kebabCase(props.item.name)}}
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
</WListHorizontal>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
28
71
|
</div>
|
|
29
72
|
|
|
30
73
|
|
|
@@ -38,6 +81,10 @@
|
|
|
38
81
|
|
|
39
82
|
<AppZoneWRose v-if="cmpPick==='WRose'"></AppZoneWRose>
|
|
40
83
|
|
|
84
|
+
<AppZoneWSetOne v-if="cmpPick==='WSetOne'"></AppZoneWSetOne>
|
|
85
|
+
|
|
86
|
+
<AppZoneWSetMulti v-if="cmpPick==='WSetMulti'"></AppZoneWSetMulti>
|
|
87
|
+
|
|
41
88
|
</div>
|
|
42
89
|
|
|
43
90
|
|
|
@@ -45,16 +92,18 @@
|
|
|
45
92
|
</template>
|
|
46
93
|
|
|
47
94
|
<script>
|
|
48
|
-
|
|
49
|
-
// import get from 'lodash-es/get'
|
|
95
|
+
import get from 'lodash-es/get'
|
|
50
96
|
import kebabCase from 'lodash-es/kebabCase'
|
|
51
|
-
|
|
52
|
-
// import
|
|
97
|
+
import each from 'lodash-es/each'
|
|
98
|
+
// import cloneDeep from 'lodash-es/cloneDeep'
|
|
99
|
+
import urlParse from 'wsemi/src/urlParse.mjs'
|
|
53
100
|
import WListHorizontal from 'w-component-vue/src/components/WListHorizontal.vue'
|
|
54
101
|
import AppZoneWPlot from './AppZoneWPlot.vue'
|
|
55
102
|
import AppZoneWBar from './AppZoneWBar.vue'
|
|
56
103
|
import AppZoneWPie from './AppZoneWPie.vue'
|
|
57
104
|
import AppZoneWRose from './AppZoneWRose.vue'
|
|
105
|
+
import AppZoneWSetOne from './AppZoneWSetOne.vue'
|
|
106
|
+
import AppZoneWSetMulti from './AppZoneWSetMulti.vue'
|
|
58
107
|
|
|
59
108
|
|
|
60
109
|
export default {
|
|
@@ -64,37 +113,192 @@ export default {
|
|
|
64
113
|
AppZoneWBar,
|
|
65
114
|
AppZoneWPie,
|
|
66
115
|
AppZoneWRose,
|
|
116
|
+
AppZoneWSetOne,
|
|
117
|
+
AppZoneWSetMulti,
|
|
67
118
|
},
|
|
68
119
|
data: function() {
|
|
120
|
+
let cmps = [
|
|
121
|
+
{
|
|
122
|
+
name: 'basic',
|
|
123
|
+
cmps: [
|
|
124
|
+
{ name: 'WPlot', },
|
|
125
|
+
{ name: 'WBar', },
|
|
126
|
+
{ name: 'WPie', },
|
|
127
|
+
{ name: 'WRose', },
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'set',
|
|
132
|
+
cmps: [
|
|
133
|
+
{ name: 'WSetOne', },
|
|
134
|
+
{ name: 'WSetMulti', },
|
|
135
|
+
// {
|
|
136
|
+
// name: 'VTest',
|
|
137
|
+
// cmps: [
|
|
138
|
+
// { name: 'VTest1', },
|
|
139
|
+
// { name: 'VTest2', },
|
|
140
|
+
// { name: 'VTest3', },
|
|
141
|
+
// ],
|
|
142
|
+
// },
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
]
|
|
69
146
|
return {
|
|
70
|
-
// get,
|
|
71
147
|
kebabCase,
|
|
72
148
|
|
|
73
|
-
|
|
74
|
-
|
|
149
|
+
cmpsL1: cmps,
|
|
150
|
+
indP1: null,
|
|
151
|
+
cmpP1: null,
|
|
152
|
+
|
|
153
|
+
cmpsL2: null,
|
|
154
|
+
indP2: null,
|
|
155
|
+
cmpP2: null,
|
|
75
156
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'WPie',
|
|
80
|
-
'WRose',
|
|
81
|
-
],
|
|
157
|
+
cmpsL3: null,
|
|
158
|
+
indP3: null,
|
|
159
|
+
cmpP3: null,
|
|
82
160
|
|
|
83
|
-
|
|
161
|
+
cmpsL4: null,
|
|
162
|
+
|
|
163
|
+
cmpPick: '',
|
|
84
164
|
|
|
85
165
|
}
|
|
86
166
|
},
|
|
87
167
|
mounted: function() {
|
|
88
168
|
let vo = this
|
|
169
|
+
|
|
170
|
+
//default
|
|
171
|
+
vo.indP1 = 0
|
|
172
|
+
vo.indP2 = 0
|
|
173
|
+
vo.indP3 = 0
|
|
174
|
+
|
|
175
|
+
//urlParse, http://localhost:8080/?cmp=w-pie
|
|
176
|
+
let p = urlParse(location.href)
|
|
177
|
+
// console.log('p', p)
|
|
178
|
+
|
|
179
|
+
//viewPick
|
|
180
|
+
vo.viewPick(get(p, 'cmp', ''))
|
|
181
|
+
|
|
89
182
|
},
|
|
90
183
|
computed: {
|
|
91
184
|
|
|
185
|
+
changeMenus: function() {
|
|
186
|
+
let vo = this
|
|
187
|
+
vo.modifyMenus(vo.indP1, vo.indP2, vo.indP3)
|
|
188
|
+
return ''
|
|
189
|
+
},
|
|
190
|
+
|
|
92
191
|
isNarrow: function() {
|
|
93
192
|
return window.innerWidth < 1000
|
|
94
193
|
},
|
|
95
194
|
|
|
96
195
|
},
|
|
97
196
|
methods: {
|
|
197
|
+
|
|
198
|
+
modifyMenus: function() {
|
|
199
|
+
let vo = this
|
|
200
|
+
|
|
201
|
+
let cmpPick = ''
|
|
202
|
+
|
|
203
|
+
setTimeout(() => {
|
|
204
|
+
|
|
205
|
+
// console.log('call P1')
|
|
206
|
+
vo.cmpP1 = get(vo.cmpsL1, vo.indP1, {})
|
|
207
|
+
vo.cmpsL2 = get(vo.cmpP1, `cmps`, [])
|
|
208
|
+
let _cmpPick = get(vo.cmpP1, `name`, '')
|
|
209
|
+
if (_cmpPick) {
|
|
210
|
+
cmpPick = _cmpPick
|
|
211
|
+
}
|
|
212
|
+
// console.log('vo.cmpP1', cloneDeep(vo.cmpP1))
|
|
213
|
+
// console.log('vo.cmpsL2', cloneDeep(vo.cmpsL2))
|
|
214
|
+
|
|
215
|
+
}, 50)
|
|
216
|
+
|
|
217
|
+
setTimeout(() => {
|
|
218
|
+
|
|
219
|
+
// console.log('call P2')
|
|
220
|
+
let cmps = get(vo.cmpP1, `cmps`, [])
|
|
221
|
+
vo.cmpP2 = get(cmps, vo.indP2, {})
|
|
222
|
+
vo.cmpsL3 = get(vo.cmpP2, `cmps`, [])
|
|
223
|
+
let _cmpPick = get(vo.cmpP2, `name`, '')
|
|
224
|
+
if (_cmpPick) {
|
|
225
|
+
cmpPick = _cmpPick
|
|
226
|
+
}
|
|
227
|
+
// console.log('vo.cmpP2', cloneDeep(vo.cmpP2))
|
|
228
|
+
// console.log('vo.cmpsL3', cloneDeep(vo.cmpsL3))
|
|
229
|
+
|
|
230
|
+
}, 100)
|
|
231
|
+
|
|
232
|
+
setTimeout(() => {
|
|
233
|
+
|
|
234
|
+
// console.log('call P3')
|
|
235
|
+
let cmps = get(vo.cmpP2, `cmps`, [])
|
|
236
|
+
vo.cmpP3 = get(cmps, vo.indP3, {})
|
|
237
|
+
vo.cmpsL4 = get(vo.cmpP3, `cmps`, [])
|
|
238
|
+
let _cmpPick = get(vo.cmpP3, `name`, '')
|
|
239
|
+
if (_cmpPick) {
|
|
240
|
+
cmpPick = _cmpPick
|
|
241
|
+
}
|
|
242
|
+
// console.log('vo.cmpP3', cloneDeep(vo.cmpP3))
|
|
243
|
+
// console.log('vo.cmpsL4', cloneDeep(vo.cmpsL4))
|
|
244
|
+
|
|
245
|
+
//update
|
|
246
|
+
vo.cmpPick = cmpPick
|
|
247
|
+
// console.log('cmpPick', cmpPick)
|
|
248
|
+
|
|
249
|
+
}, 150)
|
|
250
|
+
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
getInd: function(item, items) {
|
|
254
|
+
// let vo = this
|
|
255
|
+
let ind = -1
|
|
256
|
+
each(items, (v, k) => {
|
|
257
|
+
if (item.name === v.name) {
|
|
258
|
+
ind = k
|
|
259
|
+
return false //跳出
|
|
260
|
+
}
|
|
261
|
+
})
|
|
262
|
+
return ind
|
|
263
|
+
},
|
|
264
|
+
|
|
265
|
+
viewPick: function(cmpPick) {
|
|
266
|
+
let vo = this
|
|
267
|
+
let _cmpPick = kebabCase(cmpPick)
|
|
268
|
+
let r = ''
|
|
269
|
+
let rs = []
|
|
270
|
+
let ls = []
|
|
271
|
+
let l = 0
|
|
272
|
+
let pv = (ts) => {
|
|
273
|
+
each(ts, (v, k) => {
|
|
274
|
+
let name = get(v, `name`, '')
|
|
275
|
+
let _name = kebabCase(name)
|
|
276
|
+
let cmps = get(v, `cmps`, [])
|
|
277
|
+
if (cmps.length > 0) {
|
|
278
|
+
ls.push(l)
|
|
279
|
+
l++
|
|
280
|
+
pv(cmps)
|
|
281
|
+
l--
|
|
282
|
+
ls.pop()
|
|
283
|
+
}
|
|
284
|
+
let lst = [...ls, k]
|
|
285
|
+
rs.push({
|
|
286
|
+
clst: lst.join('.'),
|
|
287
|
+
name,
|
|
288
|
+
})
|
|
289
|
+
if (_name === _cmpPick) {
|
|
290
|
+
r = lst
|
|
291
|
+
}
|
|
292
|
+
})
|
|
293
|
+
}
|
|
294
|
+
pv(vo.cmpsL1)
|
|
295
|
+
// console.log('rs', rs)
|
|
296
|
+
// console.log('r', r)
|
|
297
|
+
vo.indP1 = get(r, 0, 0)
|
|
298
|
+
vo.indP2 = get(r, 1, 0)
|
|
299
|
+
vo.indP3 = get(r, 2, 0)
|
|
300
|
+
},
|
|
301
|
+
|
|
98
302
|
},
|
|
99
303
|
}
|
|
100
304
|
</script>
|
package/src/AppZoneWBar.vue
CHANGED
|
@@ -569,6 +569,25 @@
|
|
|
569
569
|
</div>
|
|
570
570
|
|
|
571
571
|
|
|
572
|
+
<div class="bk">
|
|
573
|
+
<demolink
|
|
574
|
+
:kbname="'w-bar'"
|
|
575
|
+
:casename="'horizontal & one-set & barUseInnerLabelsForHorizontal'"
|
|
576
|
+
></demolink>
|
|
577
|
+
|
|
578
|
+
<w-bar
|
|
579
|
+
:opt="{
|
|
580
|
+
...WBar.opt1a,
|
|
581
|
+
direction:'horizontal',
|
|
582
|
+
marginLeft:80,
|
|
583
|
+
legendPosition:'bottomright',
|
|
584
|
+
barUseInnerLabelsForHorizontal:true,
|
|
585
|
+
}"
|
|
586
|
+
></w-bar>
|
|
587
|
+
|
|
588
|
+
</div>
|
|
589
|
+
|
|
590
|
+
|
|
572
591
|
<div class="bk">
|
|
573
592
|
<demolink
|
|
574
593
|
:kbname="'w-bar'"
|
|
@@ -815,6 +834,28 @@
|
|
|
815
834
|
</div>
|
|
816
835
|
|
|
817
836
|
|
|
837
|
+
<div class="bk">
|
|
838
|
+
<demolink
|
|
839
|
+
:kbname="'w-bar'"
|
|
840
|
+
:casename="'horizontal & multi-set & barUseInnerLabelsForHorizontal & barGroupWidthRatio'"
|
|
841
|
+
></demolink>
|
|
842
|
+
|
|
843
|
+
<w-bar
|
|
844
|
+
:opt="{
|
|
845
|
+
...WBar.opt2a,
|
|
846
|
+
direction:'horizontal',
|
|
847
|
+
marginLeft:80,
|
|
848
|
+
legendPosition:'bottomright',
|
|
849
|
+
barShowLabels:false,
|
|
850
|
+
showLegend:true,
|
|
851
|
+
barUseInnerLabelsForHorizontal:true,
|
|
852
|
+
barGroupWidthRatio:0.25,
|
|
853
|
+
}"
|
|
854
|
+
></w-bar>
|
|
855
|
+
|
|
856
|
+
</div>
|
|
857
|
+
|
|
858
|
+
|
|
818
859
|
<div class="bk">
|
|
819
860
|
<demolink
|
|
820
861
|
:kbname="'w-bar'"
|
|
@@ -1153,7 +1194,7 @@ export default {
|
|
|
1153
1194
|
props: {
|
|
1154
1195
|
},
|
|
1155
1196
|
data: function() {
|
|
1156
|
-
let
|
|
1197
|
+
let keys = ['USA', 'China', 'Brazil', 'EU', 'India', 'Russia']
|
|
1157
1198
|
let rds1a = [
|
|
1158
1199
|
{
|
|
1159
1200
|
name: 'Corn',
|
|
@@ -1381,7 +1422,7 @@ export default {
|
|
|
1381
1422
|
'opt1a': {
|
|
1382
1423
|
width: 400,
|
|
1383
1424
|
height: 400,
|
|
1384
|
-
keys
|
|
1425
|
+
keys,
|
|
1385
1426
|
rds: rds1a,
|
|
1386
1427
|
xTitle: 'Countries',
|
|
1387
1428
|
yTitle: 'Weight (MT)',
|
|
@@ -1389,7 +1430,7 @@ export default {
|
|
|
1389
1430
|
'opt1b': {
|
|
1390
1431
|
width: 400,
|
|
1391
1432
|
height: 400,
|
|
1392
|
-
keys
|
|
1433
|
+
keys,
|
|
1393
1434
|
rds: rds1b,
|
|
1394
1435
|
xTitle: 'Countries',
|
|
1395
1436
|
yTitle: 'Weight (MT)',
|
|
@@ -1397,7 +1438,7 @@ export default {
|
|
|
1397
1438
|
'opt1c': {
|
|
1398
1439
|
width: 400,
|
|
1399
1440
|
height: 400,
|
|
1400
|
-
keys
|
|
1441
|
+
keys,
|
|
1401
1442
|
rds: rds1c,
|
|
1402
1443
|
xTitle: 'Countries',
|
|
1403
1444
|
yTitle: 'Weight (MT)',
|
|
@@ -1405,7 +1446,7 @@ export default {
|
|
|
1405
1446
|
'opt2a': {
|
|
1406
1447
|
width: 400,
|
|
1407
1448
|
height: 400,
|
|
1408
|
-
keys
|
|
1449
|
+
keys,
|
|
1409
1450
|
rds: rds2a,
|
|
1410
1451
|
xTitle: 'Countries',
|
|
1411
1452
|
yTitle: 'Weight (MT)',
|
|
@@ -1413,7 +1454,7 @@ export default {
|
|
|
1413
1454
|
'opt2b': {
|
|
1414
1455
|
width: 400,
|
|
1415
1456
|
height: 400,
|
|
1416
|
-
keys
|
|
1457
|
+
keys,
|
|
1417
1458
|
rds: rds2b,
|
|
1418
1459
|
xTitle: 'Countries',
|
|
1419
1460
|
yTitle: 'Weight (MT)',
|
|
@@ -1421,7 +1462,7 @@ export default {
|
|
|
1421
1462
|
'opt2c': {
|
|
1422
1463
|
width: 400,
|
|
1423
1464
|
height: 400,
|
|
1424
|
-
keys
|
|
1465
|
+
keys,
|
|
1425
1466
|
rds: rds2c,
|
|
1426
1467
|
xTitle: 'Countries',
|
|
1427
1468
|
yTitle: 'Weight (MT)',
|
|
@@ -1429,7 +1470,7 @@ export default {
|
|
|
1429
1470
|
'opt2d': {
|
|
1430
1471
|
width: 400,
|
|
1431
1472
|
height: 400,
|
|
1432
|
-
keys
|
|
1473
|
+
keys,
|
|
1433
1474
|
rds: rds2d,
|
|
1434
1475
|
xTitle: 'Countries',
|
|
1435
1476
|
yTitle: 'Weight (MT)',
|
|
@@ -1437,7 +1478,7 @@ export default {
|
|
|
1437
1478
|
'opt2e': {
|
|
1438
1479
|
width: 400,
|
|
1439
1480
|
height: 400,
|
|
1440
|
-
keys
|
|
1481
|
+
keys,
|
|
1441
1482
|
rds: rds2e,
|
|
1442
1483
|
xTitle: 'Countries',
|
|
1443
1484
|
yTitle: 'Weight (MT)',
|