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

5纬雷达图显示问题 #6473

Open
yuedud opened this issue Sep 23, 2024 · 0 comments
Open

5纬雷达图显示问题 #6473

yuedud opened this issue Sep 23, 2024 · 0 comments

Comments

@yuedud
Copy link

yuedud commented Sep 23, 2024

问题描述

image 代码 import { Chart } from '@antv/g2';

const data = [
{ item: 'Design', type: 'a', score: 70 },
{ item: 'Design', type: 'b', score: 30 },
{ item: 'Development', type: 'a', score: 60 },
{ item: 'Development', type: 'b', score: 70 },
{ item: 'Marketing', type: 'a', score: 50 },
{ item: 'Marketing', type: 'b', score: 60 },
{ item: 'Users', type: 'a', score: 40 },
{ item: 'Users', type: 'b', score: 50 },
{ item: 'Test', type: 'a', score: 60 },
{ item: 'Test', type: 'b', score: 70 },
];

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

chart.coordinate({ type: 'polar' });

chart
.data(data)
.scale('x', { padding: 0.5, align: 0 })
.scale('y', { tickCount: 5 })
.axis('x', { grid: true })
.axis('y', { zIndex: 1, title: false });

chart
.area()
.encode('x', 'item')
.encode('y', 'score')
.encode('color', 'type')
.encode('shape', 'smooth')
.style('fillOpacity', 0.1)
.scale('y', { domainMax: 80 });

chart
.line()
.encode('x', 'item')
.encode('y', 'score')
.encode('color', 'type')
.encode('shape', 'smooth')
.style('lineWidth', 2);

chart.interaction('tooltip', { crosshairsLineDash: [4, 4] });

chart.render();

重现链接

https://g2.antv.antgroup.com/examples/general/radar/#grid-radial

重现步骤

进入官网,复制粘贴
5纬度的雷达图有多余的线

预期行为

没有多余的线

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

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

1 participant