Veerendra

Javasacript Pie Chart not being loaded

Recommended Posts

Hi,

I am using FusionCharts XT(v3.2.2) SR2 licensed version. Very recently while working on loading Pie chart in one of our application we are faced a problem, where Pie chart is not being loaded but all the legends and labels with values are loaded successfully. Please find the screenshot attached.

Earlier in our project we are used to fusion chart, where javascript code were included within <script> tag  in the JSP, where as now we are trying to separate Javascript code in a file. Please find the Javascript and JSP below.

FusionCharts.js  is loaded in the main JSP and code is as below.

<script id="/js/fusionChart/FusionCharts.js" language="Javascript" src="/js/fusionChart/FusionCharts.js"></script>               

 

Javascript:

========================================

var ChartSummary = function() {    
    
    this.loadChart = function() {        
        FusionCharts.setCurrentRenderer('javascript');                
        var pieChart = new FusionCharts(project + '/FusionCharts/Pie3D.swf', 'chart1ID', '500', '500');
        pieChart.setDataXML("<chart showValues='1' showLegend='1' rotateValues='1' showNames='1' pieYScale='90' pieSliceDepth='10' pieRadius='120' showPercentageValues='1' decimalPrecision='0' showBorder='1' borderColor='000000' bgColor='FFFFFF' baseFontSize='10' baseFont='Arial'> <set value='145517' color='008000' label='Approved' /> <set value='0' color='ff0000' label='Rejected' /> <set value='103' color='ffff00' label='Pending' /> </chart>");
        pieChart.setTransparent(true);
        pieChart.render('chartDiv');
    }
    
};
var chartSummary = new ChartSummary();
 

 

JSP

===================================================

<div>

    <form name="chartForm" id="chartForm">
        <table style="width:100%;">            
            <tr>
                <td>
                    <div id="LoadChartButton" style="float: right;padding: 1%">
                        <input type="button" value="Load Chart" onclick="chartSummary.loadChart();">
                    </div>
                </td>        
            </tr>            
            <tr>
                <td>    
                    <div id="chartDiv" name="chartDiv"></div>
                </td>
            </tr>    
        </table>
    </form>
</div>
 

Image

=====================

image.png.153dd6ad19e377c2f6a434b64168d3b6.png

 

 

Share this post


Link to post
Share on other sites

Hi,

Flash versions are deprecated, FusionCharts now renders in Javascript, also FusionCharts supports dedicated server-side JSP wrapper using which you could render charts in Java. Kindly upgrade it to the latest version i.e. 3.12.2

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