w-plot-vue 1.0.0
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/.editorconfig +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +55 -0
- package/.jsdoc +25 -0
- package/LICENSE +21 -0
- package/README.md +89 -0
- package/SECURITY.md +5 -0
- package/babel.config.js +15 -0
- package/dist/w-geo-vue.umd.js +7 -0
- package/dist/w-geo-vue.umd.js.map +1 -0
- package/docs/examples/app.html +65 -0
- package/docs/examples/app.umd.js +7 -0
- package/docs/examples/app.umd.js.map +1 -0
- package/docs/examples/w-bar_horizontal_multi-set(color).html +492 -0
- package/docs/examples/w-bar_horizontal_multi-set(color, gradient).html +492 -0
- package/docs/examples/w-bar_horizontal_multi-set(series color).html +492 -0
- package/docs/examples/w-bar_horizontal_multi-set(series color, gradient).html +492 -0
- package/docs/examples/w-bar_horizontal_multi-set.html +492 -0
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackNormal).html +495 -0
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackPercent).html +496 -0
- package/docs/examples/w-bar_horizontal_multi-set__hide legned.html +492 -0
- package/docs/examples/w-bar_horizontal_multi-set__show labels.html +492 -0
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor(gradient).html +508 -0
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor.html +506 -0
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio.html +493 -0
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio_barGroupWidthRatio.html +498 -0
- package/docs/examples/w-bar_horizontal_one-set(color).html +490 -0
- package/docs/examples/w-bar_horizontal_one-set(color, gradient).html +490 -0
- package/docs/examples/w-bar_horizontal_one-set.html +490 -0
- package/docs/examples/w-bar_horizontal_one-set_barColor(gradient).html +491 -0
- package/docs/examples/w-bar_horizontal_one-set_barColor.html +491 -0
- package/docs/examples/w-bar_horizontal_one-set_barKpColor(gradient).html +500 -0
- package/docs/examples/w-bar_horizontal_one-set_barKpColor.html +498 -0
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio.html +491 -0
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio_barGroupWidthRatio.html +496 -0
- package/docs/examples/w-bar_horizontal_one-set_hide labels.html +491 -0
- package/docs/examples/w-bar_horizontal_one-set_marginLeft_marginRight.html +495 -0
- package/docs/examples/w-bar_horizontal_one-set_show legned.html +491 -0
- package/docs/examples/w-bar_multi-set(color).html +489 -0
- package/docs/examples/w-bar_multi-set(color, gradient).html +489 -0
- package/docs/examples/w-bar_multi-set(series color).html +489 -0
- package/docs/examples/w-bar_multi-set(series color, gradient).html +489 -0
- package/docs/examples/w-bar_multi-set.html +489 -0
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal).html +490 -0
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal)_.html +492 -0
- package/docs/examples/w-bar_multi-set__barDisplay(stackPercent).html +491 -0
- package/docs/examples/w-bar_multi-set__hide legned.html +489 -0
- package/docs/examples/w-bar_multi-set__show labels.html +489 -0
- package/docs/examples/w-bar_multi-set_barKpColor(gradient).html +503 -0
- package/docs/examples/w-bar_multi-set_barKpColor.html +503 -0
- package/docs/examples/w-bar_multi-set_barWidthRatio.html +490 -0
- package/docs/examples/w-bar_multi-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +495 -0
- package/docs/examples/w-bar_one-set(color).html +487 -0
- package/docs/examples/w-bar_one-set(color, gradient).html +487 -0
- package/docs/examples/w-bar_one-set.html +487 -0
- package/docs/examples/w-bar_one-set_barColor(gradient).html +488 -0
- package/docs/examples/w-bar_one-set_barColor.html +488 -0
- package/docs/examples/w-bar_one-set_barKpColor(gradient).html +495 -0
- package/docs/examples/w-bar_one-set_barKpColor.html +495 -0
- package/docs/examples/w-bar_one-set_barWidthRatio.html +488 -0
- package/docs/examples/w-bar_one-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +493 -0
- package/docs/examples/w-bar_one-set_hide labels.html +488 -0
- package/docs/examples/w-bar_one-set_marginLeft_marginRight_marginTop.html +493 -0
- package/docs/examples/w-bar_one-set_show legned.html +488 -0
- package/docs/examples/w-pie_one-set(color).html +251 -0
- package/docs/examples/w-pie_one-set(color, gradient).html +251 -0
- package/docs/examples/w-pie_one-set.html +251 -0
- package/docs/examples/w-pie_one-set_hide labels.html +252 -0
- package/docs/examples/w-pie_one-set_hide legned.html +252 -0
- package/docs/examples/w-pie_one-set_marginLeft_marginRight_marginTop.html +257 -0
- package/docs/examples/w-pie_one-set_pieBorderRadius.html +252 -0
- package/docs/examples/w-pie_one-set_pieBorderWidth_pieBorderRadius.html +253 -0
- package/docs/examples/w-pie_one-set_pieKpColor(gradient).html +259 -0
- package/docs/examples/w-pie_one-set_pieKpColor.html +259 -0
- package/docs/examples/w-pie_one-set_pieThicknessRatio.html +252 -0
- package/docs/examples/w-plot_default.html +174 -0
- package/docs/examples/w-rose_multi-set(color).html +489 -0
- package/docs/examples/w-rose_multi-set(color, gradient).html +489 -0
- package/docs/examples/w-rose_multi-set(series color).html +489 -0
- package/docs/examples/w-rose_multi-set(series color, gradient).html +489 -0
- package/docs/examples/w-rose_multi-set.html +489 -0
- package/docs/examples/w-rose_multi-set__hide legned.html +489 -0
- package/docs/examples/w-rose_multi-set__show labels.html +489 -0
- package/docs/examples/w-rose_multi-set_roseBorderWidth.html +490 -0
- package/docs/examples/w-rose_multi-set_roseKpColor(gradient).html +503 -0
- package/docs/examples/w-rose_multi-set_roseKpColor.html +503 -0
- package/docs/examples/w-rose_multi-set_roseWidthRatio.html +490 -0
- package/docs/examples/w-rose_one-set(color).html +487 -0
- package/docs/examples/w-rose_one-set(color, gradient).html +487 -0
- package/docs/examples/w-rose_one-set.html +487 -0
- package/docs/examples/w-rose_one-set_marginLeft_marginRight_marginTop.html +493 -0
- package/docs/examples/w-rose_one-set_roseBorderWidth.html +488 -0
- package/docs/examples/w-rose_one-set_roseKpColor(gradient).html +495 -0
- package/docs/examples/w-rose_one-set_roseKpColor.html +495 -0
- package/docs/examples/w-rose_one-set_roseShowLabels.html +488 -0
- package/docs/examples/w-rose_one-set_roseWidthRatio.html +488 -0
- package/docs/examples/w-rose_one-set_showLegend.html +488 -0
- package/docs/examples/w-rose_one-set_showLegend_legendPosition.html +489 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/getDefAxis.mjs.html +157 -0
- package/docs/getDefChart.mjs.html +123 -0
- package/docs/getDefLegend.mjs.html +115 -0
- package/docs/getDefOpt.mjs.html +137 -0
- package/docs/global.html +1088 -0
- package/docs/index.html +84 -0
- package/docs/module-WBar.html +216 -0
- package/docs/module-WPie.html +216 -0
- package/docs/module-WPlot.html +216 -0
- package/docs/module-WRose.html +216 -0
- package/docs/scripts/collapse.js +39 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/linenumber.js +25 -0
- package/docs/scripts/nav.js +12 -0
- package/docs/scripts/polyfill.js +4 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/lang-css.js +2 -0
- package/docs/scripts/prettify/prettify.js +28 -0
- package/docs/scripts/search.js +99 -0
- package/docs/setLegendLoc.mjs.html +176 -0
- package/docs/styles/jsdoc.css +776 -0
- package/docs/styles/prettify.css +80 -0
- package/g.mjs +0 -0
- package/package.json +68 -0
- package/public/index.html +38 -0
- package/src/App.vue +118 -0
- package/src/AppZoneWBar.vue +1454 -0
- package/src/AppZoneWPie.vue +324 -0
- package/src/AppZoneWPlot.vue +78 -0
- package/src/AppZoneWRose.vue +735 -0
- package/src/components/WBar.vue +107 -0
- package/src/components/WGeoVue.vue +18 -0
- package/src/components/WPie.vue +107 -0
- package/src/components/WPlot.vue +86 -0
- package/src/components/WRose.vue +107 -0
- package/src/components/demolink.vue +105 -0
- package/src/js/genBarOpt.mjs +303 -0
- package/src/js/genPieOpt.mjs +233 -0
- package/src/js/genRoseOpt.mjs +297 -0
- package/src/js/getDefAxis.mjs +85 -0
- package/src/js/getDefChart.mjs +51 -0
- package/src/js/getDefLegend.mjs +43 -0
- package/src/js/getDefOpt.mjs +65 -0
- package/src/js/setLegendLoc.mjs +104 -0
- package/src/main.js +8 -0
- package/test/all.test.mjs +10 -0
- package/toolg/addVersion.mjs +4 -0
- package/toolg/cleanFolder.mjs +4 -0
- package/toolg/cvCasename.mjs +43 -0
- package/toolg/gDistApp.mjs +38 -0
- package/toolg/gDistRollupComps.mjs +21 -0
- package/toolg/gDocExams.mjs +47 -0
- package/toolg/gExtractHtml.mjs +263 -0
- package/toolg/gMergeComps.mjs +75 -0
- package/toolg/modifyReadme.mjs +4 -0
- package/vue.config.js +21 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<div class="head1"><span style="cursor:pointer;" title="open for copy link to view component" onclick="window.open('//yuda-lyu.github.io/w-plot-vue/examples/app.html?cmp='+this.innerText,'_blank')">w-pie</span></div>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
<div style="padding:0px;">
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<div class="bk">
|
|
12
|
+
<demolink
|
|
13
|
+
:kbname="'w-pie'"
|
|
14
|
+
:casename="'one-set'"
|
|
15
|
+
></demolink>
|
|
16
|
+
|
|
17
|
+
<w-pie
|
|
18
|
+
:opt="{
|
|
19
|
+
...WPie.opt1a,
|
|
20
|
+
}"
|
|
21
|
+
></w-pie>
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<div class="bk">
|
|
27
|
+
<demolink
|
|
28
|
+
:kbname="'w-pie'"
|
|
29
|
+
:casename="'one-set & marginLeft & marginRight & marginTop & marginBottom'"
|
|
30
|
+
></demolink>
|
|
31
|
+
|
|
32
|
+
<w-pie
|
|
33
|
+
:opt="{
|
|
34
|
+
...WPie.opt1a,
|
|
35
|
+
marginLeft: 50,
|
|
36
|
+
marginRight: 50,
|
|
37
|
+
marginTop: 50,
|
|
38
|
+
marginBottom: 50,
|
|
39
|
+
}"
|
|
40
|
+
></w-pie>
|
|
41
|
+
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<div class="bk">
|
|
46
|
+
<demolink
|
|
47
|
+
:kbname="'w-pie'"
|
|
48
|
+
:casename="'one-set & pieThicknessRatio'"
|
|
49
|
+
></demolink>
|
|
50
|
+
|
|
51
|
+
<w-pie
|
|
52
|
+
:opt="{
|
|
53
|
+
...WPie.opt1a,
|
|
54
|
+
pieThicknessRatio:0.05,
|
|
55
|
+
}"
|
|
56
|
+
></w-pie>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<div class="bk">
|
|
62
|
+
<demolink
|
|
63
|
+
:kbname="'w-pie'"
|
|
64
|
+
:casename="'one-set & pieBorderRadius'"
|
|
65
|
+
></demolink>
|
|
66
|
+
|
|
67
|
+
<w-pie
|
|
68
|
+
:opt="{
|
|
69
|
+
...WPie.opt1a,
|
|
70
|
+
pieBorderRadius:0,
|
|
71
|
+
}"
|
|
72
|
+
></w-pie>
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<div class="bk">
|
|
78
|
+
<demolink
|
|
79
|
+
:kbname="'w-pie'"
|
|
80
|
+
:casename="'one-set & pieBorderWidth & pieBorderRadius'"
|
|
81
|
+
></demolink>
|
|
82
|
+
|
|
83
|
+
<w-pie
|
|
84
|
+
:opt="{
|
|
85
|
+
...WPie.opt1a,
|
|
86
|
+
pieBorderWidth:0,
|
|
87
|
+
pieBorderRadius:0,
|
|
88
|
+
}"
|
|
89
|
+
></w-pie>
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<div class="bk">
|
|
95
|
+
<demolink
|
|
96
|
+
:kbname="'w-pie'"
|
|
97
|
+
:casename="'one-set(color)'"
|
|
98
|
+
></demolink>
|
|
99
|
+
|
|
100
|
+
<w-pie
|
|
101
|
+
:opt="{
|
|
102
|
+
...WPie.opt1b,
|
|
103
|
+
}"
|
|
104
|
+
></w-pie>
|
|
105
|
+
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<div class="bk">
|
|
110
|
+
<demolink
|
|
111
|
+
:kbname="'w-pie'"
|
|
112
|
+
:casename="'one-set(color, gradient)'"
|
|
113
|
+
></demolink>
|
|
114
|
+
|
|
115
|
+
<w-pie
|
|
116
|
+
:opt="{
|
|
117
|
+
...WPie.opt1c,
|
|
118
|
+
}"
|
|
119
|
+
></w-pie>
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
<div class="bk">
|
|
125
|
+
<demolink
|
|
126
|
+
:kbname="'w-pie'"
|
|
127
|
+
:casename="'one-set & pieKpColor'"
|
|
128
|
+
></demolink>
|
|
129
|
+
|
|
130
|
+
<w-pie
|
|
131
|
+
:opt="{
|
|
132
|
+
...WPie.opt1a,
|
|
133
|
+
pieKpColor:{
|
|
134
|
+
'USA':'#F44336',
|
|
135
|
+
'China':'#E91E63',
|
|
136
|
+
'Brazil':'#9C27B0',
|
|
137
|
+
'EU':'#673AB7',
|
|
138
|
+
'India':'#3F51B5',
|
|
139
|
+
'Russia':'#2196F3',
|
|
140
|
+
},
|
|
141
|
+
}"
|
|
142
|
+
></w-pie>
|
|
143
|
+
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<div class="bk">
|
|
148
|
+
<demolink
|
|
149
|
+
:kbname="'w-pie'"
|
|
150
|
+
:casename="'one-set & pieKpColor(gradient)'"
|
|
151
|
+
></demolink>
|
|
152
|
+
|
|
153
|
+
<w-pie
|
|
154
|
+
:opt="{
|
|
155
|
+
...WPie.opt1a,
|
|
156
|
+
pieKpColor:{
|
|
157
|
+
'USA':['#EF9A9A','#F44336'],
|
|
158
|
+
'China':['#F48FB1','#E91E63'],
|
|
159
|
+
'Brazil':['#CE93D8','#9C27B0'],
|
|
160
|
+
'EU':['#B39DDB','#673AB7'],
|
|
161
|
+
'India':['#9FA8DA','#3F51B5'],
|
|
162
|
+
'Russia':['#90CAF9','#2196F3'],
|
|
163
|
+
},
|
|
164
|
+
}"
|
|
165
|
+
></w-pie>
|
|
166
|
+
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<div class="bk">
|
|
171
|
+
<demolink
|
|
172
|
+
:kbname="'w-pie'"
|
|
173
|
+
:casename="'one-set & hide labels'"
|
|
174
|
+
></demolink>
|
|
175
|
+
|
|
176
|
+
<w-pie
|
|
177
|
+
:opt="{
|
|
178
|
+
...WPie.opt1a,
|
|
179
|
+
pieShowLabels:false,
|
|
180
|
+
}"
|
|
181
|
+
></w-pie>
|
|
182
|
+
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
<div class="bk">
|
|
187
|
+
<demolink
|
|
188
|
+
:kbname="'w-pie'"
|
|
189
|
+
:casename="'one-set & hide legned'"
|
|
190
|
+
></demolink>
|
|
191
|
+
|
|
192
|
+
<w-pie
|
|
193
|
+
:opt="{
|
|
194
|
+
...WPie.opt1a,
|
|
195
|
+
showLegend:false,
|
|
196
|
+
}"
|
|
197
|
+
></w-pie>
|
|
198
|
+
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
</div>
|
|
206
|
+
</template>
|
|
207
|
+
|
|
208
|
+
<script>
|
|
209
|
+
import demolink from './components/demolink.vue'
|
|
210
|
+
import WPie from './components/WPie.vue'
|
|
211
|
+
|
|
212
|
+
export default {
|
|
213
|
+
components: {
|
|
214
|
+
demolink,
|
|
215
|
+
WPie,
|
|
216
|
+
},
|
|
217
|
+
props: {
|
|
218
|
+
},
|
|
219
|
+
data: function() {
|
|
220
|
+
let keys1 = ['USA', 'China', 'Brazil', 'EU', 'India', 'Russia']
|
|
221
|
+
let rds1a = [
|
|
222
|
+
{
|
|
223
|
+
name: 'Corn',
|
|
224
|
+
data: { USA: 406.292, China: 260.000, Brazil: 107.000, EU: 68.300, India: 27.500, Russia: 14.500 },
|
|
225
|
+
},
|
|
226
|
+
]
|
|
227
|
+
let rds1b = [
|
|
228
|
+
{
|
|
229
|
+
name: 'Corn',
|
|
230
|
+
data: {
|
|
231
|
+
USA: {
|
|
232
|
+
value: 406.292,
|
|
233
|
+
color: '#F44336',
|
|
234
|
+
},
|
|
235
|
+
China: {
|
|
236
|
+
value: 260.000,
|
|
237
|
+
color: '#E91E63',
|
|
238
|
+
},
|
|
239
|
+
Brazil: {
|
|
240
|
+
value: 107.000,
|
|
241
|
+
color: '#9C27B0',
|
|
242
|
+
},
|
|
243
|
+
EU: {
|
|
244
|
+
value: 68.300,
|
|
245
|
+
color: '#673AB7',
|
|
246
|
+
},
|
|
247
|
+
India: {
|
|
248
|
+
value: 27.500,
|
|
249
|
+
color: '#3F51B5',
|
|
250
|
+
},
|
|
251
|
+
Russia: {
|
|
252
|
+
value: 14.500,
|
|
253
|
+
color: '#2196F3',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
]
|
|
258
|
+
let rds1c = [
|
|
259
|
+
{
|
|
260
|
+
name: 'Corn',
|
|
261
|
+
data: {
|
|
262
|
+
USA: {
|
|
263
|
+
value: 406.292,
|
|
264
|
+
color: ['#EF9A9A', '#F44336'],
|
|
265
|
+
},
|
|
266
|
+
China: {
|
|
267
|
+
value: 260.000,
|
|
268
|
+
color: ['#F48FB1', '#E91E63'],
|
|
269
|
+
},
|
|
270
|
+
Brazil: {
|
|
271
|
+
value: 107.000,
|
|
272
|
+
color: ['#CE93D8', '#9C27B0'],
|
|
273
|
+
},
|
|
274
|
+
EU: {
|
|
275
|
+
value: 68.300,
|
|
276
|
+
color: ['#B39DDB', '#673AB7'],
|
|
277
|
+
},
|
|
278
|
+
India: {
|
|
279
|
+
value: 27.500,
|
|
280
|
+
color: ['#9FA8DA', '#3F51B5'],
|
|
281
|
+
},
|
|
282
|
+
Russia: {
|
|
283
|
+
value: 14.500,
|
|
284
|
+
color: ['#90CAF9', '#2196F3'],
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
]
|
|
289
|
+
return {
|
|
290
|
+
'WPie': {
|
|
291
|
+
'opt1a': {
|
|
292
|
+
width: 400,
|
|
293
|
+
height: 400,
|
|
294
|
+
keys: keys1,
|
|
295
|
+
rds: rds1a,
|
|
296
|
+
xTitle: 'Countries',
|
|
297
|
+
yTitle: 'Weight (MT)',
|
|
298
|
+
},
|
|
299
|
+
'opt1b': {
|
|
300
|
+
width: 400,
|
|
301
|
+
height: 400,
|
|
302
|
+
keys: keys1,
|
|
303
|
+
rds: rds1b,
|
|
304
|
+
xTitle: 'Countries',
|
|
305
|
+
yTitle: 'Weight (MT)',
|
|
306
|
+
},
|
|
307
|
+
'opt1c': {
|
|
308
|
+
width: 400,
|
|
309
|
+
height: 400,
|
|
310
|
+
keys: keys1,
|
|
311
|
+
rds: rds1c,
|
|
312
|
+
xTitle: 'Countries',
|
|
313
|
+
yTitle: 'Weight (MT)',
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
methods: {
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
</script>
|
|
322
|
+
|
|
323
|
+
<style scoped>
|
|
324
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<div class="head1"><span style="cursor:pointer;" title="open for copy link to view component" onclick="window.open('//yuda-lyu.github.io/w-plot-vue/examples/app.html?cmp='+this.innerText,'_blank')">w-plot</span></div>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
<div style="padding:0px;">
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<div class="bk">
|
|
12
|
+
<demolink
|
|
13
|
+
:kbname="'w-plot'"
|
|
14
|
+
:casename="'default'"
|
|
15
|
+
></demolink>
|
|
16
|
+
|
|
17
|
+
<w-plot
|
|
18
|
+
:options="WPlot.option1"
|
|
19
|
+
></w-plot>
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import demolink from './components/demolink.vue'
|
|
32
|
+
import WPlot from './components/WPlot.vue'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
components: {
|
|
37
|
+
demolink,
|
|
38
|
+
WPlot,
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
},
|
|
42
|
+
data: function() {
|
|
43
|
+
return {
|
|
44
|
+
'WPlot': {
|
|
45
|
+
'option1': {
|
|
46
|
+
title: {
|
|
47
|
+
text: 'AAPL Stock Price'
|
|
48
|
+
},
|
|
49
|
+
xAxis: {
|
|
50
|
+
type: 'datetime'
|
|
51
|
+
},
|
|
52
|
+
yAxis: {
|
|
53
|
+
title: {
|
|
54
|
+
text: 'Price'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
tooltip: {
|
|
58
|
+
headerFormat: '<div style="font-size:8pt;">{point.x:%Y/%m/%d %H:%M}</div><br/>',
|
|
59
|
+
pointFormat: ' Price: <b>{point.y}</b>'
|
|
60
|
+
},
|
|
61
|
+
series: [{
|
|
62
|
+
name: 'AAPL',
|
|
63
|
+
data: window.dataAAPL,
|
|
64
|
+
tooltip: {
|
|
65
|
+
valueDecimals: 2
|
|
66
|
+
}
|
|
67
|
+
}]
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<style scoped>
|
|
78
|
+
</style>
|