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

Crosshair doesn't work on touch devices #511

Closed
timocov opened this issue Jul 6, 2020 · 7 comments · Fixed by #512
Closed

Crosshair doesn't work on touch devices #511

timocov opened this issue Jul 6, 2020 · 7 comments · Fixed by #512
Assignees
Labels
bug Unexpected problem or unintended behavior.
Milestone

Comments

@timocov
Copy link
Contributor

timocov commented Jul 6, 2020

I have created a short example to show the issues. The chart works on desktop and ipad, but not on iphone:
https://florian-kittel.github.io/lightweightCharts-mobile-debug/

Setup is as basisc as possible. I used the public version from mentioned production build from the docs.

Repo link if intrested in the code:
https://github.com/florian-kittel/lightweightCharts-mobile-debug/tree/master

When changing the chart version back to 2.0.0 cross-hair on mobile will work in this example.

Originally posted by @florian-kittel in #434 (comment)

@timocov timocov added the bug Unexpected problem or unintended behavior. label Jul 6, 2020
@timocov timocov added this to the 3.2 milestone Jul 6, 2020
@timocov
Copy link
Contributor Author

timocov commented Jul 6, 2020

For me it looks like this:

image

And I can't move the crosshair.

@timocov timocov self-assigned this Jul 6, 2020
@timocov
Copy link
Contributor Author

timocov commented Jul 6, 2020

Found a bug. Will fix shortly.

timocov added a commit that referenced this issue Jul 6, 2020
@timocov timocov mentioned this issue Jul 6, 2020
3 tasks
@timocov timocov modified the milestones: 3.2, 3.1.2 Jul 6, 2020
@timocov
Copy link
Contributor Author

timocov commented Jul 6, 2020

Version 3.1.2 with the fix is just published.

timocov added a commit that referenced this issue Jul 6, 2020
@florian-kittel
Copy link

Thanks for fixing. Works fine.

@Rishabh-Streak
Copy link

Rishabh-Streak commented Jul 31, 2020

@timocov i am using version 3.1.2 i have disabled handleScroll and handleScale and i am using charts in android phone inside webview and crosshair touchDrag doesn't work.

my current chart options looks like this
{
localization: {
dateFormat: 'yyyy/MM/dd'
},
width,
height,
priceScale: {
scaleMargins: {
top: 0.35,
bottom: 0.2
},
borderVisible: false
},
timeScale: {
borderVisible: false
},
grid: {
horzLines: {
color: '#eee',
visible: false
},
vertLines: {
color: '#ffffff'
}
},
crosshair: {
horzLine: {
visible: false,
labelVisible: false
},
vertLine: {
visible: true,
style: 0,
width: 2,
color: 'rgba(32, 38, 46, 0.1)',
labelVisible: false
}
},
handleScroll: {
mouseWheel: true,
pressedMouseMove: false,
horzTouchDrag: true
},
handleScale: false
}

@timocov
Copy link
Contributor Author

timocov commented Aug 3, 2020

@Rishabh-Streak that's about #434 (comment)?

@Rishabh-Streak
Copy link

@Rishabh-Streak that's about #434 (comment)?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants