首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何删除蚂蚁设计甜甜圈图中的工具提示

如何删除蚂蚁设计甜甜圈图中的工具提示
EN

Stack Overflow用户
提问于 2022-05-08 11:39:23
回答 1查看 498关注 0票数 1

我试图删除@ant-设计/绘图中的甜甜圈图中的工具提示。

我尝试将tooltip:false传递给没有工作的label对象。

代码语言:javascript
复制
const config = {
    appendPadding: 10,
    data,
    angleField: 'value',
    colorField: 'type',
    radius: 1,
    innerRadius: 0.6,
    label: {
    tooltip:false,
      type: 'inner',
      offset: '-50%',
      content: '{value}',
      style: {
        textAlign: 'center',
        fontSize: 14,
      },
    },
    interactions: [
      {
        type: 'element-selected',
      },
      {
        type: 'element-active',
      },
    ],
    statistic: {
      title: false,
      content: {
        style: {
          whiteSpace: 'pre-wrap',
          overflow: 'hidden',
          textOverflow: 'ellipsis',
        },
        content: 'AntV\nG2Plot',
      },
    },
  };

EN

回答 1

Stack Overflow用户

发布于 2022-05-08 12:08:28

工具提示:false应该在config对象中

工具提示是API接口中绘图组件下的一个属性。

若要删除工具提示,应将其直接传递到config对象中。

代码语言:javascript
复制
const config = {
    tooltip:false,
    appendPadding: 10,
    data,
    angleField: 'value',
    colorField: 'type',
    radius: 1,
    innerRadius: 0.6,
    label: {
      type: 'inner',
      offset: '-50%',
      content: '{value}',
      style: {
        textAlign: 'center',
        fontSize: 14,
      },
    },
    interactions: [
      {
        type: 'element-selected',
      },
      {
        type: 'element-active',
      },
    ],
    statistic: {
      title: false,
      content: {
        style: {
          whiteSpace: 'pre-wrap',
          overflow: 'hidden',
          textOverflow: 'ellipsis',
        },
        content: 'AntV\nG2Plot',
      },
    },
  };
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72160612

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档