interactive-chart

push data and make interactive chart

Usage no npm install needed!

<script type="module">
  import interactiveChart from 'https://cdn.skypack.dev/interactive-chart';
</script>

README

Interactive Chart

npm dependencies

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

Demo

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

Line Chart

make chart with Canvas

Pie Chart

make chart with SVG

How to use

npm i interactive-chart
// 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
});
// 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 }
        ]
      },
      ...