📊 Vue.js wrapper for sChart.js
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7b1f93f Apr 25, 2018
Permalink
Failed to load latest commit information.
example '更新v1.0.0' Apr 25, 2018
src '更新v1.0.0' Apr 25, 2018
.gitignore Add vue-schart v0.1.1 May 27, 2017
LICENCE add LICENCE and update readme May 30, 2017
README.md '更新readme.md' Apr 25, 2018
package.json '兼容移动端使用' Apr 17, 2018

README.md

vue-schart

📊 Vue.js wrapper for sChart.js

Downloads Version License

Support for use at the mobile. Support vue.js 1.x & 2.x

interactive demo

Usage

Install:

npm install vue-schart -S

Use in component:

<template>
    <div id="app">
        <schart class="wrapper" :canvasId="canvasId" :type="type" :data="data" :options="options"></schart>
    </div>
</template>
<script>
import Schart from 'vue-schart';
	export default {
		data() {
			return {
				canvasId: 'myCanvas',
				type: 'bar',
				data: [
					{name: '2014', value: 1342},
					{name: '2015', value: 2123},
					{name: '2016', value: 1654},
					{name: '2017', value: 1795},
				],
				options: {
					title: 'Total sales of stores in recent years'
				}
			}
		},
		components:{
			Schart
		}
	}
</script>

<style>
.wrapper{
	width: 7rem;
	height: 5rem;
}
</style>

Options

Refer to the documentation for sChart.js.

Demo

demo

License

MIT license.