Sign in to follow this  
hhamdan

Fusion Chart export show empty image with only percentage showing

Recommended Posts

Please help : i am using fusion chart and renreding it on javascrpit  but i only get empty image , see image below.

 

 

  function createChart()
        {
            var webServiceData = returnAJAXData();

            $.ajax({
                type: 'POST',
                dataType: 'json',
                async: true,
                beforeSend: function ()
                {
                    $("#ajaxLoad").show();
                },
                url: p3ChartURL,
                data: webServiceData,
                cache: true,
                contentType: 'application/json; charset=utf-8',
                success: function (data)
                {
                    var p3ChartData = $.evalJSON(data.d);
                    if (p3ChartData.OUTCOME == "SUCCESS")
                    {
                       FusionCharts.setCurrentRenderer('javascript');
                       var myChart = new FusionCharts("Charts/Doughnut2D.swf", "p3ChartID", "100%", "100%", "0", "1");
                        myChart.setJSONData(p3ChartData.CHARTDATA);
                        myChart.setTransparent(true);
                        myChart.render("p3ChartFus");
                        $("#p3ChartTotalText").css("font-weight", "bold");
                        $("#p3ChartTotalValue").css("font-weight", "bold");
                        //$("#p3ChartFus").append('<img id="p3ChartFusBackgroundImage" src="Styles/Images/PieInactive.png" />');
                        $("#p3ChartTotalValue").text("$" + addCommas(Math.round(p3ChartData.TOTAL)));                                               
                      
                    }
                    else
                    {

                    }
                 
                    $("#ajaxLoad").hide();
                },
                error: function (err)
                {
                   
                    $("#ajaxLoad").hide();
                }
            });      
        }
 

 

and here what i am doing to render the export :

 

 <script type="text/javascript">
      //Render the export component in this
      //Note: fcExporter1 is the DOM ID of the DIV and should be specified as value of exportHandler
      //attribute of chart XML.
      var myExportComponent = new FusionChartsExportObject("fcExporter1", "Charts/FCExporter.swf");
      //Render the exporter SWF in our DIV fcexpDiv
      myExportComponent.Render("fcexpDiv");
  </script>

 

        <div id="fcexpDiv" align="center"></div>
 

and here is my json data

 

{"d":"{\"OUTCOME\":\"SUCCESS\", \"CHARTDATA\":{ \"chart\" : { \"bgColor\":\"000000\", \"showToolTip\":\"0\",\"showExportDataMenuItem\":\"1\",\"exportEnabled\":\"1\",\"exportAtClient\":\"1\",\"exportHandler\":\"fcExporter1\", \"paletteColors\":\"5ab200,108ece,e9d103,ef5900\", \"bgalpha\":\"0,0\", \"baseFontSize\":\"14\", \"showFCMenuItem\":\"0\", \"showLegend\":\"0\", \"baseFont\":\"Arial\", \"labelDistance\":\"15\", \"borderColor\":\"000000\", \"showPlotBorder\":\"0\", \"showShadow\":\"0\", \"enableSmartLabels\":\"0\", \"manageLabelOverflow\":\"0\", \"showPercentValues\":\"0\", \"showValues\":\"0\", \"baseFontColor\":\"FFFFFF\", \"baseFontSize\":\"18\" }, \"data\":[{ \"label\":\"0-30 Days\", \"value\":\"2413290.7800\", \"label\":\"16%\", \"link\":\"j-pieClick-1\", \"toolText\":\"$2,413,291 (16%)\" },{ \"label\":\"31-60 Days\", \"value\":\"2572555.5000\", \"label\":\"17%\", \"link\":\"j-pieClick-2\", \"toolText\":\"$2,572,556 (17%)\" },{ \"label\":\"61-90 Days\", \"value\":\"1048191.8700\", \"label\":\"7%\", \"link\":\"j-pieClick-3\", \"toolText\":\"$1,048,192 (7%)\" },{ \"label\":\"Over 90 Days\", \"value\":\"9312332.6400\", \"label\":\"61%\", \"link\":\"j-pieClick-4\", \"toolText\":\"$9,312,333 (61%)\" }]}, \"PERIOD\":\"08/31/13\", \"TOTAL\":\"15346370.7900\"}"}
 
and hee is what i get
 
 
 

post-55371-0-60466400-1378387571_thumb.png

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Welcome to FusionCharts Forum.

 

Could you please confirm once whether the issue is replicated if the chart dimension is provided with some value (other than 100%)?

 

Also, please provide the version of FusionCharts XT is being used at your end to replicate the issue and the screen shot of browser console (if any error displays).

 

Awaiting your valuable response.

Edited by Sashibhusan

Share this post


Link to post
Share on other sites

Hello Sashibhusan,

 

i changed the dimension to a fixed width and hieght but it is still doing same thing?

also there is no error on the concle at all

 

@version fusioncharts/3.2.4-release.8565

hope this help.

Thank you

Share this post


Link to post
Share on other sites
Guest Rishab

Hi,

 

Please update your FusionCharts XT suite to the latest version and try exporting the chart.

As a suggestion, "exportHandler" attribute can be removed since it is related to Flash charts export.

 

Hope this helps!

Edited by Rishab

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