import { getRandomColorGenerated } from '../../../utility/Utils'

const transformToChartData = (dataset=[]) => ({
    labels: dataset.map(ele => ele.EducatorName),
    datasets: [
      {
        label: '# of Patients',
        data: dataset.map(ele => ele.PatientCount),
        backgroundColor: dataset.map(ele => getRandomColorGenerated( ele.EducatorName, 0.2)),
        borderColor: dataset.map(ele => getRandomColorGenerated( ele.EducatorName)),
        borderWidth: 1,
      },
    ],
  });
  
  const options = {
    indexAxis: 'y',
    
  };

  export {  transformToChartData, options}