Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7924243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:40:02+00:00 2026-06-03T17:40:02+00:00

I’m trying to embed a column3d chart from fusioncharts in my MonoTouch project using

  • 0

I’m trying to embed a column3d chart from fusioncharts in my MonoTouch project using UIWebView. I’ve added the necessary outlets and tested by using loadrequest to load a url and loadHtmlString to format a simple line of text. This works fine. I even tested that fusionchart works correctly on my browser using the below code and it does.

I have a folder named “charts” in my MonoTouch project that contains, Column3d.swf, jquery.min.js, FusionCharts.js, FusionCharts.HC.js and FusionCharts.HC.Charts.js.

In my

  • ViewDidLoad

    string htmlString = "<html>
                         <head>
                         <script type=\"text/javascript\"src=\"Charts/jquery.min.js\">
                         </script>
                         <script type=\"text/javascript\" src=\"Charts/FusionCharts.js\">
                         </script>
                         <script type=\"text/javascript\" src=\"Charts/FusionCharts.HC.js\">
                         </script>
                         <script type=\"text/javascript\" src=\"Charts/FusionCharts.HC.Charts.js\">
                         </script>
                         </head>
                         <body>
                         <div id=\"chartContainer\">FusionCharts will load here!
                         </div>
                         <script type=\"text/javascript\"> var myChart = new FusionCharts( \"Charts/Column3D.swf\", \"myChartId\", \"400\", \"300\", \"0\", \"1\" );myChart.setXMLUrl(\"Charts/Data.xml\");
                        myChart.render(\"chartContainer\");
                         </script>
                         </body>
                         </html>";
    
    this.webView.LoadHtmlString (htmlString, new NSUrl ("./Charts", true));
    
        /*string htmlString = "<html><head></head><body><span style=\"font-weight: bold;\">This</span> " +
     "<span style=\"text-decoration: underline;\">is</span> <span style=\"font-style: italic;\">some formatted</span> " +"<span style=\"font-weight: bold;text-decoration: underline;\">text!</span><br></body></html>";*/  //works
    
        //this.webView.LoadHtmlString (htmlString, null);  //works
    
  • Data.xml

    <chart caption='Weekly Sales Summary'
    xAxisName='Week' yAxisName='Amount' numberPrefix='$'> 
    <set label='Week 1' value='14400' /> 
    <set label='Week 2' value='19600' /> 
    <set label='Week 3' value='24000' /> 
    <set label='Week 4' value='15700' /> 
    </chart>
    

Can someone explain how I can get this working? Thanks in advance.

EDIT: I also tried

    string htmlString = "<html><head> <title>Creating Pure JavaScript chart</title><script type=\"text/javascript\" src=\"charts/FusionCharts.js\"></script></head> <body><div id=\"chartContainer\">FusionCharts will load here!</div> <script type=\"text/javascript\">FusionCharts.setCurrentRenderer('javascript');var myChart = new FusionCharts( \"charts/Column3D.swf\", \"myChartId\", \"400\", \"300\", \"0\", \"1\" );myChart.setXMLData(\"<chart><set label='Data1' value='1' /></chart>\"); myChart.render(\"chartContainer\"); </script></body> </html>";

where i force the renderer to use javascript and set the chart parameters in the string to no avail. Anyone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:40:03+00:00Added an answer on June 3, 2026 at 5:40 pm

    I solved my issue and thought I would post it should someone run into a similar issue.

    The first thing I did was to right click on each of my javscript files ie FusionCharts.js, FusionCharts.HC.js and FusionCharts.HC.Charts.js and set their build type to content.

    I then told Monotouch the build path for the charts would be contained in the charts folder by declaring

    string path = NSBundle.MainBundle.BundlePath + "/Charts/";
    

    Since I declare i am going to look in the Charts folder for related files, I then had to amend my htmlString by removing the “charts” keyword reference from all the “src” as below (since we are already lo.

    string htmlString = "<html>
                     <head>
                     <script type=\"text/javascript\" src=\"jquery.min.js\">
                     </script>
                     <script type=\"text/javascript\" src=\"/FusionCharts.js\">
                     </script>
                     <script type=\"text/javascript\" src=\"/FusionCharts.HC.js\">
                     </script>
                     <script type=\"text/javascript\" src=\"FusionCharts.HC.Charts.js\">
                     </script>
                     </head>
                     <body>
                     <div id=\"chartContainer\">FusionCharts will load here!
                     </div>
                     <script type=\"text/javascript\"> var myChart = new FusionCharts(\"Column3D.swf\", \"myChartId\", \"400\", \"300\", \"0\", \"1\"          );myChart.setXMLUrl(\"Charts/Data.xml\");
                    myChart.render(\"chartContainer\");
                     </script>
                     </body>
                     </html>";
    

    I then call the loadHtml string method as below with the second argument pointing to the path that contains the javascript files.

    this.webView.LoadHtmlString(htmlString, new NSUrl(path, true));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.