0.4.0 • Published 4 years ago

pure-vue-chart v0.4.0

Weekly downloads
68
License
MIT
Repository
github
Last release
4 years ago
<pure-vue-chart
  :points="[3,5,2,5,4]"
  :width="400"
  :height="200"
/>

Install

npm i pure-vue-chart

Import it:

import PureVueChart from 'pure-vue-chart';

Register it in your component:

components: {
    PureVueChart,
},

Use it

<pure-vue-chart
  :points="[3,5,2,5,4]"
  :width="400"
  :height="200"
/>

Options

npm.io

Most of the available props below are self-explanatory:

:points=[1,4,5,3,4]
:show-y-axis="false"
:show-x-axis="true"
:width="400"
:height="200"
:show-values="true"
:use-month-labels="true"
:months="['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez']"

Additional Features:

Trendline

You can add a simple linear trend line by using the following props:

:show-trend-line="true"
:trend-line-width="2"
trend-line-color="lightblue"

npm.io

X-axis labels:

X-axis labels, by default will be from 1 - length-of-data. But you can automatically use Months by using the prop :use-month-labels="true". Or you can provide the data as an array of objects, each with a value and label like so:

:points=[{label: 'N', value: 41.1}, {label: 'NW', value: 1}, {label: 'W', value: 15}]

This project is licensed under the MIT License but please create pull requests to improve this package together rather that copying itto another project.

0.4.0

4 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago