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

没有设置 color 通道的时候展示 size 和 opacity 等通道的图例 #4915

Closed
pearmini opened this issue Apr 25, 2023 · 0 comments
Closed
Assignees
Labels

Comments

@pearmini
Copy link
Member

pearmini commented Apr 25, 2023

  • 版本:5.03
  • 默认 color、size 和 opacity 可以从主题里面取默认值。

image

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants