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

【v5】折线图断掉的地方往后,label 不显示了 #5165

Closed
Deathsteps opened this issue Jun 7, 2023 · 1 comment · Fixed by #5175
Closed

【v5】折线图断掉的地方往后,label 不显示了 #5165

Deathsteps opened this issue Jun 7, 2023 · 1 comment · Fixed by #5175
Assignees
Labels

Comments

@Deathsteps
Copy link
Contributor

问题描述

image

期望结果

线可以断了再续,label 应该也一样

如何重现

官方代码修改

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

const data = [
  { time: '10:10', call: 4, waiting: 2, people: 2 },
  { time: '10:15', call: 2, waiting: 6, people: 3 },
  { time: '10:20', call: 13, waiting: 2 },
  { time: '10:25', call: 9, waiting: 9, people: 1 },
  { time: '10:30', call: 5, waiting: 2, people: 3 },
  { time: '10:35', call: 8, waiting: 2, people: 1 },
  { time: '10:40', call: 13, waiting: 1, people: 2 },
];

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

chart.data(data);

chart
  .line()
  .encode('x', 'time')
  .encode('y', 'people')
  .encode('shape', 'smooth')
  .label({ text: 'people' });

chart.render();

额外信息

  • G2 5.0.11
@pearmini pearmini self-assigned this Jun 8, 2023
@pearmini pearmini added the Bug label Jun 8, 2023
@hustcc
Copy link
Member

hustcc commented Jun 8, 2023

https://github.com/antvis/G2#L105-L107

这里 concat 第二个参数有问题。

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

Successfully merging a pull request may close this issue.

3 participants