# chartsjs-plugin-data-labels

> Plugin for ChartJS to draw labels on charts

Latest version **0.1.5** (published 2017-02-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install chartsjs-plugin-data-labels
pnpm add chartsjs-plugin-data-labels
yarn add chartsjs-plugin-data-labels
bun add chartsjs-plugin-data-labels
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2017-02-01 |
| First published | 2017-01-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Bpium |
| Maintainers | garipov, mallchel |
| Keywords | chartsjs, plugin, labels |

## Links

- npm: https://www.npmjs.com/package/chartsjs-plugin-data-labels
- Repository: https://github.com/garipov/chartsjs-plugin-data-labels
- Homepage: https://github.com/garipov/chartsjs-plugin-data-labels#readme
- Issues: https://github.com/garipov/chartsjs-plugin-data-labels/issues
- npm.io page: https://npm.io/package/chartsjs-plugin-data-labels

## Dependencies (2)

- [chart.js](https://npm.io/package/chart.js.md) ^2.4.0
- [lodash.defaults](https://npm.io/package/lodash.defaults.md) ^4.2.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2017-02-01
- 0.1.4 — 2017-02-01
- 0.1.3 — 2017-01-30
- 0.1.2 — 2017-01-27
- 0.1.1 — 2017-01-26
- 0.1.0 — 2017-01-26

## README

[![npm](https://img.shields.io/npm/v/chartsjs-plugin-data-labels.svg?style=flat-square)](https://www.npmjs.com/package/chartsjs-plugin-data-labels)
# chartsjs-plugin-data-labels
Plugin for ChartJS to draw labels on charts
## Installation
You can download the latest version of Plugin for ChartJS to draw labels on charts from the [GitHub releases](https://github.com/garipov/chartsjs-plugin-data-labels)  

To install via npm:  
```
npm i chartsjs-plugin-data-labels
```
## Configuration
To configure this plugin, you can simply add the following entries to your chart options:  

| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| `display` | `Boolean` | `true` | `true` to enable this graph, else `false` to disable it for the associated graph.
| `fontSize` | `Number` | `Chart.defaults.global.defaultFontSize` |
| `fontStyle` | `String` | `Chart.defaults.global.defaultFontStyle` |
| `fontFamily` | `String` | `Chart.defaults.global.defaultFontFamily` |
| `color` | `String` | `Chart.defaults.global.defaultFontColor` | One color for all labels.
| `colors` | `Array` | `[]` | It takes a set of values for each labels. If not specified, the default color.
| `minRadius` | `Number` | `35` | The minimum radius, in pixels, in which even the labels are displayed (for pie charts).

For example:
```
datasets: [
  {
    dataLabels: {           //  disabled by default
        colors: ['#fff', '#ccc', '#000'], //  Array colors for each labels
        minRadius: 30, //  minimum radius for display labels (on pie charts)
    }
  }
]
```
Please see JSBin: https://jsbin.com/joponil/4/edit

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