w-plot-vue 1.0.6 → 1.0.8
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/.github/workflows/ci-test.yml +24 -0
- package/README.md +4 -6
- package/babel.config.js +4 -3
- package/dist/w-plot-vue.umd.js +3 -3
- package/dist/w-plot-vue.umd.js.map +1 -1
- package/docs/examples/w-bar_horizontal_multi-set(color).html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set(color, gradient).html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set(series color).html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set(series color, gradient).html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set.html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackNormal).html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackPercent).html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set__hide legned.html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set__show labels.html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor(gradient).html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor.html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set_barUseInnerLabelsForHorizontal_barGroupWidthRatio.html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio.html +9 -15
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio_barGroupWidthRatio.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set(color).html +9 -15
- package/docs/examples/w-bar_horizontal_one-set(color, gradient).html +9 -15
- package/docs/examples/w-bar_horizontal_one-set.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_barColor(gradient).html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_barColor.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_barKpColor(gradient).html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_barKpColor.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_barUseInnerLabelsForHorizontal.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio_barGroupWidthRatio.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_hide labels.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_marginLeft_marginRight.html +9 -15
- package/docs/examples/w-bar_horizontal_one-set_show legned.html +9 -15
- package/docs/examples/w-bar_multi-set(color).html +9 -15
- package/docs/examples/w-bar_multi-set(color, gradient).html +9 -15
- package/docs/examples/w-bar_multi-set(series color).html +9 -15
- package/docs/examples/w-bar_multi-set(series color, gradient).html +9 -15
- package/docs/examples/w-bar_multi-set.html +9 -15
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal).html +9 -15
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal)_.html +9 -15
- package/docs/examples/w-bar_multi-set__barDisplay(stackPercent).html +9 -15
- package/docs/examples/w-bar_multi-set__hide legned.html +9 -15
- package/docs/examples/w-bar_multi-set__show labels.html +9 -15
- package/docs/examples/w-bar_multi-set_barKpColor(gradient).html +9 -15
- package/docs/examples/w-bar_multi-set_barKpColor.html +9 -15
- package/docs/examples/w-bar_multi-set_barWidthRatio.html +9 -15
- package/docs/examples/w-bar_multi-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +9 -15
- package/docs/examples/w-bar_one-set(color).html +9 -15
- package/docs/examples/w-bar_one-set(color, gradient).html +9 -15
- package/docs/examples/w-bar_one-set.html +9 -15
- package/docs/examples/w-bar_one-set_barColor(gradient).html +9 -15
- package/docs/examples/w-bar_one-set_barColor.html +9 -15
- package/docs/examples/w-bar_one-set_barKpColor(gradient).html +9 -15
- package/docs/examples/w-bar_one-set_barKpColor.html +9 -15
- package/docs/examples/w-bar_one-set_barWidthRatio.html +9 -15
- package/docs/examples/w-bar_one-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +9 -15
- package/docs/examples/w-bar_one-set_hide labels.html +9 -15
- package/docs/examples/w-bar_one-set_marginLeft_marginRight_marginTop.html +9 -15
- package/docs/examples/w-bar_one-set_show legned.html +9 -15
- package/docs/examples/w-pie_one-set(color).html +9 -15
- package/docs/examples/w-pie_one-set(color, gradient).html +9 -15
- package/docs/examples/w-pie_one-set.html +9 -15
- package/docs/examples/w-pie_one-set_hide labels.html +9 -15
- package/docs/examples/w-pie_one-set_hide legned.html +9 -15
- package/docs/examples/w-pie_one-set_marginLeft_marginRight_marginTop.html +9 -15
- package/docs/examples/w-pie_one-set_pieBorderRadius.html +9 -15
- package/docs/examples/w-pie_one-set_pieBorderWidth_pieBorderRadius.html +9 -15
- package/docs/examples/w-pie_one-set_pieKpColor(gradient).html +9 -15
- package/docs/examples/w-pie_one-set_pieKpColor.html +9 -15
- package/docs/examples/w-pie_one-set_pieThicknessRatio.html +9 -15
- package/docs/examples/w-plot-2d_default.html +9 -15
- package/docs/examples/w-plot-3d_default.html +9 -15
- package/docs/examples/w-rose_multi-set(color).html +9 -15
- package/docs/examples/w-rose_multi-set(color, gradient).html +9 -15
- package/docs/examples/w-rose_multi-set(series color).html +9 -15
- package/docs/examples/w-rose_multi-set(series color, gradient).html +9 -15
- package/docs/examples/w-rose_multi-set.html +9 -15
- package/docs/examples/w-rose_multi-set__hide legned.html +9 -15
- package/docs/examples/w-rose_multi-set__show labels.html +9 -15
- package/docs/examples/w-rose_multi-set_roseBorderWidth.html +9 -15
- package/docs/examples/w-rose_multi-set_roseKpColor(gradient).html +9 -15
- package/docs/examples/w-rose_multi-set_roseKpColor.html +9 -15
- package/docs/examples/w-rose_multi-set_roseWidthRatio.html +9 -15
- package/docs/examples/w-rose_one-set(color).html +9 -15
- package/docs/examples/w-rose_one-set(color, gradient).html +9 -15
- package/docs/examples/w-rose_one-set.html +9 -15
- package/docs/examples/w-rose_one-set_marginLeft_marginRight_marginTop.html +9 -15
- package/docs/examples/w-rose_one-set_roseBorderWidth.html +9 -15
- package/docs/examples/w-rose_one-set_roseKpColor(gradient).html +9 -15
- package/docs/examples/w-rose_one-set_roseKpColor.html +9 -15
- package/docs/examples/w-rose_one-set_roseShowLabels.html +9 -15
- package/docs/examples/w-rose_one-set_roseWidthRatio.html +9 -15
- package/docs/examples/w-rose_one-set_showLegend.html +9 -15
- package/docs/examples/w-rose_one-set_showLegend_legendPosition.html +9 -15
- package/docs/examples/w-set-multi_default.html +9 -15
- package/docs/examples/w-set-multi_hide labels.html +9 -15
- package/docs/examples/w-set-multi_hide legned.html +9 -15
- package/docs/examples/w-set-multi_keySelect.html +9 -15
- package/docs/examples/w-set-multi_slot head.html +9 -15
- package/docs/examples/w-set-multi_textPlotType_kpSelectText_widthSelect.html +9 -15
- package/docs/examples/w-set-one_default.html +9 -15
- package/docs/examples/w-set-one_hide labels.html +9 -15
- package/docs/examples/w-set-one_keySelect.html +9 -15
- package/docs/examples/w-set-one_show legned.html +9 -15
- package/docs/examples/w-set-one_slot head.html +9 -15
- package/docs/examples/w-set-one_textPlotType_kpSelectText_widthSelect.html +9 -15
- package/package.json +9 -10
- package/public/index.html +8 -12
- package/script.txt +27 -0
- package/src/App.vue +4 -4
- package/src/components/WBar.vue +4 -4
- package/src/components/WPie.vue +3 -3
- package/src/components/WPlot2d.vue +1 -1
- package/src/components/WPlot3d.vue +9 -9
- package/src/components/WRose.vue +3 -3
- package/src/components/WSetMulti.vue +6 -6
- package/src/js/genBarOpt.mjs +8 -8
- package/src/js/genPieOpt.mjs +7 -7
- package/src/js/genRoseOpt.mjs +7 -7
- package/src/js/getDefAxis.mjs +1 -1
- package/src/js/getDefChart.mjs +1 -1
- package/src/js/getDefLegend.mjs +1 -1
- package/src/js/getDefOpt.mjs +1 -1
- package/src/js/setLegendLoc.mjs +1 -1
- package/toolg/cvCasename.mjs +7 -7
- package/toolg/gDistApp.mjs +8 -8
- package/toolg/gExtractHtml.mjs +8 -8
- package/vue.config.js +1 -12
- package/docs/examples/app.html +0 -65
- package/docs/examples/app.umd.js +0 -18
- package/docs/examples/app.umd.js.map +0 -1
- 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 +0 -978
- 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 +0 -1049
- 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 +0 -157
- package/docs/getDefChart.mjs.html +0 -123
- package/docs/getDefLegend.mjs.html +0 -115
- package/docs/getDefOpt.mjs.html +0 -137
- package/docs/global.html +0 -1088
- package/docs/index.html +0 -84
- package/docs/module-WBar.html +0 -216
- package/docs/module-WPie.html +0 -216
- package/docs/module-WPlot2d.html +0 -216
- package/docs/module-WPlot3d.html +0 -216
- package/docs/module-WRose.html +0 -216
- package/docs/module-WSetMulti.html +0 -216
- package/docs/module-WSetOne.html +0 -216
- package/docs/scripts/collapse.js +0 -39
- package/docs/scripts/commonNav.js +0 -28
- package/docs/scripts/linenumber.js +0 -25
- package/docs/scripts/nav.js +0 -12
- package/docs/scripts/polyfill.js +0 -4
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/scripts/prettify/lang-css.js +0 -2
- package/docs/scripts/prettify/prettify.js +0 -28
- package/docs/scripts/search.js +0 -99
- package/docs/setLegendLoc.mjs.html +0 -176
- package/docs/styles/jsdoc.css +0 -776
- package/docs/styles/prettify.css +0 -80
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/getDefAxis.mjs.html
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
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-WPlot2d.html">WPlot2d</a></li><li><a href="module-WPlot3d.html">WPlot3d</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">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(hc) {
|
|
96
|
-
if (vDig) {
|
|
97
|
-
return dig(hc.value, vDig)
|
|
98
|
-
}
|
|
99
|
-
return hc.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 Fri Mar 22 2024 10:34:43 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>
|
|
@@ -1,123 +0,0 @@
|
|
|
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-WPlot2d.html">WPlot2d</a></li><li><a href="module-WPlot3d.html">WPlot3d</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">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', 60)
|
|
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 Fri Mar 22 2024 10:34:43 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>
|
|
@@ -1,115 +0,0 @@
|
|
|
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-WPlot2d.html">WPlot2d</a></li><li><a href="module-WPlot3d.html">WPlot3d</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">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 Fri Mar 22 2024 10:34:43 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>
|
package/docs/getDefOpt.mjs.html
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
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-WPlot2d.html">WPlot2d</a></li><li><a href="module-WPlot3d.html">WPlot3d</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">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 Fri Mar 22 2024 10:34:43 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>
|