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

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

Closed
1 task
zailushang5011 opened this issue Apr 14, 2022 · 1 comment
Closed
1 task

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

zailushang5011 opened this issue Apr 14, 2022 · 1 comment

Comments

@zailushang5011
Copy link

  • 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 -
@hustcc
Copy link
Member

hustcc commented Jun 22, 2022

可以描述下 bug 是什么吗?

@hustcc hustcc closed this as completed Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants