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

Weird Redrawing of Chart #99

Open
niclego opened this issue May 15, 2023 · 0 comments
Open

Weird Redrawing of Chart #99

niclego opened this issue May 15, 2023 · 0 comments

Comments

@niclego
Copy link

niclego commented May 15, 2023

I have been playing around with SingleLineLollipop.swift and noticed this weird redrawing behavior. I set a break point on line 42 and then run the example on my device/sim ( either doesn't matter ). Every time I touch the screen and drag, the break point gets triggered and the app pauses. At first I thought, ok this makes sense, the selectedElement state var updates, and the chart needs to redraw the chartBackground. No problem. But as you can imagine this isn't ideal... for large data sets I noticed there is a delay / animation hitch when the user drags her finger across the chart. So I thought to extract the state var and the chartBackground to a separate view. But no matter how I extract them, the chart ALWAYS redraws. How can I create a view like you have in the chart background that has data about the x value the user is currently touching and have it update without the whole chart updating?

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