Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonraker928

macrumors newbie
Original poster
Dec 22, 2008
1
0
hey,
so i am trying to output a pie chart on one of the pages in my iphone app. one method i am attempting is to create a space on the iphone page which retrieves the display on a webpage which links to the google charts API

ex:

the blank iphone screen of my app will show a pie chart based on the pie chart that is shown when you visit: http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World

what are some ways i can go about accomplishing this line of thinking? or is there a much easier iPhone specific API i can use? other strategies?

i used the UICatalog sample code the SDK provided and edited the WebView section by replacing the http://www.apple.com URL with the one shown above and ran the app. nothing was shown on my screen, which means the content on that URL was not processed - why did this happen?
 
Problem seems to be "Hello|World". I'm not sure what the recommended URL encoding method is, but using "Hello%7CWorld" worked. The vertical bar is considered an unsafe character, hence the issue.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.