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

[Feature] Adjacent crosshairs must be close together #1567

Closed
da730 opened this issue Nov 21, 2023 · 1 comment · Fixed by #1641
Closed

[Feature] Adjacent crosshairs must be close together #1567

da730 opened this issue Nov 21, 2023 · 1 comment · Fixed by #1641
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@da730
Copy link
Contributor

da730 commented Nov 21, 2023

What problem does this feature solve?

image Adjacent crosshairs must be close together with no gaps, just like 3.x: image

What does the proposed API look like?

need to be discussed

@kkxxkk2019
Copy link
Collaborator

kkxxkk2019 commented Nov 29, 2023

1.7.3 会对 type: 'rect' 类型的 �line 上的 width 属性支持回调,回调将会返回该 crosshair 对应轴的信息,可以根据轴信息动态计算,如:

crosshair: {
  xField: {
    line: {
      type: 'rect',
      width: ({width}, axis) => {
         return (width / axis.getScale().ticks().length);
     } 
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants