# re-chartjs-wrapper

> React wrapper for Chart.js charts.

Latest version **0.3.2** (published 2020-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install re-chartjs-wrapper
pnpm add re-chartjs-wrapper
yarn add re-chartjs-wrapper
bun add re-chartjs-wrapper
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2020-05-06 |
| First published | 2020-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kangasta |

## Links

- npm: https://www.npmjs.com/package/re-chartjs-wrapper
- Repository: https://github.com/kangasta/re-chartjs-wrapper
- Homepage: https://github.com/kangasta/re-chartjs-wrapper#readme
- Issues: https://github.com/kangasta/re-chartjs-wrapper/issues
- npm.io page: https://npm.io/package/re-chartjs-wrapper

## Dependencies (3)

- [chart.js](https://npm.io/package/chart.js.md) ^2.9.3
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.7.7
- [@types/chart.js](https://npm.io/package/@types/chart.js.md) ^2.9.15

## Recent versions

- 0.3.2 (latest) — 2020-05-06
- 0.3.1 — 2020-03-16
- 0.3.0 — 2020-03-16
- 0.2.0 — 2020-03-15

## README

# re-chartjs-wrapper

[![Build Status](https://travis-ci.org/kangasta/re-chartjs-wrapper.svg?branch=master)](https://travis-ci.org/kangasta/re-chartjs-wrapper)
[![Maintainability](https://api.codeclimate.com/v1/badges/0e79b63ce1479c8c06b6/maintainability)](https://codeclimate.com/github/kangasta/re-chartjs-wrapper/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/0e79b63ce1479c8c06b6/test_coverage)](https://codeclimate.com/github/kangasta/re-chartjs-wrapper/test_coverage)

React wrapper for Chart.js charts.

## Installing

```bash
npm install re-chartjs-wrapper
```

## Usage

`type`, `data`, and `options` can be passed in as separate props or as `configuration` object. If some property is passed both in a separate prop and in configuration, the value fron configuration is used.

Custom id for chart and be passed in as `id` prop. If no id is given, an random six character string with `chart-` prefix is generated and used as the id.

In addition to these five props: `id`, `type`, `data`, `options`, and `configuration`, any props of `<canvas/>` can be given in. These additional props will be passed down to the `<canvas/>` component.

```jsx
import { Chart } from 're-chartjs-wrapper';

<Chart configuration={configuration}/>
<Chart type={type} data={data} options={options}/>
```

## Testing

For linting and unit tests, run:

```bash
# Linting
npm run lint
npm run lint -- --fix

# Unit tests
npm test
npm test -- --verbose --coverage
```

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