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.
Files changed (172) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +55 -0
  4. package/.jsdoc +25 -0
  5. package/LICENSE +21 -0
  6. package/README.md +89 -0
  7. package/SECURITY.md +5 -0
  8. package/babel.config.js +15 -0
  9. package/dist/w-geo-vue.umd.js +7 -0
  10. package/dist/w-geo-vue.umd.js.map +1 -0
  11. package/docs/examples/app.html +65 -0
  12. package/docs/examples/app.umd.js +7 -0
  13. package/docs/examples/app.umd.js.map +1 -0
  14. package/docs/examples/w-bar_horizontal_multi-set(color).html +492 -0
  15. package/docs/examples/w-bar_horizontal_multi-set(color, gradient).html +492 -0
  16. package/docs/examples/w-bar_horizontal_multi-set(series color).html +492 -0
  17. package/docs/examples/w-bar_horizontal_multi-set(series color, gradient).html +492 -0
  18. package/docs/examples/w-bar_horizontal_multi-set.html +492 -0
  19. package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackNormal).html +495 -0
  20. package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackPercent).html +496 -0
  21. package/docs/examples/w-bar_horizontal_multi-set__hide legned.html +492 -0
  22. package/docs/examples/w-bar_horizontal_multi-set__show labels.html +492 -0
  23. package/docs/examples/w-bar_horizontal_multi-set_barKpColor(gradient).html +508 -0
  24. package/docs/examples/w-bar_horizontal_multi-set_barKpColor.html +506 -0
  25. package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio.html +493 -0
  26. package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio_barGroupWidthRatio.html +498 -0
  27. package/docs/examples/w-bar_horizontal_one-set(color).html +490 -0
  28. package/docs/examples/w-bar_horizontal_one-set(color, gradient).html +490 -0
  29. package/docs/examples/w-bar_horizontal_one-set.html +490 -0
  30. package/docs/examples/w-bar_horizontal_one-set_barColor(gradient).html +491 -0
  31. package/docs/examples/w-bar_horizontal_one-set_barColor.html +491 -0
  32. package/docs/examples/w-bar_horizontal_one-set_barKpColor(gradient).html +500 -0
  33. package/docs/examples/w-bar_horizontal_one-set_barKpColor.html +498 -0
  34. package/docs/examples/w-bar_horizontal_one-set_barWidthRatio.html +491 -0
  35. package/docs/examples/w-bar_horizontal_one-set_barWidthRatio_barGroupWidthRatio.html +496 -0
  36. package/docs/examples/w-bar_horizontal_one-set_hide labels.html +491 -0
  37. package/docs/examples/w-bar_horizontal_one-set_marginLeft_marginRight.html +495 -0
  38. package/docs/examples/w-bar_horizontal_one-set_show legned.html +491 -0
  39. package/docs/examples/w-bar_multi-set(color).html +489 -0
  40. package/docs/examples/w-bar_multi-set(color, gradient).html +489 -0
  41. package/docs/examples/w-bar_multi-set(series color).html +489 -0
  42. package/docs/examples/w-bar_multi-set(series color, gradient).html +489 -0
  43. package/docs/examples/w-bar_multi-set.html +489 -0
  44. package/docs/examples/w-bar_multi-set__barDisplay(stackNormal).html +490 -0
  45. package/docs/examples/w-bar_multi-set__barDisplay(stackNormal)_.html +492 -0
  46. package/docs/examples/w-bar_multi-set__barDisplay(stackPercent).html +491 -0
  47. package/docs/examples/w-bar_multi-set__hide legned.html +489 -0
  48. package/docs/examples/w-bar_multi-set__show labels.html +489 -0
  49. package/docs/examples/w-bar_multi-set_barKpColor(gradient).html +503 -0
  50. package/docs/examples/w-bar_multi-set_barKpColor.html +503 -0
  51. package/docs/examples/w-bar_multi-set_barWidthRatio.html +490 -0
  52. package/docs/examples/w-bar_multi-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +495 -0
  53. package/docs/examples/w-bar_one-set(color).html +487 -0
  54. package/docs/examples/w-bar_one-set(color, gradient).html +487 -0
  55. package/docs/examples/w-bar_one-set.html +487 -0
  56. package/docs/examples/w-bar_one-set_barColor(gradient).html +488 -0
  57. package/docs/examples/w-bar_one-set_barColor.html +488 -0
  58. package/docs/examples/w-bar_one-set_barKpColor(gradient).html +495 -0
  59. package/docs/examples/w-bar_one-set_barKpColor.html +495 -0
  60. package/docs/examples/w-bar_one-set_barWidthRatio.html +488 -0
  61. package/docs/examples/w-bar_one-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +493 -0
  62. package/docs/examples/w-bar_one-set_hide labels.html +488 -0
  63. package/docs/examples/w-bar_one-set_marginLeft_marginRight_marginTop.html +493 -0
  64. package/docs/examples/w-bar_one-set_show legned.html +488 -0
  65. package/docs/examples/w-pie_one-set(color).html +251 -0
  66. package/docs/examples/w-pie_one-set(color, gradient).html +251 -0
  67. package/docs/examples/w-pie_one-set.html +251 -0
  68. package/docs/examples/w-pie_one-set_hide labels.html +252 -0
  69. package/docs/examples/w-pie_one-set_hide legned.html +252 -0
  70. package/docs/examples/w-pie_one-set_marginLeft_marginRight_marginTop.html +257 -0
  71. package/docs/examples/w-pie_one-set_pieBorderRadius.html +252 -0
  72. package/docs/examples/w-pie_one-set_pieBorderWidth_pieBorderRadius.html +253 -0
  73. package/docs/examples/w-pie_one-set_pieKpColor(gradient).html +259 -0
  74. package/docs/examples/w-pie_one-set_pieKpColor.html +259 -0
  75. package/docs/examples/w-pie_one-set_pieThicknessRatio.html +252 -0
  76. package/docs/examples/w-plot_default.html +174 -0
  77. package/docs/examples/w-rose_multi-set(color).html +489 -0
  78. package/docs/examples/w-rose_multi-set(color, gradient).html +489 -0
  79. package/docs/examples/w-rose_multi-set(series color).html +489 -0
  80. package/docs/examples/w-rose_multi-set(series color, gradient).html +489 -0
  81. package/docs/examples/w-rose_multi-set.html +489 -0
  82. package/docs/examples/w-rose_multi-set__hide legned.html +489 -0
  83. package/docs/examples/w-rose_multi-set__show labels.html +489 -0
  84. package/docs/examples/w-rose_multi-set_roseBorderWidth.html +490 -0
  85. package/docs/examples/w-rose_multi-set_roseKpColor(gradient).html +503 -0
  86. package/docs/examples/w-rose_multi-set_roseKpColor.html +503 -0
  87. package/docs/examples/w-rose_multi-set_roseWidthRatio.html +490 -0
  88. package/docs/examples/w-rose_one-set(color).html +487 -0
  89. package/docs/examples/w-rose_one-set(color, gradient).html +487 -0
  90. package/docs/examples/w-rose_one-set.html +487 -0
  91. package/docs/examples/w-rose_one-set_marginLeft_marginRight_marginTop.html +493 -0
  92. package/docs/examples/w-rose_one-set_roseBorderWidth.html +488 -0
  93. package/docs/examples/w-rose_one-set_roseKpColor(gradient).html +495 -0
  94. package/docs/examples/w-rose_one-set_roseKpColor.html +495 -0
  95. package/docs/examples/w-rose_one-set_roseShowLabels.html +488 -0
  96. package/docs/examples/w-rose_one-set_roseWidthRatio.html +488 -0
  97. package/docs/examples/w-rose_one-set_showLegend.html +488 -0
  98. package/docs/examples/w-rose_one-set_showLegend_legendPosition.html +489 -0
  99. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  100. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  101. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  102. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  103. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  104. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  105. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  106. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  107. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  108. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  109. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  110. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  111. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  112. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  113. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  114. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  115. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  116. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  117. package/docs/getDefAxis.mjs.html +157 -0
  118. package/docs/getDefChart.mjs.html +123 -0
  119. package/docs/getDefLegend.mjs.html +115 -0
  120. package/docs/getDefOpt.mjs.html +137 -0
  121. package/docs/global.html +1088 -0
  122. package/docs/index.html +84 -0
  123. package/docs/module-WBar.html +216 -0
  124. package/docs/module-WPie.html +216 -0
  125. package/docs/module-WPlot.html +216 -0
  126. package/docs/module-WRose.html +216 -0
  127. package/docs/scripts/collapse.js +39 -0
  128. package/docs/scripts/commonNav.js +28 -0
  129. package/docs/scripts/linenumber.js +25 -0
  130. package/docs/scripts/nav.js +12 -0
  131. package/docs/scripts/polyfill.js +4 -0
  132. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  133. package/docs/scripts/prettify/lang-css.js +2 -0
  134. package/docs/scripts/prettify/prettify.js +28 -0
  135. package/docs/scripts/search.js +99 -0
  136. package/docs/setLegendLoc.mjs.html +176 -0
  137. package/docs/styles/jsdoc.css +776 -0
  138. package/docs/styles/prettify.css +80 -0
  139. package/g.mjs +0 -0
  140. package/package.json +68 -0
  141. package/public/index.html +38 -0
  142. package/src/App.vue +118 -0
  143. package/src/AppZoneWBar.vue +1454 -0
  144. package/src/AppZoneWPie.vue +324 -0
  145. package/src/AppZoneWPlot.vue +78 -0
  146. package/src/AppZoneWRose.vue +735 -0
  147. package/src/components/WBar.vue +107 -0
  148. package/src/components/WGeoVue.vue +18 -0
  149. package/src/components/WPie.vue +107 -0
  150. package/src/components/WPlot.vue +86 -0
  151. package/src/components/WRose.vue +107 -0
  152. package/src/components/demolink.vue +105 -0
  153. package/src/js/genBarOpt.mjs +303 -0
  154. package/src/js/genPieOpt.mjs +233 -0
  155. package/src/js/genRoseOpt.mjs +297 -0
  156. package/src/js/getDefAxis.mjs +85 -0
  157. package/src/js/getDefChart.mjs +51 -0
  158. package/src/js/getDefLegend.mjs +43 -0
  159. package/src/js/getDefOpt.mjs +65 -0
  160. package/src/js/setLegendLoc.mjs +104 -0
  161. package/src/main.js +8 -0
  162. package/test/all.test.mjs +10 -0
  163. package/toolg/addVersion.mjs +4 -0
  164. package/toolg/cleanFolder.mjs +4 -0
  165. package/toolg/cvCasename.mjs +43 -0
  166. package/toolg/gDistApp.mjs +38 -0
  167. package/toolg/gDistRollupComps.mjs +21 -0
  168. package/toolg/gDocExams.mjs +47 -0
  169. package/toolg/gExtractHtml.mjs +263 -0
  170. package/toolg/gMergeComps.mjs +75 -0
  171. package/toolg/modifyReadme.mjs +4 -0
  172. package/vue.config.js +21 -0
