0

How to set the labels & x axis and y axis colour into white here? It is coming in grey colour and I don't know why, or how to reset it to white colour .

I need my y axis which goes as "10,20,30,40,50..." font color as white, and x axis which goes as "jan,feb,mar..." font color into white, and on top there is label giving Appointment and canceled which I want its color also to be white.

 const data = {
    labels: graph,
    datasets: [
      {
        label: "Appointment",
        data: appointment,
        backgroundColor: "#6c8bff",
        Color: "white",
        // hoverBackgroundColor: "rgba(255,99,132,0.4)",
        borderColor: "#6c8bff",
        borderWidth: 1,
      },

      {
        label: "Cancelled",
        Color: "white",
        backgroundColor: "red",
        borderColor: "red",
        borderWidth: 1,
     
        data: cancelled,
      },
    ],
  };

  const options = {
    legend: {
      labels: {
        fontColor: "white",
        // fontSize: 18,
      },
    },
    scales: {
      yAxes: [
        {
          ticks: {
            fontColor: "white",
            beginAtZero: true,
          },
        },
      ],
    },
  };
 
  return (
    <>
      <Bar data={data} options={options} />
    </>
  );
}
dungarian
  • 203
  • 2
  • 8
vivek kn
  • 107
  • 1
  • 18
  • 45

0 Answers0