Skip to content

Commit

Permalink
Merge pull request #788 from Arnei/typing-barchart
Browse files Browse the repository at this point in the history
Add typing to BarChart
  • Loading branch information
lkiesow authored Jul 2, 2024
2 parents 55ef769 + 13e8654 commit 424df3e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/shared/BarChart.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import React from "react";
import { Bar } from "react-chartjs-2";
import type { ChartDataset, ChartOptions } from 'chart.js';

/**
* This component provides a bar chart for visualising (statistics) data
*/
const BarChart = ({
values,
axisLabels,
options
}: any) => {
values,
axisLabels,
options
}: {
values: ChartDataset<'bar'>,
axisLabels: string[],
options: ChartOptions<'bar'>,
}) => {
const data = {
labels: axisLabels,
datasets: [
Expand Down

0 comments on commit 424df3e

Please sign in to comment.