import React, { useRef } from 'react'
import { Bar } from 'react-chartjs-2'
import Chart from 'chart.js/auto'; //NE SURTOUT PAS SUPPRIMER CET IMPORT  

export default function StatBarChart({labels, data}) {
  return (
		<Bar 
			options={{
                redraw: true,
				responsive: true,
				interaction: {
					intersect: false,
				},
				scales: {
					x: {
						stacked: true,
					},
					y: {
						stacked: true
					}
				}
			}}
			data={{
				labels: labels,
				datasets: [
					{
						data: data,
						backgroundColor: "#FF3B30",
					},
				]
			}}
		/>
  )
}
