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.
Files changed (140) hide show
  1. package/README.md +4 -4
  2. package/dist/w-plot-vue.umd.js +7 -0
  3. package/dist/w-plot-vue.umd.js.map +1 -0
  4. package/docs/examples/app.html +1 -1
  5. package/docs/examples/app.umd.js +2 -2
  6. package/docs/examples/app.umd.js.map +1 -1
  7. package/docs/examples/w-bar_horizontal_multi-set(color).html +10 -10
  8. package/docs/examples/w-bar_horizontal_multi-set(color, gradient).html +10 -10
  9. package/docs/examples/w-bar_horizontal_multi-set(series color).html +10 -10
  10. package/docs/examples/w-bar_horizontal_multi-set(series color, gradient).html +10 -10
  11. package/docs/examples/w-bar_horizontal_multi-set.html +10 -10
  12. package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackNormal).html +10 -10
  13. package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackPercent).html +10 -10
  14. package/docs/examples/w-bar_horizontal_multi-set__hide legned.html +10 -10
  15. package/docs/examples/w-bar_horizontal_multi-set__show labels.html +10 -10
  16. package/docs/examples/w-bar_horizontal_multi-set_barKpColor(gradient).html +10 -10
  17. package/docs/examples/w-bar_horizontal_multi-set_barKpColor.html +10 -10
  18. package/docs/examples/w-bar_horizontal_multi-set_barUseInnerLabelsForHorizontal_barGroupWidthRatio.html +496 -0
  19. package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio.html +10 -10
  20. package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio_barGroupWidthRatio.html +10 -10
  21. package/docs/examples/w-bar_horizontal_one-set(color).html +10 -10
  22. package/docs/examples/w-bar_horizontal_one-set(color, gradient).html +10 -10
  23. package/docs/examples/w-bar_horizontal_one-set.html +10 -10
  24. package/docs/examples/w-bar_horizontal_one-set_barColor(gradient).html +10 -10
  25. package/docs/examples/w-bar_horizontal_one-set_barColor.html +10 -10
  26. package/docs/examples/w-bar_horizontal_one-set_barKpColor(gradient).html +10 -10
  27. package/docs/examples/w-bar_horizontal_one-set_barKpColor.html +10 -10
  28. package/docs/examples/w-bar_horizontal_one-set_barUseInnerLabelsForHorizontal.html +493 -0
  29. package/docs/examples/w-bar_horizontal_one-set_barWidthRatio.html +10 -10
  30. package/docs/examples/w-bar_horizontal_one-set_barWidthRatio_barGroupWidthRatio.html +10 -10
  31. package/docs/examples/w-bar_horizontal_one-set_hide labels.html +10 -10
  32. package/docs/examples/w-bar_horizontal_one-set_marginLeft_marginRight.html +10 -10
  33. package/docs/examples/w-bar_horizontal_one-set_show legned.html +10 -10
  34. package/docs/examples/w-bar_multi-set(color).html +10 -10
  35. package/docs/examples/w-bar_multi-set(color, gradient).html +10 -10
  36. package/docs/examples/w-bar_multi-set(series color).html +10 -10
  37. package/docs/examples/w-bar_multi-set(series color, gradient).html +10 -10
  38. package/docs/examples/w-bar_multi-set.html +10 -10
  39. package/docs/examples/w-bar_multi-set__barDisplay(stackNormal).html +10 -10
  40. package/docs/examples/w-bar_multi-set__barDisplay(stackNormal)_.html +10 -10
  41. package/docs/examples/w-bar_multi-set__barDisplay(stackPercent).html +10 -10
  42. package/docs/examples/w-bar_multi-set__hide legned.html +10 -10
  43. package/docs/examples/w-bar_multi-set__show labels.html +10 -10
  44. package/docs/examples/w-bar_multi-set_barKpColor(gradient).html +10 -10
  45. package/docs/examples/w-bar_multi-set_barKpColor.html +10 -10
  46. package/docs/examples/w-bar_multi-set_barWidthRatio.html +10 -10
  47. package/docs/examples/w-bar_multi-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +10 -10
  48. package/docs/examples/w-bar_one-set(color).html +10 -10
  49. package/docs/examples/w-bar_one-set(color, gradient).html +10 -10
  50. package/docs/examples/w-bar_one-set.html +10 -10
  51. package/docs/examples/w-bar_one-set_barColor(gradient).html +10 -10
  52. package/docs/examples/w-bar_one-set_barColor.html +10 -10
  53. package/docs/examples/w-bar_one-set_barKpColor(gradient).html +10 -10
  54. package/docs/examples/w-bar_one-set_barKpColor.html +10 -10
  55. package/docs/examples/w-bar_one-set_barWidthRatio.html +10 -10
  56. package/docs/examples/w-bar_one-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +10 -10
  57. package/docs/examples/w-bar_one-set_hide labels.html +10 -10
  58. package/docs/examples/w-bar_one-set_marginLeft_marginRight_marginTop.html +10 -10
  59. package/docs/examples/w-bar_one-set_show legned.html +10 -10
  60. package/docs/examples/w-pie_one-set(color).html +5 -5
  61. package/docs/examples/w-pie_one-set(color, gradient).html +5 -5
  62. package/docs/examples/w-pie_one-set.html +5 -5
  63. package/docs/examples/w-pie_one-set_hide labels.html +5 -5
  64. package/docs/examples/w-pie_one-set_hide legned.html +5 -5
  65. package/docs/examples/w-pie_one-set_marginLeft_marginRight_marginTop.html +5 -5
  66. package/docs/examples/w-pie_one-set_pieBorderRadius.html +5 -5
  67. package/docs/examples/w-pie_one-set_pieBorderWidth_pieBorderRadius.html +5 -5
  68. package/docs/examples/w-pie_one-set_pieKpColor(gradient).html +5 -5
  69. package/docs/examples/w-pie_one-set_pieKpColor.html +5 -5
  70. package/docs/examples/w-pie_one-set_pieThicknessRatio.html +5 -5
  71. package/docs/examples/w-plot_default.html +1 -1
  72. package/docs/examples/w-rose_multi-set(color).html +10 -10
  73. package/docs/examples/w-rose_multi-set(color, gradient).html +10 -10
  74. package/docs/examples/w-rose_multi-set(series color).html +10 -10
  75. package/docs/examples/w-rose_multi-set(series color, gradient).html +10 -10
  76. package/docs/examples/w-rose_multi-set.html +10 -10
  77. package/docs/examples/w-rose_multi-set__hide legned.html +10 -10
  78. package/docs/examples/w-rose_multi-set__show labels.html +10 -10
  79. package/docs/examples/w-rose_multi-set_roseBorderWidth.html +10 -10
  80. package/docs/examples/w-rose_multi-set_roseKpColor(gradient).html +10 -10
  81. package/docs/examples/w-rose_multi-set_roseKpColor.html +10 -10
  82. package/docs/examples/w-rose_multi-set_roseWidthRatio.html +10 -10
  83. package/docs/examples/w-rose_one-set(color).html +10 -10
  84. package/docs/examples/w-rose_one-set(color, gradient).html +10 -10
  85. package/docs/examples/w-rose_one-set.html +10 -10
  86. package/docs/examples/w-rose_one-set_marginLeft_marginRight_marginTop.html +10 -10
  87. package/docs/examples/w-rose_one-set_roseBorderWidth.html +10 -10
  88. package/docs/examples/w-rose_one-set_roseKpColor(gradient).html +10 -10
  89. package/docs/examples/w-rose_one-set_roseKpColor.html +10 -10
  90. package/docs/examples/w-rose_one-set_roseShowLabels.html +10 -10
  91. package/docs/examples/w-rose_one-set_roseWidthRatio.html +10 -10
  92. package/docs/examples/w-rose_one-set_showLegend.html +10 -10
  93. package/docs/examples/w-rose_one-set_showLegend_legendPosition.html +10 -10
  94. package/docs/examples/w-set-multi_default.html +221 -0
  95. package/docs/examples/w-set-multi_hide labels.html +222 -0
  96. package/docs/examples/w-set-multi_hide legned.html +222 -0
  97. package/docs/examples/w-set-multi_keySelect.html +226 -0
  98. package/docs/examples/w-set-multi_slot head.html +225 -0
  99. package/docs/examples/w-set-multi_textPlotType_kpSelectText_widthSelect.html +233 -0
  100. package/docs/examples/w-set-one_default.html +192 -0
  101. package/docs/examples/w-set-one_hide labels.html +193 -0
  102. package/docs/examples/w-set-one_keySelect.html +197 -0
  103. package/docs/examples/w-set-one_show legned.html +193 -0
  104. package/docs/examples/w-set-one_slot head.html +196 -0
  105. package/docs/examples/w-set-one_textPlotType_kpSelectText_widthSelect.html +201 -0
  106. package/docs/getDefAxis.mjs.html +5 -5
  107. package/docs/getDefChart.mjs.html +3 -3
  108. package/docs/getDefLegend.mjs.html +2 -2
  109. package/docs/getDefOpt.mjs.html +2 -2
  110. package/docs/global.html +2 -2
  111. package/docs/index.html +2 -2
  112. package/docs/module-WBar.html +2 -2
  113. package/docs/module-WPie.html +2 -2
  114. package/docs/module-WPlot.html +2 -2
  115. package/docs/module-WRose.html +2 -2
  116. package/docs/module-WSetMulti.html +216 -0
  117. package/docs/module-WSetOne.html +216 -0
  118. package/docs/setLegendLoc.mjs.html +2 -2
  119. package/package.json +1 -1
  120. package/src/App.vue +224 -20
  121. package/src/AppZoneWBar.vue +50 -9
  122. package/src/AppZoneWPie.vue +4 -4
  123. package/src/AppZoneWRose.vue +9 -9
  124. package/src/AppZoneWSetMulti.vue +225 -0
  125. package/src/AppZoneWSetOne.vue +193 -0
  126. package/src/components/WBar.vue +128 -18
  127. package/src/components/WPie.vue +21 -18
  128. package/src/components/{WGeoVue.vue → WPlotVue.vue} +8 -4
  129. package/src/components/WRose.vue +21 -18
  130. package/src/components/WSetMulti.vue +423 -0
  131. package/src/components/WSetOne.vue +57 -0
  132. package/src/js/genBarOpt.mjs +54 -7
  133. package/src/js/genPieOpt.mjs +1 -1
  134. package/src/js/genRoseOpt.mjs +1 -1
  135. package/src/js/getDefAxis.mjs +3 -3
  136. package/src/js/getDefChart.mjs +1 -1
  137. package/toolg/gDistRollupComps.mjs +1 -1
  138. package/toolg/gMergeComps.mjs +4 -4
  139. package/dist/w-geo-vue.umd.js +0 -7
  140. package/dist/w-geo-vue.umd.js.map +0 -1
