Sign in to follow this  
Sharath Pannala

Fusion Chart MSLine.swf using javascript problem

Recommended Posts

Hi,

 

I'm using javascript to render the MSLine fusion chart. I'm using Chrome. The problem is I'm not able to see the line after rendering.Please see the attached file.

post-62796-0-42603700-1404220252_thumb.png

 

I tried many sample line chart xml's but none of them is working.

 

The sample code what I tried is below:

 

function BindMSLineChart()
    {
        var value = document.getElementById('selectWeekMSLine').value;
        $.ajax({
            url: '@Url.Action("XMLLineChart", "Home")?weekNo=' + value,
            type: "POST",
            cache: false,
            success: function (data) {                     
                FusionCharts.setCurrentRenderer('javascript');
                var myLineChart = new FusionCharts("MSLine.swf", "Chart02", "800", "600", "0", "1");               
                myLineChart.setXMLUrl("data.xml");
                myLineChart.render("MSLinechartContainer");
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest.responseText);
            }
        });
    }

 

 

 

The sample XML file(data.xml) :

 

<chart caption="Weather Report" subcaption="Temperature" xaxisname="Month" yaxisname="Degree  (in Fahrenheit)" palette="3" bgcolor="FFFFFF" canvasbgcolor="66D6FF" canvasbgalpha="5" canvasborderthickness="1" canvasborderalpha="20" legendshadow="0" numbersuffix="°" showvalues="1" alternatehgridcolor="ffffff" alternatehgridalpha="100" showborder="0" legendborderalpha="0" legendiconscale="1.5" divlineisdashed="1">
<categories>
<category label="Jan" />
<category label="Feb" />
<category label="Mar" />
<category label="Apr" />
<category label="May" />
<category label="Jun" />
<category label="Jul" />
<category label="Aug" />
<category label="Sep" />
<category label="Oct" />
<category label="Nov" />
<category label="Dec" />
</categories>
<dataset seriesname="New York" color="F97D10">
<set value="-6" />
<set value="-15" />
<set value="3" />
<set value="12" />
<set value="32" />
<set value="44" />
<set value="52" />
<set value="50" />
<set value="39" />
<set value="28" />
<set value="5" />
<set value="-13" />
</dataset>
<dataset seriesname="Chicago">
<set value="-27" />
<set value="-19" />
<set value="-8" />
<set value="7" />
<set value="24" />
<set value="36" />
<set value="40" />
<set value="41" />
<set value="28" />
<set value="17" />
<set value="1" />
<set value="-25" />
</dataset>
<dataset seriesname="Bismarck" color="3994F9">
<set value="-44" />
<set value="-43" />
<set value="-31" />
<set value="-12" />
<set value="15" />
<set value="30" />
<set value="35" />
<set value="33" />
<set value="11" />
<set value="-10" />
<set value="-30" />
<set value="-43" />
</dataset>
<styles>
<definition>
<style name="captionFont" type="font" size="15" />
</definition>
<application>
<apply toobject="caption" styles="captionfont" />
</application>
</styles>
</chart>
 
 
 
 
Can someone help me please?
 
Thanks in advance
Edited by Sharath Pannala

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

We have tested your XML data rendering using latest FusionCharts XT v3.4 and it plots the line correctly in Chrome browser. Please find the screen shot of the same, for your reference.

 

Could you please let us know the version of FusionCharts XT you are using at your end and Chrome version details?

 

Awaiting your valuable response.

 

post-23588-0-49303000-1404278516_thumb.png

Share this post


Link to post
Share on other sites

Hi,
 
Thanks for your response.
 
Chrome version is the same what you mentioned and not able to know the version of FusionCharts XT.
 
Forgot to tell you that i'm using MVC.
 
what I actually did is called the fusionchart.js on my cshtml file as below

 

<script src="~/Charts/FusionCharts.js"></script>

 

 and then defined the script as

 

function BindMSLineChart()
    {
        var value = document.getElementById('selectWeekMSLine').value;
        $.ajax({
            url: '@Url.Action("XMLLineChart", "Home")?weekNo=' + value,
            type: "POST",
            cache: false,
            success: function (data) {                     
                FusionCharts.setCurrentRenderer('javascript');
                var myLineChart = new FusionCharts("MSLine.swf", "Chart02", "800", "600", "0", "1");               
                myLineChart.setXMLUrl("data.xml");
                myLineChart.render("MSLinechartContainer");
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest.responseText);
            }
        });

    }.
 
Can you please suggest me how to find the version and proceed further.
 
Thanks again.

Share this post


Link to post
Share on other sites

and When i downloaded latest free trail version 3.4 from fusionCharts.com , I got the fusionchart v3.4

 

but when I used this file in my MVC, I got an error saying 'Chart type not supported'....then I cleared browser cache.....but still same error.

 

Please help me out on this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this