Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boatx/chartjs

Pie charts JavaScript library
https://github.com/boatx/chartjs

babel canvas es6 javascript pie-charts webpack

Last synced: about 1 month ago
JSON representation

Pie charts JavaScript library

Awesome Lists containing this project

README

        

# ChartJS

Pie charts JavaScript library.

## Build

To build call:
```bash
webpack
```

## Usage

```javascript
const elements = {
dogs: 0.3,
cats: 0.6,
dinosaurs: 0.1,
};

const colors = {
dogs: 'green',
cats: 'blue',
dinosaurs: 'red',
};

const canvas = document.getElementById('can');
const chart = new PieChart(elements, colors, canvas);
chart.draw();
```