You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * A recreation of this demo: https://observablehq.com/@d3/bar-chart */import{Chart}from'@antv/g2';constchart=newChart({container: 'container',});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: 'dodgeX'}).encode('x','age').encode('y','population').encode('color','state').scale('y',{nice: true}).axis('y',{labelFormatter: '~s'}).legend('color',{position:'left',maxCols: 3,})chart.interaction('tooltip',{shared: true}).interaction('elementHighlightByColor',{background: true});chart.render();
/** * A recreation of this demo: https://observablehq.com/@d3/grouped-bar-chart */import{Chart}from'@antv/g2';constchart=newChart({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();
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: