Files
shuffle-cracked/frontend/src/components/HealthBarChart.jsx
T
2024-11-30 15:28:19 +01:00

23 lines
559 B
React

import React from 'react';
import { Bar } from 'react-chartjs-2';
const HealthBarChart = (props) => {
const { globalUrl, filteredData, options, onBarClick } = props;
return (
<Bar
data={filteredData}
options={options}
height="35.5rem"
width={filteredData.width}
getElementAtEvent={(elements) => {
if (elements && elements.length > 0) {
onBarClick(elements);
}
}}
/>
);
};
export default HealthBarChart;