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

limit line real time update #1755

Closed
wajihkm opened this issue Oct 31, 2016 · 5 comments
Closed

limit line real time update #1755

wajihkm opened this issue Oct 31, 2016 · 5 comments

Comments

@wajihkm
Copy link

wajihkm commented Oct 31, 2016

Thanks for this nice library.

I added a limit line to a CombinedChart,
1

it's dashed line labeled (average speed).
I added some new entries to line chart data and updated the limit of limitline
limitLine.limit = newSpeedAvg
this updated the line x position but still related to the initial canvas hieght,
So the last view was this:
2

So is this a bug or an error in my code ?
Thanks

@danielgindi
Copy link
Collaborator

What's the problem exactly? The y-axis changes? That's normal, if you added entries with higher Ys. You can limit the viewport to only show part of the axis, and force the user to scroll.

@wajihkm
Copy link
Author

wajihkm commented Oct 31, 2016

The problem is as you see,
the new limit value is 32.34
But the line draw on near 80 value

@hhanesand
Copy link

@wajihkm Try removing the limit line and adding it back to the graph each time you change the limit!

@liuxuan30
Copy link
Member

liuxuan30 commented Jan 10, 2017

Since you changed the value, you can call setNeedsDisplay() to redraw the limit line, though it's a heavy op. Removing is also a good idea, since the overhead is less.

@NallapatiMalleswari
Copy link

How to draw Gradient limit line

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

5 participants