integration of next.js

This commit is contained in:
2023-04-04 23:06:47 -03:00
parent 4a2364cb7b
commit e5c37b9449
21 changed files with 68 additions and 396 deletions

22
components/PieCircle.tsx Normal file
View File

@@ -0,0 +1,22 @@
import React from 'react';
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js';
import { Pie } from 'react-chartjs-2';
export const PieCircle = (): JSX.Element => {
ChartJS.register(ArcElement, Tooltip, Legend);
return (
<Pie
data={{
datasets: [
{
backgroundColor: ['rgb(255, 99, 132)', 'rgb(54, 162, 235)', 'rgb(255, 205, 86)'],
data: [300, 50, 100],
hoverOffset: 4,
label: 'My First Dataset',
},
],
labels: ['Red', 'Blue', 'Yellow'],
}}
></Pie>
);
};

1
components/index.ts Normal file
View File

@@ -0,0 +1 @@
export * from './PieCircle';