@@ -0,0 +1,157 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>getDefAxis.mjs - 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></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">getDefAxis.mjs</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+ <article>
48
+ <pre class="prettyprint source linenums"><code>import get from 'lodash-es/get'
49
+ import dig from 'wsemi/src/dig.mjs'
50
+
51
+
52
+ /**
53
+ * 產生預設Highcharts軸物件
54
+ *
55
+ * @param {Object} [opt={}] 輸入設定物件,預設{}
56
+ * @returns {Object} 回傳物件
57
+ */
58
+ function getDefAxis(opt = {}) {
59
+ //預設軸物件
60
+
61
+ let softMax = get(opt, 'softMax')
62
+ let vDig = get(opt, 'vDig')
63
+
64
+ let titleFontFamily = get(opt, 'titleFontFamily', '微軟正黑體')
65
+ let titleFontSize = get(opt, 'titleFontSize', '12pt')
66
+ let titleColor = get(opt, 'titleColor', '#000')
67
+
68
+ let labelFontFamily = get(opt, 'labelFontFamily', '微軟正黑體')
69
+ let labelFontSize = get(opt, 'labelFontSize', '9pt')
70
+ let labelColor = get(opt, 'labelColor', '#222')
71
+
72
+ let obj = {
73
+
74
+ crosshair: true,
75
+
76
+ title: {
77
+ useHTML: true,
78
+ text: '',
79
+ style: {
80
+ fontFamily: titleFontFamily,
81
+ fontSize: titleFontSize,
82
+ color: titleColor,
83
+ },
84
+ },
85
+
86
+ softMax,
87
+
88
+ labels: {
89
+ autoRotation: false,
90
+ style: {
91
+ fontFamily: labelFontFamily,
92
+ fontSize: labelFontSize,
93
+ color: labelColor,
94
+ },
95
+ formatter: function() {
96
+ if (vDig) {
97
+ return dig(this.value, vDig)
98
+ }
99
+ return this.value
100
+ },
101
+ },
102
+
103
+ lineColor: '#666',
104
+ lineWidth: 1,
105
+
106
+ //tickInterval: 0.2,
107
+ gridLineColor: '#eeeeee',
108
+ gridLineWidth: 1,
109
+
110
+ //minorTickInterval: 0.1,
111
+ minorGridLineColor: '#eeeeee',
112
+ minorGridLineWidth: 1,
113
+
114
+ tickPosition: 'inside',
115
+ tickColor: '#222222',
116
+ tickWidth: 1,
117
+ tickLength: 5,
118
+
119
+ minorTickPosition: 'inside',
120
+ minorTickColor: '#222222',
121
+ minorTickWidth: 1,
122
+ minorTickLength: 5,
123
+
124
+ //opposite: false,
125
+
126
+ }
127
+
128
+ return obj
129
+ }
130
+
131
+
132
+ export default getDefAxis
133
+ </code></pre>
134
+ </article>
135
+ </section>
136
+
137
+
138
+
139
+
140
+
141
+
142
+ </div>
143
+
144
+ <br class="clear">
145
+
146
+ <footer>
147
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Dec 13 2023 23:13:49 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
148
+ </footer>
149
+
150
+ <script>prettyPrint();</script>
151
+ <script src="scripts/polyfill.js"></script>
152
+ <script src="scripts/linenumber.js"></script>
153
+
154
+
155
+
156
+ </body>
157
+ </html>
@@ -0,0 +1,123 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>getDefChart.mjs - 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></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">getDefChart.mjs</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+ <article>
48
+ <pre class="prettyprint source linenums"><code>import get from 'lodash-es/get'
49
+
50
+
51
+ /**
52
+ * 產生預設Highcharts圖物件
53
+ *
54
+ * @param {Object} [opt={}] 輸入設定物件,預設{}
55
+ * @returns {Object} 回傳物件
56
+ */
57
+ function getDefChart(opt = {}) {
58
+
59
+ //marginLeftShift, marginRightShift, marginTopShift, marginBottomShift
60
+ let marginLeftShift = get(opt, 'marginLeftShift', 60)
61
+ let marginRightShift = get(opt, 'marginRightShift', 0)
62
+ let marginTopShift = get(opt, 'marginTopShift', 10)
63
+ let marginBottomShift = get(opt, 'marginBottomShift', 50)
64
+
65
+ //spacingLeft
66
+ let spacingLeft = get(opt, 'spacingLeft', 0)
67
+ let spacingRight = get(opt, 'spacingRight', 0)
68
+ let spacingTop = get(opt, 'spacingTop', 0)
69
+ let spacingBottom = get(opt, 'spacingBottom', 0)
70
+
71
+ //plotBorderColor
72
+ let plotBorderColor = get(opt, 'plotBorderColor', '#666')
73
+
74
+ //plotBorderWidth
75
+ let plotBorderWidth = get(opt, 'plotBorderWidth', 1)
76
+
77
+ //sp, 邊緣最少5px以上, 否則曲線圖標貼框時會被裁切
78
+ let sp = get(opt, 'space', 5)
79
+
80
+ let obj = {
81
+ animation: false, //關閉動畫
82
+ plotBorderColor,
83
+ plotBorderWidth,
84
+ marginLeft: sp + marginLeftShift,
85
+ marginRight: sp + marginRightShift,
86
+ marginTop: sp + marginTopShift,
87
+ marginBottom: sp + marginBottomShift,
88
+ spacingLeft,
89
+ spacingRight,
90
+ spacingTop,
91
+ spacingBottom,
92
+ }
93
+
94
+ return obj
95
+ }
96
+
97
+
98
+ export default getDefChart
99
+ </code></pre>
100
+ </article>
101
+ </section>
102
+
103
+
104
+
105
+
106
+
107
+
108
+ </div>
109
+
110
+ <br class="clear">
111
+
112
+ <footer>
113
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Dec 13 2023 23:13:49 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
114
+ </footer>
115
+
116
+ <script>prettyPrint();</script>
117
+ <script src="scripts/polyfill.js"></script>
118
+ <script src="scripts/linenumber.js"></script>
119
+
120
+
121
+
122
+ </body>
123
+ </html>
@@ -0,0 +1,115 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>getDefLegend.mjs - 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></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">getDefLegend.mjs</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+ <article>
48
+ <pre class="prettyprint source linenums"><code>import get from 'lodash-es/get'
49
+
50
+
51
+ /**
52
+ * 產生預設Highcharts圖例物件
53
+ *
54
+ * @param {Object} [opt={}] 輸入設定物件,預設{}
55
+ * @returns {Object} 回傳物件
56
+ */
57
+ function getDefLegend(opt = {}) {
58
+
59
+ let legnedFontFamily = get(opt, 'legnedFontFamily', '微軟正黑體')
60
+ let legnedFontSize = get(opt, 'legnedFontSize', '9pt')
61
+ let legnedColor = get(opt, 'legnedColor', '#222')
62
+
63
+ let legendBackgroundColor = get(opt, 'legendBackgroundColor', 'rgba(255,255,255,0.75)')
64
+ let legnedBorderColor = get(opt, 'legnedBorderColor', '#aaa')
65
+
66
+ let obj = {
67
+ useHTML: true,
68
+ enabled: true,
69
+ shared: true,
70
+ floating: true,
71
+ layout: 'vertical',
72
+ // align: 'right',
73
+ // verticalAlign: 'top',
74
+ // x: -5,
75
+ // y: 5,
76
+ backgroundColor: legendBackgroundColor,
77
+ borderColor: legnedBorderColor,
78
+ borderWidth: 1,
79
+ itemStyle: {
80
+ fontFamily: legnedFontFamily,
81
+ fontSize: legnedFontSize,
82
+ color: legnedColor,
83
+ },
84
+ }
85
+
86
+ return obj
87
+ }
88
+
89
+
90
+ export default getDefLegend
91
+ </code></pre>
92
+ </article>
93
+ </section>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ </div>
101
+
102
+ <br class="clear">
103
+
104
+ <footer>
105
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Dec 13 2023 23:13:49 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106
+ </footer>
107
+
108
+ <script>prettyPrint();</script>
109
+ <script src="scripts/polyfill.js"></script>
110
+ <script src="scripts/linenumber.js"></script>
111
+
112
+
113
+
114
+ </body>
115
+ </html>
@@ -0,0 +1,137 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>getDefOpt.mjs - 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></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">getDefOpt.mjs</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+ <article>
48
+ <pre class="prettyprint source linenums"><code>import get from 'lodash-es/get'
49
+
50
+
51
+ /**
52
+ * 產生預設Highcharts設定物件
53
+ *
54
+ * @param {Object} [opt={}] 輸入設定物件,預設{}
55
+ * @returns {Object} 回傳物件
56
+ */
57
+ function getDefOpt(opt = {}) {
58
+
59
+ //useTooltip
60
+ let useTooltip = get(opt, 'useTooltip', true)
61
+
62
+ //useLegend
63
+ let useLegend = get(opt, 'useLegend', true)
64
+
65
+ let _opt = {
66
+
67
+ credits: {
68
+ enabled: false //不顯示highchart icon
69
+ },
70
+
71
+ navigation: {
72
+ buttonOptions: {
73
+ enabled: false //若有引用export.js時關閉匯出按鈕
74
+ }
75
+ },
76
+
77
+ boost: {
78
+ enabled: true,
79
+ // useGPUTranslations: true,
80
+ },
81
+
82
+ plotOptions: {
83
+ series: {
84
+ animation: false, //關閉動畫
85
+ },
86
+ },
87
+
88
+ title: {
89
+ text: ''
90
+ },
91
+
92
+ subtitle: {
93
+ text: ''
94
+ },
95
+
96
+ tooltip: {
97
+ useHTML: true,
98
+ enabled: useTooltip,
99
+ },
100
+
101
+ legend: {
102
+ useHTML: true,
103
+ enabled: useLegend,
104
+ },
105
+
106
+ }
107
+
108
+ return _opt
109
+ }
110
+
111
+
112
+ export default getDefOpt
113
+ </code></pre>
114
+ </article>
115
+ </section>
116
+
117
+
118
+
119
+
120
+
121
+
122
+ </div>
123
+
124
+ <br class="clear">
125
+
126
+ <footer>
127
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Dec 13 2023 23:13:49 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
128
+ </footer>
129
+
130
+ <script>prettyPrint();</script>
131
+ <script src="scripts/polyfill.js"></script>
132
+ <script src="scripts/linenumber.js"></script>
133
+
134
+
135
+
136
+ </body>
137
+ </html>