Skip to content

Replies

0
shivashankar
shivashankar answered on Jun 7, 2012 1:04 PM

Hi Nikolai,

                   I managed to make the code work manually yesterday. I got a sample from your documentation, but had to change the linking files as they were pointing to your older resources that starts with 'ig.xxx'.

                   As for the iPhone's webView, I think the loader does not work for the following reason:

In an iPhone's webview, while linking the source files in the html, the path to the files must not be mentioned. i.e; for example,

<script src="../scripts/modernizr.min.js"></script>

must be written as,

<script src="modernizr.min.js"></script>

I opened the loader js file and saw that all the other js files are accessed using the filepaths. Therefore they are not being included in the html to render the controls.

 

I think, If you could write a seperate loader for iPhone, by including only the filenames (without the paths), your jQuery solution will work on native applications in a breeze. This can be very useful and all you need to do is publish a seperate loader file for iPhone webViews. I hope my suggestion helps.

Thanks for your help.

regards,

Shiva

0
shivashankar
shivashankar answered on Jun 5, 2012 7:12 AM

Hi Nikolai,

                   Thank you for your response. You have provided me with the code to link the source files to the pie chart html file. Is there a sample code as to generate the chart using these manually loaded files? Because, the code that i have right now is as follows:

        $.ig.loader({
        scriptPath: "js/",
            cssPath: "css/",
            resources: "igPieChart"
        });

        $.ig.loader(function () {
            data = [{ "Budget": 60, "Label": "Administration" }, { "Budget": 40, "Label": "Sales" }, { "Budget": 60, "Label": "IT" }, { "Budget": 40, "Label":

"Marketing" }, { "Budget": 60, "Label": "Development" }, { "Budget": 20, "Label": "Support"}];

            $('#chart1').igPieChart({
                dataSource: data,
                width: '155px',
                height: '155px',
                valueMemberPath: 'Budget',
                labelMemberPath: 'Label',
                explodedSlices: '0 1',
                radiusFactor: .8,
                legend: { element: 'legend1', type: "item" }
            });

 

<div id="chart1"></div>
<div id="legend1"></div>

As you see, the code invokes the loader function to generate the chart by passing the parameters.We require a similar function in the above js files to generate the chart.

 

Also, about the first part of my question. Isn't there a way to use the loader js  to generate the chart in the webview of iphone then? Is manual the only option?

Thank you.