antvis/G2
The issue has been closed
没有设置 color 通道的时候展示 size 和 opacity 等通道的图例 #4915
pearmini posted onGitHub
- 版本:5.03
- 默认 color、size 和 opacity 可以从主题里面取默认值。
import { Chart } from '@antv/g2';
const chart = new Chart({
container: 'container',
theme: 'classic',
});
chart
.point()
.data({
type: 'fetch',
value:
'https://gw.alipayobjects.com/os/basement_prod/6b4aa721-b039-49b9-99d8-540b3f87d339.json',
})
.encode('x', 'height')
.encode('y', 'weight')
.encode('size', 'weight');
chart.render();