PDA

View Full Version : a view which displays data from web




moonraker928
Dec 22, 2008, 10:58 PM
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?



a5sk4s
Dec 23, 2008, 01:39 AM
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.