Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

当数据量只有一条的时候,折线图上没有点,没有任何交互内容 #5669

Closed
lxzy-yun opened this issue Oct 20, 2023 · 1 comment

Comments

@lxzy-yun
Copy link

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

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

chart
  .line()
  .data([
    {date: '2',close: 23}
  ])
  .encode('x', 'date')
  .encode('y', 'close');

chart.render();

当数据量只有一条的时候,折线图上没有点,没有任何交互内容
image

请问是特意设计还是有是bug?
版本号是5.1.5

@pearmini
Copy link
Member

这个正常的现象,因为:一个点没有办法绘制一条线

@antvis antvis locked and limited conversation to collaborators Oct 23, 2023
@pearmini pearmini converted this issue into discussion #5671 Oct 23, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants