我无法在 react-chart-js3 中将标签的位置更改为底部。它现在显示在图表的顶部。
import React, { useState, useEffect } from "react";
import { Doughnut, Line, Pie } from "react-chartjs-3";
export default function UserDashboard() {
const DoughData = {
labels: ["Red", "Green", "Yellow"],
datasets: [
{
data: [300, 50, 100],
backgroundColor: ["#FF6384", "#36A2EB", "#FFCE56"],
hoverBackgroundColor: ["#FF6384", "#36A2EB", "#FFCE56"],
},
],
};
return (
<div>
<Doughnut data={DoughData} />
</div>
);
}