antvis/G2

Do you want to work on this issue?

You can request for a bounty in order to promote it!

【v5】连续型图例在小数精度上滑动失效 #5531

Deathsteps posted onGitHub

问题描述

正常滑动 <img width="699" alt="image" src="https://github.com/antvis/G2/assets/1549118/a8e055b3-cef2-45f8-99b6-562f25b81511">

间隔小数时,滑动失效

期望结果

连续图例筛选可以正常处理精度,要么就在某个精度下,提示不可筛选

如何重现

官方代码修改

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

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

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

chart.data(data);

chart
  .interval()
  .encode('x', 'time')
  .encode('y', 'waiting')
  .encode('color', 'people')
  .axis('y', { title: 'Waiting', titleFill: '#5B8FF9' });

chart.render();

额外信息

  • G2 5.1.1 版本

不能拖回来是指不能复原吗?

posted by pearmini over 1 year ago

就是拖不了了,一直显示灰条,滑块在最左

posted by Deathsteps over 1 year ago

有大佬看这个问题吗?加急

posted by Calmio-Y over 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests