# d3sparkline

> Creates Sparkline using d3

Latest version **1.0.0** (published 2018-05-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install d3sparkline
pnpm add d3sparkline
yarn add d3sparkline
bun add d3sparkline
```

## 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 | 1.0.0 |
| Published | 2018-05-30 |
| First published | 2018-05-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sudaman Shrestha |
| Maintainers | sudaman |
| Keywords | sparkline |

## Links

- npm: https://www.npmjs.com/package/d3sparkline
- Repository: https://github.com/sudazzle/d3sparkline
- Homepage: https://github.com/sudazzle/d3sparkline#readme
- Issues: https://github.com/sudazzle/d3sparkline/issues
- npm.io page: https://npm.io/package/d3sparkline

## Dependencies (1)

- [d3](https://npm.io/package/d3.md) ^5.4.0

## Recent versions

- 1.0.0 (latest) — 2018-05-30

## README

Sparkline with tooltip based on d3 library.
## Install
npm install d3sparkline --save
## How to use it?
Without Animation
```
let options = {
  containerElement: '#containerElement',
  width: 120,
  height: 25,
  arraySize: 40,
  data: [1,3,6,7,8,9,0,3,6,13,45,67,89,34,1,3,6,7,8,9,0,3,6,13,45,67,89,34,80,34,45,34,45,65,76,67,12,34,56,34]
}

new Sparkline(options);
```
With Animation
```
let options = {
  containerElement: '#test',
  width: 120,
  height: 25,
  arraySize: 40,
}

const sparkline = new Sparkline(options);
setInterval(() => {
  sparkline.updateLine(Math.floor((Math.random() * 100) + 1));
}, 1000);
```

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