push rasad front on new repo
This commit is contained in:
18
src/components/chart-pie/ChartPie.js
Normal file
18
src/components/chart-pie/ChartPie.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from "react";
|
||||
import { Pie } from "react-chartjs-2";
|
||||
import { Chart as ChartJs } from "chart.js/auto";
|
||||
import { PropTypes } from "prop-types";
|
||||
import { defaults } from "chart.js";
|
||||
|
||||
defaults.font.family = "iranyekan";
|
||||
|
||||
const ChartPie = ({ chartData }) => {
|
||||
console.log(ChartJs);
|
||||
return <Pie data={chartData} />;
|
||||
};
|
||||
|
||||
export default ChartPie;
|
||||
|
||||
ChartPie.propTypes = {
|
||||
chartData: PropTypes.any,
|
||||
};
|
||||
Reference in New Issue
Block a user