-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
图例定位左侧后maxRows失效,maxCol显示有问题 #5724
Comments
提供代码 |
/**
* A recreation of this demo: https://observablehq.com/@d3/grouped-bar-chart
*/
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
autoFit: true,
});
chart.title({
title: 'Population by age and state',
subtitle: 'It shows the population of U.S. by age and state.',
});
chart
.interval()
.data({
type: 'fetch',
value:
'https://gw.alipayobjects.com/os/bmw-prod/f129b517-158d-41a9-83a3-3294d639b39e.csv',
format: 'csv',
})
.transform({ type: 'sortX', by: 'y', reverse: true, slice: 6 })
.transform({ type: 'dodgeX' })
.encode('x', 'state')
.encode('y', 'population')
.encode('color', 'state')
.scale('y', { nice: true })
.axis('y', { labelFormatter: '~s' })
.legend('color',{
position:'left',
})
chart
.interaction('tooltip', { shared: true })
.interaction('elementHighlightByColor', { background: true });
chart.render(); |
【BENcorry 认领】 |
4 tasks
closed by: #5945 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AntV Open Source Contribution Plan(可选)
Issue 类型
高级任务
任务介绍
使得以下图表图例正常绘制:
参考说明
出现问题的可能原因:
G2/src/runtime/layout.ts
Line 70 in c525480
The text was updated successfully, but these errors were encountered: