w-highcharts-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/.github/workflows/ci-test.yml +24 -0
- package/.jsdoc +25 -0
- package/LICENSE +21 -0
- package/README.md +114 -0
- package/SECURITY.md +5 -0
- package/babel.config.js +16 -0
- package/dist/w-highcharts-vue.umd.js +7 -0
- package/dist/w-highcharts-vue.umd.js.map +1 -0
- package/docs/examples/app.html +61 -0
- package/docs/examples/app.umd.js +7 -0
- package/docs/examples/app.umd.js.map +1 -0
- package/docs/examples/w-highcharts-vue_area.html +731 -0
- package/docs/examples/w-highcharts-vue_bar.html +731 -0
- package/docs/examples/w-highcharts-vue_heatmap.html +731 -0
- package/docs/examples/w-highcharts-vue_large heatmap.html +731 -0
- package/docs/examples/w-highcharts-vue_line.html +731 -0
- package/docs/examples/w-highcharts-vue_pie.html +731 -0
- package/docs/examples/w-highstock-vue_area.html +251 -0
- package/docs/examples/w-highstock-vue_line.html +251 -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/global.html +267 -0
- package/docs/index.html +84 -0
- package/docs/iniHighcharts.mjs.html +122 -0
- package/docs/module-WHighchartsVue.html +250 -0
- package/docs/module-WHighstockVue.html +250 -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/styles/jsdoc.css +776 -0
- package/docs/styles/prettify.css +80 -0
- package/package.json +74 -0
- package/public/index.html +30 -0
- package/script.txt +24 -0
- package/src/App.vue +185 -0
- package/src/AppZoneWHighchartsVue.vue +517 -0
- package/src/AppZoneWHighstockVue.vue +161 -0
- package/src/components/WHighchartsVue.vue +45 -0
- package/src/components/WHighchartsVueAll.vue +14 -0
- package/src/components/WHighstockVue.vue +45 -0
- package/src/components/demolink.vue +123 -0
- package/src/js/iniHighcharts.mjs +50 -0
- package/src/main.js +8 -0
- package/test/all.test.mjs +10 -0
- package/toolg/addVersion.mjs +4 -0
- package/toolg/cleanFolder.mjs +5 -0
- package/toolg/cvCasename.mjs +43 -0
- package/toolg/gDistApp.mjs +34 -0
- package/toolg/gDistRollupComps.mjs +22 -0
- package/toolg/gDocExams.mjs +47 -0
- package/toolg/gExtractHtml.mjs +284 -0
- package/toolg/gMergeComps.mjs +75 -0
- package/toolg/modifyReadme.mjs +4 -0
- package/vue.config.js +27 -0
package/.editorconfig
ADDED
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'env': {
|
|
3
|
+
'browser': true,
|
|
4
|
+
'es6': true,
|
|
5
|
+
'mocha': true
|
|
6
|
+
},
|
|
7
|
+
'extends': ['plugin:vue/base', 'plugin:vue/essential', 'standard'],
|
|
8
|
+
'plugins': [
|
|
9
|
+
'vue'
|
|
10
|
+
],
|
|
11
|
+
'globals': {
|
|
12
|
+
'Atomics': 'readonly',
|
|
13
|
+
'SharedArrayBuffer': 'readonly'
|
|
14
|
+
},
|
|
15
|
+
'parser': 'vue-eslint-parser',
|
|
16
|
+
'parserOptions': {
|
|
17
|
+
'parser': '@babel/eslint-parser',
|
|
18
|
+
'ecmaVersion': 2019,
|
|
19
|
+
'sourceType': 'module',
|
|
20
|
+
},
|
|
21
|
+
'rules': {
|
|
22
|
+
'generator-star-spacing': 'off',
|
|
23
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
24
|
+
'indent': ['error', 4],
|
|
25
|
+
'no-console': 'off',
|
|
26
|
+
'comma-dangle': ['error', {
|
|
27
|
+
'arrays': 'ignore',
|
|
28
|
+
'objects': 'ignore',
|
|
29
|
+
'imports': 'never',
|
|
30
|
+
'exports': 'never',
|
|
31
|
+
'functions': 'ignore'
|
|
32
|
+
}],
|
|
33
|
+
'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 2 }],
|
|
34
|
+
//'space-before-function-paren': ['error', { 'anonymous': 'always', 'named': 'never' }],
|
|
35
|
+
'space-before-function-paren': 'off',
|
|
36
|
+
'spaced-comment': 'off',
|
|
37
|
+
'brace-style': ['error', 'stroustrup'],
|
|
38
|
+
'padded-blocks': 'off',
|
|
39
|
+
'no-constant-condition': 'off',
|
|
40
|
+
'camelcase': 'off',
|
|
41
|
+
'no-new': 'off',
|
|
42
|
+
'prefer-const': 'off',
|
|
43
|
+
'quote-props': ['error', 'consistent'],
|
|
44
|
+
'dot-notation': 'off',
|
|
45
|
+
'standard/no-callback-literal': 'off',
|
|
46
|
+
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
|
|
47
|
+
'prefer-promise-reject-errors': 'off',
|
|
48
|
+
'no-unused-vars': ['error', { 'args': 'none', 'ignoreRestSiblings': true, 'argsIgnorePattern': '^_' }],
|
|
49
|
+
'node/no-callback-literal': 'off',
|
|
50
|
+
'prefer-regex-literals': 'off',
|
|
51
|
+
'array-callback-return': 'off',
|
|
52
|
+
'no-unreachable-loop': 'off',
|
|
53
|
+
'vue/multi-word-component-names': 'off',
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Node.js CI
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
node-version: [24.x]
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: ${{ matrix.node-version }}
|
|
20
|
+
- run: npm cache clean -f
|
|
21
|
+
- run: npm install
|
|
22
|
+
- run: npm test
|
|
23
|
+
env:
|
|
24
|
+
CI: true
|
package/.jsdoc
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tags": {
|
|
3
|
+
"allowUnknownTags": false
|
|
4
|
+
},
|
|
5
|
+
"source": {
|
|
6
|
+
"include": ["src/", "server/"],
|
|
7
|
+
"includePattern": ".+\\.(js(doc|x)?|mjs|vue)$",
|
|
8
|
+
"excludePattern": "(node_modules/|docs)"
|
|
9
|
+
},
|
|
10
|
+
"plugins": [
|
|
11
|
+
"plugins/markdown",
|
|
12
|
+
"node_modules/jsdoc-vuejs"
|
|
13
|
+
],
|
|
14
|
+
"opts": {
|
|
15
|
+
"template": "node_modules/docdash",
|
|
16
|
+
"encoding": "utf8",
|
|
17
|
+
"destination": "docs/",
|
|
18
|
+
"recurse": true,
|
|
19
|
+
"verbose": true
|
|
20
|
+
},
|
|
21
|
+
"templates": {
|
|
22
|
+
"cleverLinks": false,
|
|
23
|
+
"monospaceLinks": false
|
|
24
|
+
}
|
|
25
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 semisphere(yu-da, lyu 呂昱達)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# w-highcharts-vue
|
|
2
|
+
A vue component for highcharts and highstock.
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+
[](https://github.com/vuejs/vue)
|
|
6
|
+
[](https://npmjs.org/package/w-highcharts-vue)
|
|
7
|
+
[](https://npmjs.org/package/w-highcharts-vue)
|
|
8
|
+
[](https://npmjs.org/package/w-highcharts-vue)
|
|
9
|
+
[](https://npmjs.org/package/w-highcharts-vue)
|
|
10
|
+
[](https://www.jsdelivr.com/package/npm/w-highcharts-vue)
|
|
11
|
+
|
|
12
|
+
Highcharts and vue-highcharts are bundled in this package, no need to load them from cdn.
|
|
13
|
+
|
|
14
|
+
## Documentation
|
|
15
|
+
To view documentation or get support, visit [docs](https://yuda-lyu.github.io/w-highcharts-vue/global.html).
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
To view some examples for more understanding, visit examples:
|
|
19
|
+
|
|
20
|
+
> **all components:** [web](//yuda-lyu.github.io/w-highcharts-vue/examples/app.html) [[source code](https://github.com/yuda-lyu/w-highcharts-vue/blob/master/docs/examples/app.html)]
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
### Using npm(ES6 module):
|
|
25
|
+
```alias
|
|
26
|
+
npm i w-highcharts-vue
|
|
27
|
+
```
|
|
28
|
+
Import all components:
|
|
29
|
+
```alias
|
|
30
|
+
//choose component
|
|
31
|
+
<w-highcharts-vue
|
|
32
|
+
...
|
|
33
|
+
></w-highcharts-vue>
|
|
34
|
+
|
|
35
|
+
//import
|
|
36
|
+
import WHighchartsVue from 'w-highcharts-vue'
|
|
37
|
+
|
|
38
|
+
//use
|
|
39
|
+
Vue.use(WHighchartsVue)
|
|
40
|
+
```
|
|
41
|
+
Import one component:
|
|
42
|
+
```alias
|
|
43
|
+
//choose component
|
|
44
|
+
<w-highcharts-vue
|
|
45
|
+
...
|
|
46
|
+
></w-highcharts-vue>
|
|
47
|
+
|
|
48
|
+
//import
|
|
49
|
+
import WHighchartsVue from 'w-highcharts-vue/src/components/WHighchartsVue.vue'
|
|
50
|
+
|
|
51
|
+
//component
|
|
52
|
+
Vue.component('w-highcharts-vue',WHighchartsVue)
|
|
53
|
+
//or
|
|
54
|
+
export default {
|
|
55
|
+
components: {
|
|
56
|
+
WHighchartsVue,
|
|
57
|
+
//or
|
|
58
|
+
'w-highcharts-vue': WHighchartsVue,
|
|
59
|
+
},
|
|
60
|
+
...
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### In a browser(UMD module):
|
|
65
|
+
|
|
66
|
+
Add script for vue.
|
|
67
|
+
```alias
|
|
68
|
+
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Add script for w-highcharts-vue.
|
|
72
|
+
```alias
|
|
73
|
+
<script src="https://cdn.jsdelivr.net/npm/w-highcharts-vue@1.0.0/dist/w-highcharts-vue.umd.js"></script>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Directly use:
|
|
77
|
+
```alias
|
|
78
|
+
//app and component
|
|
79
|
+
<div id="app">
|
|
80
|
+
<w-highcharts-vue
|
|
81
|
+
...
|
|
82
|
+
></w-highcharts-vue>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
//use
|
|
86
|
+
Vue.use(window['w-highcharts-vue'])
|
|
87
|
+
|
|
88
|
+
//new
|
|
89
|
+
new Vue({
|
|
90
|
+
el: '#app',
|
|
91
|
+
data: {
|
|
92
|
+
...
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Components
|
|
98
|
+
|
|
99
|
+
| component | tag | description |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| WHighchartsVue | `w-highcharts-vue` | Highcharts chart, use `options` for [highcharts settings](https://www.highcharts.com/demo) |
|
|
102
|
+
| WHighstockVue | `w-highstock-vue` | Highstock chart, use `options` for [highstock settings](https://www.highcharts.com/stock/demo) |
|
|
103
|
+
|
|
104
|
+
Use `$refs` for accessing the inner chart instance:
|
|
105
|
+
```alias
|
|
106
|
+
//template
|
|
107
|
+
<w-highcharts-vue
|
|
108
|
+
ref="hc"
|
|
109
|
+
:options="options"
|
|
110
|
+
></w-highcharts-vue>
|
|
111
|
+
|
|
112
|
+
//chart, an instance of Highcharts.Chart
|
|
113
|
+
let chart = this.$refs.hc.$refs.$self.chart
|
|
114
|
+
```
|
package/SECURITY.md
ADDED
package/babel.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'presets': [
|
|
3
|
+
['@babel/preset-env', {
|
|
4
|
+
'useBuiltIns': 'entry',
|
|
5
|
+
'corejs': 3
|
|
6
|
+
}]
|
|
7
|
+
],
|
|
8
|
+
'plugins': [
|
|
9
|
+
'@babel/plugin-transform-runtime',
|
|
10
|
+
'@babel/plugin-proposal-export-default-from',
|
|
11
|
+
// '@babel/plugin-syntax-import-assertions', //已被棄用
|
|
12
|
+
// '@babel/plugin-proposal-nullish-coalescing-operator', //browser與nodejs已支援
|
|
13
|
+
// '@babel/plugin-proposal-object-rest-spread', //browser與nodejs已支援
|
|
14
|
+
// '@babel/plugin-proposal-optional-chaining', //browser與nodejs已支援
|
|
15
|
+
]
|
|
16
|
+
}
|