chart.xkcd-vue
chart.xkcd component for Vue.
Read the documentation for more information.
what's chart.xkcd?
Chart.xkcd is a chart library plots “sketchy”, “cartoony” or “hand-drawn” styled charts. Check out the Check out the documentation for more instructions and links.
Requirements
- Vue >= 2.0.0
- chart.xkcd >= 1.0.8
Installation
You must install chart.xkcd at first.
npm i -S chart.xkcd
① Install from NPM
npm i -S chart.xkcd-vue
<script>
② Install from
When chart.xkcd-vue is included by <script>
, it will be installed automatically if window.Vue
and window.chartXkcd
exists, ohterwise you should to install it manually by calling Vue.use(window.chartXkcdVue["default");
Use
Before you use it, you need to register components. There are two ways to register components
① Register all components
Register components at the main entry.
All must be prefixed with chartxkcd-
// ↓↓↓ will auto register all chart.xkcd component.Vue
② Register a single component
Register components at the main entry.
Vue
Using components in templates
If you register a component at the entrance, you can use it as follows