-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
moveViewToX problem #450
Comments
Nobody has an idea ? |
Well you opened another on SO: http://stackoverflow.com/questions/33038795/display-last-items-of-a-bar-chart-on-ios-charts/33049374#33049374 subclass the chart view, call moveViewToX() somewhere in the chart view code, like the last line of drawRect(), to see if it works; If you are familiar with ChartTransformer, there is a method called refresh in ChartViewPortHandler, it should be able to navigate to anywhere as long as you know how to play with the matrix. Check out this post:#226 EDIT:
|
Actually it should work, as it is deferred already to the rendering code. בתאריך יום שבת, 10 באוקטובר 2015, Xuan [email protected] כתב:
|
Hi Daniel, |
@Begoodi what Daniel means is that call moveViewToX after you set your chart data. What's your purpose? Directly show 90-100 when the chart pop up, or first show 1-10 and then 90-10? For the former one, have you tried it, plus my suggestions? For the latter one, there is a pending request #318 for animate moveViewToX. |
Hi Liuxuan30, thanks for your answer. My purpose is to directly show 90-100 when the chart pop up. Calling moveViewToX after setting the data does not work, it still shows 1-10, and if I have to touch the barograph to display 90-100 (why I don't know). I tried to subclass and use it in drawRect(), but didn't succeed, had lots of different errors. It must be my fault, not newbie, bur nearly ;) I found a workaround by putting "barChartView.hidden = true" after calculations in viewDidLoad(), then in viewDidAppear() I use the moveViewToX function and then put "barChartView.hidden = true". The drawback is that I can't use the animation functions, because animations are done on values 1-10, and I hided this part of the display... |
I guess you may want to learn more about the code, it seems possible to manipulate it if you know how to play with the matrix, viewpor handler, etc. |
How to set view of chart to the endDuring the chart configuration just find the last entry in
|
I have a bar chart with 100 items. I only display 10 at a time, and I enabled scrolling.
Everything is fine, but I would like to display the end of my graph instead of the beginning (fresh datas).
The only way to do it is to use the moveViewToX function in viewDidAppear.
The problem is that the graph is first displayed and animated at the beginning, then goes to the end, which is not very beautiful.
How can I do to display directly the graph at the right position ?
(When I move the moveViewToX function elsewhere than in viewDidAppear it does not work).
Thanks :)
The text was updated successfully, but these errors were encountered: