import React from "react";
import { Bar } 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 ChartBar = ({ chartData, options }) => {
  console.log(ChartJs);
  return <Bar data={chartData} options={options} maintainAspectRatio="true" />;
};

export default ChartBar;

ChartBar.propTypes = {
  chartData: PropTypes.any,
  options: PropTypes.any,
};
