Skip to content

Commit

Permalink
Merge pull request #2 from sgratzl/release/v4.0.0-alpha.1
Browse files Browse the repository at this point in the history
Release v4.0.0-alpha.1
  • Loading branch information
sgratzl authored Jan 17, 2023
2 parents bec3d90 + d1081f6 commit d3daeb0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ Chart.js module for charting funnel plots. This plugin extends with a new char t

A Funnel chart is a variant of a bar chart where the bar shrinks on one side to the size of the next bar. In addition, they are usually centered giving the visual impression of a funnel.

![funnel chart]()
![funnel chart](https://user-images.githubusercontent.com/4129778/212717664-b3c63b7f-022b-4a39-953c-9d6e45265f7c.png)

Works great with https://github.com/chartjs/chartjs-plugin-datalabels

![funnel chart with labels](https://user-images.githubusercontent.com/4129778/212717832-5932802e-01d2-4da4-82eb-c4f9d3d1eebe.png)

## Related Plugins

Expand All @@ -24,14 +28,14 @@ Check out also my other chart.js plugins:
## Install

```bash
npm install --save chart.js chartjs-chart-funnel
npm install chart.js chartjs-chart-funnel
```

## Usage

see [Samples](https://github.com/sgratzl/chartjs-chart-funnel/tree/main/samples) on Github

and [![Open in CodePen][codepen]](TODO)
and [![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/eYjEXQW)

## Styling

Expand All @@ -53,9 +57,14 @@ import { FunnelController, TrapezoidElement } from 'chartjs-chart-funnel';
Chart.register(FunnelController, TrapezoidElement, LinearScale, CategoryScale);

const chart = new Chart(document.getElementById('canvas').getContext('2d'), {
type: FunnelController.id,
type: 'funnel',
data: {
// TODO
labels: ['Step 1', 'Step 2', 'Step 3', 'Step 4'],
datasets: [
{
data: [0.7, 0.66, 0.61, 0.01],
},
],
},
});
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "chartjs-chart-funnel",
"description": "Chart.js module for charting funnel charts",
"version": "4.0.0-alpha.0",
"version": "4.0.0-alpha.1",
"author": {
"name": "Samuel Gratzl",
"email": "[email protected]",
Expand Down

0 comments on commit d3daeb0

Please sign in to comment.