diff --git a/src/components/charts/barChart.jsx b/src/components/charts/barChart.jsx deleted file mode 100644 index 8ce8751..0000000 --- a/src/components/charts/barChart.jsx +++ /dev/null @@ -1,78 +0,0 @@ -import { Empty, Spin } from 'antd'; -import { - BarElement, - CategoryScale, - Chart as ChartJS, - Legend, - LinearScale, - PointElement, - TimeScale, - Title, - Tooltip, -} from 'chart.js'; -import { merge } from 'lodash'; -import { Bar } from 'react-chartjs-2'; - -ChartJS.register( - CategoryScale, - Legend, - LinearScale, - BarElement, - PointElement, - TimeScale, - Title, - Tooltip, -); - -function BarChart({ title, options, data }) { - const baseOptions = { - responsive: true, - maintainAspectRatio: false, - scales: { - x: { - type: 'time', - stacked: true, - }, - y: { - stacked: true, - ticks: { - precision: 0, - }, - }, - }, - plugins: { - legend: { - labels: { - usePointStyle: true, - }, - }, - tooltip: { - usePointStyle: true, - }, - }, - }; - - return ( -
-

{title}

- {/* eslint-disable-next-line no-nested-ternary */} - {data ? ( - data.labels.length === 0 ? ( -
- -
- ) : ( -
- -
- ) - ) : ( -
- -
- )} -
- ); -} - -export default BarChart;