Skip to content

Commit

Permalink
fix chart data type error
Browse files Browse the repository at this point in the history
  • Loading branch information
waldowred5 committed Jun 10, 2024
1 parent eabe112 commit 35ed928
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Observations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface IObservationsProps {
}

export const Observations = ({ observationsData, isLoading, chartTheme }: IObservationsProps) => {
const [chartData, setChartData] = useState<ChartData<'line'>>({ datasets: [] });
const [chartData, setChartData] = useState<ChartData<'line', { x: string; y: number; }[]>>({ datasets: [] });

useEffect(() => {
if (observationsData) {
Expand Down Expand Up @@ -60,7 +60,7 @@ export const Observations = ({ observationsData, isLoading, chartTheme }: IObser
borderColor: chartTheme === 'light' ? '#FF00D3' : '#828CF8',
pointBackgroundColor: chartTheme === 'light' ? '#683FFF' : '#319ACC',
pointBorderColor: chartTheme === 'light' ? '#683FFF' : '#319ACC',
}]
}],
});
}
}, [observationsData]);
Expand Down

0 comments on commit 35ed928

Please sign in to comment.