@sebgroup/green-react-charts
v1.3.0
Published
React charts wrapper built on top of @sebgroup/green-charts.
Downloads
58
Readme
Green React Charts
React Green charting components
Install
yarn add @sebgroup/green-react-charts
npm install -S @sebgroup/green-react-charts
Use
First you need to import the base styles for charts:
@use '~@sebgroup/green-charts/scss';
Then you can start using the Chart react component:
import { Chart, ChartSettings } from '@sebgroup/green-react-charts'
export const MyChart = () => {
const settings: ChartSettings = {
title: 'My mixed chart',
data: [
{
title: 'Sales',
type: 'bar',
columns: [100, 200, 300, -50],
},
{
title: 'Prognosis',
type: 'spline',
columns: [0, 10, 150, 330],
},
],
categories: ['Jan', 'Feb', 'Mar', 'Apr'],
}
return <Chart settings={settings} />
}