vue-svg-charts
Lightweight Vue components for drawing pure svg charts without external dependencies.
Features
- Pure SVG. Vue is only used for calculations.
- No external dependencies
Installation
1. Install via yarn
or npm
OR
2. Import and use vue-svg-charts
- ES6
Usage
Basic usage
With sane defaults in place, basic usage is as simple as passing a points
array of values bar-graph
component.
Usage with all the available props
Props
width
- type:
Number
- default:
680
- Width of the graph. Can be any positive value.
height
- type:
Number
- default:
320
- Height of the graph. Can be any positive value.
title
- type:
String
- default: ``
- Title to set for the graph (is display on hover).
points
- type:
Array
- default:
[]
- Values to display.
labels
- type:
Array
- default:
[]
- Lables related to values array.
showValues
- type:
Boolean
- default:
false
- Specifies whether the graph should display values on top of bar.
animated
- type:
Boolean
- default:
true
- Specifies whether the graph should be animated by transition.
animDuration
- type:
String
- default:
1s
- SVG animation duration.