w-plot-vue
v1.0.7
Published
A plot component for vue(vue2).
Downloads
10
Readme
w-plot-vue
A plot component for vue(vue2).
Documentation
To view documentation or get support, visit docs.
Example
To view some examples for more understanding, visit examples:
all components: web [source code]
Installation
Using npm(ES6 module):
Note: w-plot-vue is mainly dependent on
w-component-vue
andwsemi
.
npm i w-plot-vue
Import all components:
//choose component
<w-plot-2d
...
></w-plot-2d>
//import
import WPlotVue from 'w-plot-vue'
//use
Vue.use(WPlotVue)
Import one component:
//choose component
<w-plot-2d
...
></w-plot-2d>
//import
import WPlot2d from 'w-plot-vue/src/components/WPlot2d.vue'
//component
Vue.component('w-plot-2d',WPlot2d)
//or
export default {
components: {
WPlot2d,
//or
'w-plot-2d': WPlot2d,
},
...
}
In a browser(UMD module):
Note: umd file of
w-plot-vue
is mainly dependent onvue
.
[Necessary] Add script for w-plot-vue.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/w-plot-vue.umd.js"></script>
Directly use:
//app and component
<div id="app">
<w-plot-2d
...
></w-plot-2d>
</div>
//use
Vue.use(window['w-plot-vue'])
//new
new Vue({
el: '#app',
data: {
...
}
})