Skip to content

Commit

Permalink
Fix deploy error
Browse files Browse the repository at this point in the history
  • Loading branch information
Stonico committed Oct 4, 2024
1 parent a447234 commit 1d6991a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/pieChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const PieChartComponent: React.FC<PieChartComponentProps> = ({ onClose }) => {
const values = labels.map((label) => monthData[label]);

// Use fixed color mapping
const backgroundColors = labels.map(label => categoryColorMap[label]);
const backgroundColors = labels.map(label => categoryColorMap[label as keyof typeof categoryColorMap]);

setChartData({
labels,
Expand Down

1 comment on commit 1d6991a

@Stonico
Copy link
Contributor Author

@Stonico Stonico commented on 1d6991a Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure label is a valid key in categoryColorMap for type safety

Please sign in to comment.