A Vue.js component for Snake Chart(90deg rotated line chart basically)
Generated using vue-cli-template-library.
npm install vue-d3-snake-chart
vue-d3-snake-chart can be used as a module in both CommonJS and ES modular environments.
When in non-modular environment, vue-d3-snake-chart will register all the components to vue by itself.
//
// You can register a component manually
//
import { SnakeChart } from 'vue-d3-snake-chart';
export default {
...
components: {
SnakeChart
},
...
};
//
// or register the whole module with vue
//
import ModuleLibrary from 'vue-d3-snake-chart';
// Install this library
Vue.use(ModuleLibrary);
//
// You can register a component manually
//
var Vue = require('vue');
var ModuleLibrary = require('vue-d3-snake-chart');
var YourComponent = Vue.extend({
...
components: {
'snake-chart': ModuleLibrary.SnakeChart
},
...
});
//
// or register the whole module with vue
//
var Vue = require('vue');
var ModuleLibrary = require('vue-d3-snake-chart');
// Install this library
Vue.use(ModuleLibrary);
<script src="path/to/vue/vue.min.js"></script>
<script src="path/to/vue-d3-snake-chart/dist/vue-d3-snake-chart.min.js"></script>
<!-- Components are registered globally -->
<snake-chart></snake-chart>
See the GitHub release history.