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

[v5] style.fill 设置不生效 #4667

Closed
visiky opened this issue Feb 20, 2023 · 1 comment · Fixed by #4676
Closed

[v5] style.fill 设置不生效 #4667

visiky opened this issue Feb 20, 2023 · 1 comment · Fixed by #4676
Assignees
Labels
Milestone

Comments

@visiky
Copy link
Member

visiky commented Feb 20, 2023

现象

image

复现代码

/**
 * A recreation of this demo: https://observablehq.com/@d3/bar-chart
 */
import { Chart } from '@antv/g2';

const chart = new Chart({
  container: 'container',
  autoFit: true,
});

chart.data({
  type: 'fetch',
  value:
    'https://gw.alipayobjects.com/os/bmw-prod/fb9db6b7-23a5-4c23-bbef-c54a55fee580.csv',
})

chart.interval().
  encode('x', 'letter')
  .encode('y', 1)
  .scale('y', { independent: true, range: [0, 1] })
  .axis('y', false)
  .style('fillOpacity',0.15)
  .style('fill', 'red')

chart
  .interval()
  .encode('x', 'letter')
  .encode('y', 'frequency')
  .axis('y', { labelFormatter: '.0%' });

chart.render();
@visiky visiky added the V5 label Feb 20, 2023
@pearmini pearmini self-assigned this Feb 20, 2023
@pearmini pearmini added the Bug label Feb 20, 2023
@pearmini
Copy link
Member

这个和官网的 pattern 失效应该是同一个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants