# vue-circle-counter

> Vue compoment to create a circular counter or progress bar in SVG

Latest version **3.0.0** (published 2019-01-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-circle-counter
pnpm add vue-circle-counter
yarn add vue-circle-counter
bun add vue-circle-counter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2019-01-14 |
| First published | 2019-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 224.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Roy Prins |
| Maintainers | royprins |
| Keywords | vue, circle, counter, svg, progress bar |

## Links

- npm: https://www.npmjs.com/package/vue-circle-counter
- Repository: https://github.com/snirp/vue-circle-counter
- Homepage: https://github.com/snirp/vue-circle-counter#readme
- Issues: https://github.com/snirp/vue-circle-counter/issues
- npm.io page: https://npm.io/package/vue-circle-counter

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.5.21

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2019-01-14
- 1.0.1 — 2019-01-13

## README

# VUE CIRCLE COUNTER

This Vue component creates a circular counter. The angle, colors, strokewidth, spacing between dashes and 
direction can all be controlled through properties.

## Examples

![Examples of vue-circle-counter](https://raw.githubusercontent.com/snirp/vue-circle-counter/master/examples.png)

[Sample code on codesandbox](https://codesandbox.io/s/github/snirp/vue-circle-counter)

[Browser example on Codepen](https://codepen.io/snirp/pen/PXXpvW)

## Project setup

With a package manager
```
# npm
$ npm install vue-circle-counter

#yarn
$ yarn add vue-circle-counter
```

For the browser
```
<script src="unpkg.com/vue-circle-counter@latest/dist/circleCounter.umd.min.js"></script>
```

## How it works
The component generates an `SVG` element with default width and height of 100% (outer diameter of the counter).
Two dashed strokes are overlayed: the bottom one controlled by `stroke` and `dashCount` and the top one by 
`activeStroke` and `activeCount`. You can `reverse` the direction to counter-clockwise and `rotate` the start 
angle (default is right / 3 o'clock).

## Properties
|prop|description|default|options|
|:---|---|---|---|
|`size`|width and height of element|`10rem`|String|
|`dashCount`|Total number of dashes|`60`|Natural number|
|`activeCount`|Number of dashes on top|`10`|Natural number|
|`strokeWidth`|Bottom stroke as a percentage of the radius|`20`|`0` to `100`|
|`activeWidth`|Top stroke as a percentage of the radius|`20`|`0` to `100`|
|`stroke`|Stroke color of the bottom dashes|`lightgrey`|`color`|
|`activeStroke`|Stroke color of the top dashes|`dodgerblue`|`color`|
|`dashSpacing`|Fraction of width taken up by space between dashes|`1/4`|`0` to `1`|
|`rotate`|Degrees rotation for start angle (0 = right)|`-90`|`-360` to `360`|
|`reverse`|Reverse the direction of counting (true = counter-clockwise)|`false`|`false` or `true`|
|`text`|Text string to display inside SVG|`""`|String|

## License

MIT Open Source License

---
_Source: https://npm.io/package/vue-circle-counter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
