Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

条形图的背景有属性吗? #5109

Closed
Pentium286 opened this issue May 29, 2023 · 1 comment
Closed

条形图的背景有属性吗? #5109

Pentium286 opened this issue May 29, 2023 · 1 comment

Comments

@Pentium286
Copy link

image

G2plot里有,但是和G2的设置的数据结构不一样

@hustcc
Copy link
Member

hustcc commented May 29, 2023

image

// 这里是背景 shape
chart
  .interval()
  .encode('x', 'month')
  .encode('y', () => 1)
  .scale('y', { independent: true, domain: [0, 1] })
  .scale('x', { independent: true })
  .axis('y', false)
  .axis('x', false)
  .style('fill', 'red')
  .style('opacity', '0.1')
  .style('pointerEvents', 'none') // 不响应事件
  ;

也可以直接看 DEMO

@antvis antvis locked and limited conversation to collaborators May 29, 2023
@hustcc hustcc converted this issue into discussion #5110 May 29, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants