Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

饼形图折现提示文字颜色怎么更改, #3311

Closed
wed1760617 opened this issue Mar 3, 2021 · 2 comments
Closed

饼形图折现提示文字颜色怎么更改, #3311

wed1760617 opened this issue Mar 3, 2021 · 2 comments

Comments

@wed1760617
Copy link

image

@yangguansen
Copy link
Contributor

参考label的配置

@pearmini
Copy link
Member

可以参考文档这里:https://g2.antv.vision/zh/docs/api/general/geometry#geomlabel

chart
  .interval()
  .position('percent')
  .color('item')
  .label('percent', {
    style:{
      fill: 'red'
    },
    content: (data) => {
      return `${data.item}: ${data.percent * 100}%`;
    },
  })
  .adjust('stack');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants