vue-charts
Base on Vue2, wrapper for ChartJs.
-Vue js
-Chart js
-Work well with Laravel
Render a Chart Easily
-Single Line
-Multiple Bar
-Multiple Mix Chart
Features
-Single Chart
-Multiple Chart
-Multiple Mix Chart
-Override Datasets
-Override Option
-Pass Json data
-DataBinding & Auto Render
Document and Demo
Home page
Line
Bar
Horizontal Bar
Radar
Polar Area
Pie
Doughnut
DataBinding
Jsondata
NPM Package
Install
npm install hchs-vue-charts
or
yarn add hchs-vue-charts
Notice
- vue-charts base on Vue 2
- vue-charts base on Chart.js 2
How to use --- dist & CDN
1.build a page
2.Done!
dist&CDN Demo
How to use --- Laravel Elixir
1.Checkout your gulpfile.js in your laravel project
const elixir = ; ; /* |-------------------------------------------------------------------------- | Elixir Asset Management |-------------------------------------------------------------------------- | | Elixir provides a clean, fluent API for defining some basic Gulp tasks | for your Laravel application. By default, we are compiling the Sass | file for our application, as well as publishing vendor resources. | */ ;
2.open your app.js
/** * First we will load all of this project's JavaScript dependencies which * include Vue and Vue Resource. This gives a great starting point for * building robust, powerful web applications using Vue and Laravel. */ //By default the bootstrap file will require('vue'); ; // chartjs package ; // vue-charts package ; Vue; /** * Next, we will create a fresh Vue application instance and attach it to * the page. Then, you may begin adding components to this application * or customize the JavaScript scaffolding to fit your unique needs. */ Vue; const app = el: '#app' ;
3.run gulp in your laravel project
gulp
4.modify your wellcome.blade.php or where you want to show the chart
- give vue root id
- add line chart component
- don't forget your script source
<!--line chart component--> Laravel Documentation Laracasts News Forge GitHub <!--set script src-->
5.Done
Thanks
@yeknava - Horizontal Bar