Skip to content

Commit

Permalink
ChartJS: Fix components not being found
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Jul 6, 2023
1 parent 41ceac9 commit 1ef07da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/src/components/projectStats/contributorsStats.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import React from 'react';
import { Doughnut, Bar } from 'react-chartjs-2';
import {
Chart as ChartJS,
ArcElement,
BarElement,
CategoryScale,
Legend,
LinearScale,
Title,
Tooltip,
} from 'chart.js';
import { FormattedMessage, useIntl } from 'react-intl';

import messages from './messages';
Expand All @@ -10,6 +20,7 @@ import { useContributorStats } from '../../hooks/UseContributorStats';
import { StatsCardContent } from '../statsCard';

export default function ContributorsStats({ contributors }) {
ChartJS.register(BarElement, CategoryScale, Legend, LinearScale, Title, Tooltip, ArcElement);
const intl = useIntl();
const stats = useContributorStats(contributors.userContributions);
const getUserLevelLabel = (level) => intl.formatMessage(userMessages[`mapperLevel${level}`]);
Expand Down

0 comments on commit 1ef07da

Please sign in to comment.