Updated to react-chartjs-2 3.3

This commit is contained in:
Alejandro Celaya
2022-03-07 17:39:03 +01:00
parent 61b094ee7d
commit 8551fcf08f
5 changed files with 20 additions and 23 deletions

View File

@@ -57,8 +57,8 @@ export const DoughnutChart: FC<DoughnutChartProps> = memo(({ stats }) => {
<div className="col-sm-12 col-md-7">
<Doughnut
height={300}
data={chartData}
options={options}
data={chartData as any}
options={options as any}
ref={(element) => {
setChartRef(element ?? undefined);
}}

View File

@@ -113,8 +113,8 @@ export const HorizontalBarChart: FC<HorizontalBarChartProps> = (
const renderChartComponent = (customKey: string) => (
<Bar
key={`${height}_${customKey}`}
data={chartData}
options={options}
data={chartData as any}
options={options as any}
height={height}
getElementAtEvent={chartElementAtEvent(labels, onClick) as any}
/>

View File

@@ -222,8 +222,8 @@ const LineChartCard = (
};
const renderLineChart = () => (
<Line
data={generateChartData()}
options={options}
data={generateChartData() as any}
options={options as any}
getElementAtEvent={chartElementAtEvent(labels, datasetsByPoint, setSelectedVisits) as any}
/>
);