import React from "react";
import { Doughnut } 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 ChartDoughnut = ({ chartData }) => {
  console.log(ChartJs);
  return <Doughnut data={chartData} />;
};

export default ChartDoughnut;

ChartDoughnut.propTypes = {
  chartData: PropTypes.any,
};
