G2 icon indicating copy to clipboard operation
G2 copied to clipboard

legend独显切换配合label的limit-in-plot有bug

Open zailushang5011 opened this issue 3 years ago • 1 comments

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://g2.antv.vision/zh/examples/interaction/component#legend-active

Steps to reproduce

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

// 默认已经加载 legend-active 交互 const data = [ { company: 'Apple', type: '整体', value: 1 }, { company: 'Facebook', type: '整体', value: 35 }, { company: 'Google', type: '整体', value: 28 }, { company: 'Apple', type: '非技术岗', value: 1 }, { company: 'Facebook', type: '非技术岗', value: 65 }, { company: 'Google', type: '非技术岗', value: 47 }, { company: 'Apple', type: '技术岗', value: 1 }, { company: 'Facebook', type: '技术岗', value: 18 }, { company: 'Google', type: '技术岗', value: 20 }, { company: 'Apple', type: '技术岗', value: 1 }, { company: 'Facebook', type: '技术岗', value: 30 }, { company: 'Google', type: '技术岗', value: 25 } ];

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

chart.data(data);

chart.scale('value', { nice: true });

chart.legend({ position: 'top', radio: { style: { width: 12 } } });

chart .interval() .position('type*value').color('company') .adjust([{ type: 'dodge', marginRatio: 0 }]) .label('value', { layout: [ { type: 'interval-hide-overlap' }, { type: 'adjust-color' }, { type: 'limit-in-plot' }, ] });

chart.render(); 截屏2022-04-14 上午11 01 36 截屏2022-04-14 上午11 02 02 截屏2022-04-14 上午11 03 02

Environment Info
g2 4.1.46
System -
Browser -

zailushang5011 avatar Apr 14 '22 03:04 zailushang5011

可以描述下 bug 是什么吗?

hustcc avatar Jun 22 '22 02:06 hustcc