The Wayback Machine - https://web.archive.org/web/20200912023213/https://github.com/SeregPie/VueChart
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

VueChart

A simple wrapper for Chart.

demo

Try it out!

dependencies

setup

npm

npm i @seregpie/vue-chart

ES module

Register the component globally.

import Vue from 'vue';
import VueChart from '@seregpie/vue-chart';

Vue.component(VueChart.name, VueChart);

or

Register the component in the scope of another component.

import VueChart from '@seregpie/vue-chart';

export default {
  components: {
    [VueChart.name]: VueChart,
  },
};

browser

<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
<script src="https://unpkg.com/chart.js/dist/Chart.min.js"></script>
<script src="https://unpkg.com/@seregpie/vue-chart"></script>

The component is globally available as VueChart. If Vue is detected, the component will be registered automatically.

usage

<vue-chart
  style="width: 800px; height: 600px;"
  :data="chartData"
  :options="{scales: {yAxes: [{ticks: {beginAtZero: true}}]}}"
  :update-config="{duration: 2000, easing: 'easeOutBounce'}"
  type="bar"
/>

properties

property type description
data Object The data of the chart.
options Object The configuration options of the chart of the current type.
type String The type of the chart. Changing the value will recreate the chart.
updateConfig Object The additional configuration for the update process.
You can’t perform that action at this time.