JSPM

  • Created
  • Published
  • Downloads 803
  • Score
    100M100P100Q105760F
  • License MIT

chartjs helper utils

Package Exports

  • stz-chart-maker
  • stz-chart-maker/defaults/plugins

Readme

stz-chart-maker

Chart.js 기반의 차트 생성 도구

using npm :

    npm install stz-chart-maker
    npm install -D stz-chart-maker

api Docs

📚 API 문서

example

const chartConfig = ChartWrapper
                    .create('bar', data.labels , data.datasets, {})
                    .addDataLabels(true)
                    .addZoom(true)
                    .build('mixed-chart');

return (
<div>
  <Chart type={chartConfig.type} data={chartConfig.data} options={chartConfig.options} />
</div>
);

Quick Start

import { ChartWrapper } from 'stz-chart-maker';
import { Chart } from 'react-chartjs-2';

const chart = ChartWrapper
  .create('bar', ['A', 'B', 'C'], [{ data: [10, 20, 30] }])
  .addZoom(true)
  .addDataLabels(true)
  .build('basic-bar');

<Chart {...chart} />;