Skip to content

Commit

Permalink
Fix Project Stats page crash issue for archived projects
Browse files Browse the repository at this point in the history
- Register `CategoryScale` & `LinearScale` in ChartJS
- Fixes #6131
  • Loading branch information
royallsilwallz committed Jan 24, 2024
1 parent 6147ada commit b1b542d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/projectStats/contributorsStats.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Chart as ChartJS, ArcElement, BarElement } from 'chart.js';
import { Chart as ChartJS, ArcElement, BarElement, CategoryScale, LinearScale } from 'chart.js';
import { Doughnut, Bar } from 'react-chartjs-2';
import { FormattedMessage, useIntl } from 'react-intl';

Expand All @@ -10,7 +10,7 @@ import { formatChartData, formatTooltip } from '../../utils/formatChartJSData';
import { useContributorStats } from '../../hooks/UseContributorStats';
import { StatsCardContent } from '../statsCard';

ChartJS.register(ArcElement, BarElement);
ChartJS.register(ArcElement, BarElement, CategoryScale, LinearScale);

export default function ContributorsStats({ contributors }) {
const intl = useIntl();
Expand Down

0 comments on commit b1b542d

Please sign in to comment.