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

https://github.com/taenykim/interactive-chart

πŸ“ˆ πŸ“‰ push datas and make interactive chart πŸ“Š
https://github.com/taenykim/interactive-chart

canvas chart interactive javascript line-chart pie-chart svg

Last synced: 4 months ago
JSON representation

πŸ“ˆ πŸ“‰ push datas and make interactive chart πŸ“Š

Awesome Lists containing this project

README

          

# Interactive Chart

![npm](https://img.shields.io/npm/v/interactive-chart)
![dependencies](https://img.shields.io/badge/dependencies-none-brightengreen)

πŸ“ˆ πŸ“‰ push datas and make interactive chart πŸ“Š

## Demo

https://interactive-chart.vercel.app/

## Charts

|Line Chart `canvas`|Pie Chart `svg`|
|--|--|
|![](./images/screenshot.png)|![](./images/screenshot2.png)|
| drag / move / resize / minimap / tooltip | hovering / highlighting / information circle|

## How to use

```bash
npm i interactive-chart
```

```js
// Line Chart
new Line({
selector: "root", // DOM element id,
chartTitle: "Accountbook Line Chart", // chart title
data, // chart data
});

// Pie Chart
new Pie({
selector: "root", // DOM element id,
chartTitle: "Accountbook Line Chart", // chart title
data, // chart data
offsetMonth: 11 // current focusing month
});
```

```json
// data type
[
{
"month": 11,
"data": [
{
"date": 1,
"data": [
{ "type": "용돈", "amount": 3000 },
{ "type": "μƒν™œ", "amount": -30000 },
{ "type": "μ‡Όν•‘/λ·°ν‹°", "amount": -10000 }
]
},
{
"date": 2,
"data": [
{ "type": "μƒν™œ", "amount": -30000 },
{ "type": "식비", "amount": -50000 },
{ "type": "μ›”κΈ‰", "amount": 5000 }
]
},
...
```