Skip to content

vf1/chartjs-react-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chartjs-react-ts

A minimal React TypeScript wrapper for ChartJs provides access to the instance by ref.

Installation

npm i chartjs-react-ts OR yarn add chartjs-react-ts

import { ChartJs } from 'chartjs-react-ts'
import { Chart, <REQUIRED FEATURES> } from 'chart.js'

Chart.register(<REQUIRED FEATURES>);

const App = () => {
  const chartRef = useRef<Chart | null>(null);

  return (
    <ChartJs type='line' data={data} options={options} chartRef={chartRef}>Not supported</ChartJs>
  )
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published