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

Regarding the issue with clicking on the price line #1715

Open
ZhangPeibin opened this issue Oct 25, 2024 · 1 comment
Open

Regarding the issue with clicking on the price line #1715

ZhangPeibin opened this issue Oct 25, 2024 · 1 comment

Comments

@ZhangPeibin
Copy link

ZhangPeibin commented Oct 25, 2024

Hello everyone, I have a requirement in my Vue project where I need to display tooltips when clicking on the K-line chart. However, when I use subscribeClick to implement this, the crosshair does not appear on mobile devices.
` chart.subscribeClick((param: any) => {
const result = !showMobileKlineDetails.value;
if (result) {
const x = param.point.x;
const screenWidth = window.innerWidth;

    if (x < screenWidth / 2) {
      position.value = { right: '48px', left: null } as any;
    } else {
      position.value = { left: '48px', right: null } as any;
    }
  } 
  showMobileKlineDetails.value = result;
});`

I also implemented tooltips display during movement by subscribing to subscribeCrosshairMove
image

Currently, this feature works fine in a desktop browser, but on mobile, the crosshair does not appear when using subscribeClick.

Please help me ! Thank you very much !

@ZhangPeibin
Copy link
Author

No one can help me ?

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

No branches or pull requests

1 participant