iOSPlot
iOSPlot copied to clipboard
Line Chart crashes when it's changed to the Landscape mode
Hi, Thanks for the great contribution in advance. The crashing point is the line 107 of the drawRect: message in PCLineChartView.m.
I am using it under iOS5.1 target.
Any idea?
What is the console output when it crashes? Have you placed a breakpoint to inspect the value of formatString
and y_axis
?
See the screenshot below.
The screenshot doesn't show the console :/
My guess is that it's got something to do with that really tiny value for power
I am sorry that there were no ouput through the console, see the screen shot below when the app crashes.
Thanks.
OK well it is failing in the stringWithFormat method. It is because the value of power
is too large. My guess is that power is never initialised as self.autoscaleYAxis
is true. See around line 80 where power is declared, change that to int power = 0;
.
Hi trici, It works by initializing int power local variable with 0. Thanks so much for tracking it down. Should I made a pull request for this fix or will you? Let me know.
You are welcome. I can't approve the pull request, as it is not my repo! Hopefully @honcheng will approve it :)
Hi Ricardo, I made the pull request for honcheng. Thank you so much for your help.
On Tuesday, June 4, 2013, Ricardo Santos wrote:
You are welcome. I can't approve the pull request, as it is not my repo! Hopefully @honcheng https://github.com/honcheng will approve it :)
— Reply to this email directly or view it on GitHubhttps://github.com/honcheng/iOSPlot/issues/20#issuecomment-18951747 .
Guysung Kim [email protected] [email protected] www.vsym.com www.lifeservant.com
www.webfca.com
Oh I see! Doh. Send a link to your app when it's finished - I want to see this graph now!
Hi Ricard, Any problem with my pull request? Let me know if there is.
For now, I don't really have an App for this iOSPlot and just want to research and keep a possible graph library for future work.
Thanks for your help again.
trici I had this same problem and have been working on this graph for 5 days! Setting the power to 0 worked right away. Thank you so much for your input on this page!!!