vue-apexcharts
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "vue-apexcharts", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Vue.js wrapper for ApexCharts", | ||
"main": "dist/vue-apexcharts.js", | ||
"scripts": { | ||
"unit": "karma start", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"bundle": "rollup src/index.js -f umd -n VueApexCharts -g apexcharts:ApexCharts -o dist/vue-apexcharts.js", | ||
@@ -28,3 +26,3 @@ "build": "npm run bundle" | ||
"dependencies": { | ||
"apexcharts": "^1.3.2" | ||
"apexcharts": "^1.4.2" | ||
}, | ||
@@ -31,0 +29,0 @@ "peerDependencies": { |
@@ -1,6 +0,6 @@ | ||
<p align="center"><img src="https://apexcharts.com/media/vue-apexcharts-logo.png"></p> | ||
<p align="center"><img src="https://apexcharts.com/media/vue-apexcharts.png"></p> | ||
<p align="center"> | ||
<a href="https://github.com/apexcharts/vue-apexcharts/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-brightgreen.svg" alt="License"></a> | ||
<!--<a href="https://travis-ci.com/apexcharts/vue-apexcharts.js"><img src="https://api.travis-ci.com/apexcharts/vue-apexcharts.js.svg?branch=master" alt="build" /></a>--> | ||
<a href="https://travis-ci.com/apexcharts/vue-apexcharts.js"><img src="https://api.travis-ci.com/apexcharts/vue-apexcharts.js.svg?branch=master" alt="build" /></a> | ||
<a href="https://www.npmjs.com/package/vue-apexcharts"><img src="https://img.shields.io/npm/v/vue-apexcharts.svg" alt="ver"></a> | ||
@@ -26,2 +26,4 @@ </p> | ||
import VueApexCharts from 'vue-apexcharts' | ||
Vue.use(VueApexCharts) | ||
``` | ||
@@ -67,3 +69,3 @@ | ||
### How do I update the chart? | ||
Simple! Just change the `series` or any `option` and it will automatically re-render the chart. Have a loot at the below example | ||
Simple! Just change the `series` or any `option` and it will automatically re-render the chart. Have a look at the below example to see this in action | ||
<p align="center"><a href="#"><img src="https://apexcharts.com/media/vue-chart-updation.gif"></a></p> | ||
@@ -124,2 +126,37 @@ | ||
## Props | ||
- __series__ - `Array` (required) | ||
The series is an array which accepts object in the following format | ||
series: [{ | ||
name: 'visitors' | ||
data: [23, 44, 56, 75, 56] | ||
}] | ||
The `data` property inside series accepts a variation of formats. To know more about the format of dataSeries, checkout [Series](https://apexcharts.com/docs/series/) docs on the website. | ||
- __type__ - `String` (required) | ||
chart type, possible values : | ||
- `line` | ||
- `area` | ||
- `bar` | ||
- `pie` | ||
- `donut` | ||
- `scatter` | ||
- `bubble` | ||
- `heatmap` | ||
- `radialBar` | ||
- __width__ - `Number` || `String` | ||
Possible values for width can be `100%` or `400px` or just 400 | ||
- __height__ - `Number` || `String` | ||
Possible values for width can be `100%` or `300px` or just 300 | ||
- __options__ - `Object` | ||
Charts's configuration object, see options on [API (Reference)](https://apexcharts.com/docs/options/chart/type/) | ||
## How to call methods of ApexCharts programatically? | ||
@@ -134,5 +171,7 @@ Sometimes, you may want to call other methods of the core ApexCharts library, and you can do so on `this.$apexcharts` global variable directly | ||
``` | ||
In the above method, `vuechart-example` is the ID of chart, `updateSeries` is the name of the method you want to call and the third parameter is the new Series you want to update. | ||
More info on the `.exec()` method can be found <a href="https://apexcharts.com/docs/methods/#exec">here</a> | ||
All other methods of ApexCharts can be called this way | ||
All other methods of ApexCharts can be called the same way. | ||
@@ -153,2 +192,12 @@ ## What's included | ||
## Running the examples | ||
Basic Examples are included to show how to get started using ApexCharts with Vue easily. | ||
To run the examples, | ||
```bash | ||
cd example | ||
npm install | ||
npm run serve | ||
``` | ||
## Development | ||
@@ -155,0 +204,0 @@ #### Install dependencies |
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
37614
20
1
212
Updatedapexcharts@^1.4.2