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

[玉珏图] 当某一数据项 value 为 undefined 时,页面崩溃 #2161

Closed
liuzhenying opened this issue Dec 30, 2020 · 0 comments · Fixed by #2168
Closed

[玉珏图] 当某一数据项 value 为 undefined 时,页面崩溃 #2161

liuzhenying opened this issue Dec 30, 2020 · 0 comments · Fixed by #2168

Comments

@liuzhenying
Copy link
Member

  • G2Plot Version: 2.3.5
  • Platform:
  • Mini Showcase(like screenshots):
  • CodePen Link:

复现代码

import { RadialBar } from '@antv/g2plot';

const data = [
  { name: 'X6', star: 297 },
  { name: 'G' },
  { name: 'AVA', star: 805 },
  { name: 'G2Plot', star: 1478 },
  { name: 'L7', star: 2029 },
  { name: 'G6', star: 7100 },
  { name: 'F2', star: 7346 },
  { name: 'G2', star: 10178 },
];

const bar = new RadialBar('container', {
  width: 400,
  height: 300,
  data,
  xField: 'name',
  yField: 'star',
  // maxAngle: 90, //最大旋转角度,
  radius: 0.8,
  innerRadius: 0.2,
  tooltip: {
    formatter: (datum) => {
      return { name: 'star数', value: datum.star };
    },
  },
});
bar.render();

运行以上代码后,页面崩溃

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