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

[Bug]: Point标记在设置shape为triangleDown和hollowTriangleDown的时候显示形状不正确 #6693

Closed
2 of 10 tasks
interstellarmt opened this issue Mar 20, 2025 · 3 comments · Fixed by #6697
Closed
2 of 10 tasks
Labels
bug 🐛 Something isn't working

Comments

@interstellarmt
Copy link
Contributor

Describe the bug / 问题描述

import { Chart } from '@antv/g2';

const chart = new Chart({
  container: 'container',
  autoFit: true,
});

chart
  .point()
  .data({
    type: 'fetch',
    value:
      'https://gw.alipayobjects.com/os/basement_prod/6b4aa721-b039-49b9-99d8-540b3f87d339.json',
  })
  .encode('x', 'height')
  .encode('y', 'weight')
  .encode('color', 'gender')
  .encode('shape','triangleDown')

chart.render();

Image

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@interstellarmt interstellarmt added the waiting for maintainer Triage or intervention needed from a maintainer label Mar 20, 2025
@interstellarmt interstellarmt changed the title [Bug]: Point标记在设置shape为triangleDown和hollowTriangleDown的时候显示不正确 [Bug]: Point标记在设置shape为triangleDown和hollowTriangleDown的时候显示形状不正确 Mar 20, 2025
@interstellarmt interstellarmt added bug 🐛 Something isn't working and removed waiting for maintainer Triage or intervention needed from a maintainer labels Mar 20, 2025
@interstellarmt
Copy link
Contributor Author

legend中的符号是正确的,point下的显示不符合预期

@BQXBQX
Copy link
Contributor

BQXBQX commented Mar 22, 2025

Image Image

问题在于 symbol 的命名格式,TriangleDown 使用了 triangle-down 但是 Symbols 中用了 triangleDown,统一一下即可

Image

@hustcc
Copy link
Member

hustcc commented Mar 22, 2025

可以兼容下,都支持掉,antv util 中应该有这个字符串方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants