使用chartjs中的设计将内容放入饼图中

问题描述

我在 React 的 Chart js 中创建了一个设计,但现在我想在它的每个托盘上输入一些图标。所以,有人可以帮我吗?请在此处查看图片https://drive.google.com/file/d/1NsS6ARTrhITQQWQRk0e55vIgBkO00CqP/view?usp=sharing

左边的图片描述了我到目前为止所做的,右边描述了我想要的。谢谢

<CCardBody className="p-0 piechart-nav">
      <CChartPie
        datasets={[
          {
            backgroundColor: [
              "rgba(0,120,210,0.8)","rgba(0,],hoverBackgroundColor: [
              "rgba(60,60,110,1)","rgba(60,data: [36,36,36],},]}
        labels={[
          "This is Business.","this is Good News.","this is ReligIoUs Service. ","this is Resource. ","this is Organization. ","this is Professional.","this is Hotel & Restaurants.","this is Music Video and Talent Show. ","this is Events. ","this is discussion & forums.",]}
        options={{
          tooltips: {
            enabled: true,bodyFontSize: 20,yPadding: 25,xPadding: 25,displayColors: false,callbacks: {
              label: function (tooltipItems,data) {
                return data.labels[tooltipItems.index];
              },yAlign: "bottom",callbacks: {
              labelColor: function (tooltipItem,chart) {
                return {
                  backgroundColor: "rgba(60,};
              },backgroundColor: "rgba(60,legend: {
            display: false,layout: {
            padding: {
              left: -0,responsive: true,maintainAspectRatio: false,}}
      />
    </CCardBody>;

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)