You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PrimeReact Polar Chart(Chart.js 3.0)如何移除环形上的刻度数字

你想要移除的极坐标环形上的数字是径向轴(r轴)的刻度标签,在Chart.js 3.x版本中,只需要在径向轴的ticks配置项中添加display: false即可隐藏。

修改后的完整配置如下:

const config = {
  plugins: {
    legend: {
      position: "top",
      align: "center",
      display: false,
      labels: {
        color: "#495057",
        font: {
          fontFamily: "Josefin Sans",
          fontSize: 8
        },
        legend: {
          position: "start",
          title: {
            display: true,
            text: "Legend Title"
          }
        },
        position: "center"
      }
    }
  },
  scale: {
    r: {
      min: 0,
      max: 100,
      title: {
        align: "left"
      },
      grid: {
        color: "#ebedef"
      },
      ticks: {
        stepSize: 10,
        display: false // 新增这一行即可隐藏径向刻度数字
      }
    }
  },
};

如果后续需要调整刻度的样式、间距等属性,也可以直接在r.ticks配置项中修改对应参数即可。

内容的提问来源于stack exchange,提问作者charan p.v

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.04 22:36:03