@@ -0,0 +1,197 @@
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-one</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: {{WSetOne.keySelect}}</div>
124
+
125
+ <w-set-one
126
+ :opt="{
127
+ ...WSetOne.opt1c,
128
+ }"
129
+ :key-select.sync="WSetOne.keySelect"
130
+ ></w-set-one>
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 rds1c = [
145
+ {
146
+ name: "Corn",
147
+ data: {
148
+ USA: {
149
+ value: 406.292,
150
+ color: ["#EF9A9A", "#F44336"]
151
+ },
152
+ China: {
153
+ value: 260.0,
154
+ color: ["#F48FB1", "#E91E63"]
155
+ },
156
+ Brazil: {
157
+ value: 107.0,
158
+ color: ["#CE93D8", "#9C27B0"]
159
+ },
160
+ EU: {
161
+ value: 68.3,
162
+ color: ["#B39DDB", "#673AB7"]
163
+ },
164
+ India: {
165
+ value: 27.5,
166
+ color: ["#9FA8DA", "#3F51B5"]
167
+ },
168
+ Russia: {
169
+ value: 14.5,
170
+ color: ["#90CAF9", "#2196F3"]
171
+ }
172
+ }
173
+ }
174
+ ];
175
+ return {
176
+ WSetOne: {
177
+ keySelect: "bar-v-normal",
178
+ opt1c: {
179
+ width: 400,
180
+ height: 400,
181
+ keys,
182
+ rds: rds1c,
183
+ xTitle: "Countries",
184
+ yTitle: "Weight (MT)"
185
+ }
186
+ }
187
+ };
188
+ },
189
+ mounted: function() {
190
+ return {};
191
+ },
192
+ computed: {},
193
+ methods: {}
194
+ });
195
+ </script>
196
+ </body>
197
+ </html>
@@ -0,0 +1,193 @@
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-one</span>
117
+ </div>
118
+ <div class="bk">
119
+ <div class="item">show legned</div>
120
+
121
+ <w-set-one
122
+ :opt="{
123
+ ...WSetOne.opt1c,
124
+ showLegend:true,
125
+ }"
126
+ ></w-set-one>
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 rds1c = [
141
+ {
142
+ name: "Corn",
143
+ data: {
144
+ USA: {
145
+ value: 406.292,
146
+ color: ["#EF9A9A", "#F44336"]
147
+ },
148
+ China: {
149
+ value: 260.0,
150
+ color: ["#F48FB1", "#E91E63"]
151
+ },
152
+ Brazil: {
153
+ value: 107.0,
154
+ color: ["#CE93D8", "#9C27B0"]
155
+ },
156
+ EU: {
157
+ value: 68.3,
158
+ color: ["#B39DDB", "#673AB7"]
159
+ },
160
+ India: {
161
+ value: 27.5,
162
+ color: ["#9FA8DA", "#3F51B5"]
163
+ },
164
+ Russia: {
165
+ value: 14.5,
166
+ color: ["#90CAF9", "#2196F3"]
167
+ }
168
+ }
169
+ }
170
+ ];
171
+ return {
172
+ WSetOne: {
173
+ keySelect: "bar-v-normal",
174
+ opt1c: {
175
+ width: 400,
176
+ height: 400,
177
+ keys,
178
+ rds: rds1c,
179
+ xTitle: "Countries",
180
+ yTitle: "Weight (MT)"
181
+ }
182
+ }
183
+ };
184
+ },
185
+ mounted: function() {
186
+ return {};
187
+ },
188
+ computed: {},
189
+ methods: {}
190
+ });
191
+ </script>
192
+ </body>
193
+ </html>
@@ -0,0 +1,196 @@
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-one</span>
117
+ </div>
118
+ <div class="bk">
119
+ <div class="item">slot head</div>
120
+
121
+ <w-set-one
122
+ :opt="{
123
+ ...WSetOne.opt1c,
124
+ }"
125
+ >
126
+ <template v-slot:head>
127
+ <div style="padding-right:8px; font-size:1.3rem;">🌿</div>
128
+ </template>
129
+ </w-set-one>
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 rds1c = [
144
+ {
145
+ name: "Corn",
146
+ data: {
147
+ USA: {
148
+ value: 406.292,
149
+ color: ["#EF9A9A", "#F44336"]
150
+ },
151
+ China: {
152
+ value: 260.0,
153
+ color: ["#F48FB1", "#E91E63"]
154
+ },
155
+ Brazil: {
156
+ value: 107.0,
157
+ color: ["#CE93D8", "#9C27B0"]
158
+ },
159
+ EU: {
160
+ value: 68.3,
161
+ color: ["#B39DDB", "#673AB7"]
162
+ },
163
+ India: {
164
+ value: 27.5,
165
+ color: ["#9FA8DA", "#3F51B5"]
166
+ },
167
+ Russia: {
168
+ value: 14.5,
169
+ color: ["#90CAF9", "#2196F3"]
170
+ }
171
+ }
172
+ }
173
+ ];
174
+ return {
175
+ WSetOne: {
176
+ keySelect: "bar-v-normal",
177
+ opt1c: {
178
+ width: 400,
179
+ height: 400,
180
+ keys,
181
+ rds: rds1c,
182
+ xTitle: "Countries",
183
+ yTitle: "Weight (MT)"
184
+ }
185
+ }
186
+ };
187
+ },
188
+ mounted: function() {
189
+ return {};
190
+ },
191
+ computed: {},
192
+ methods: {}
193
+ });
194
+ </script>
195
+ </body>
196
+ </html>