sushma_rkd Report post Posted December 9, 2011 Hi here's the code that doesnt work properly.. $(document).ready(function() { $.ajax({ type: "POST", url: "DrillDownPieChapter1.aspx/BindChart", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", async: true, success: function(msg) { var json = $.xml2json(msg.d); jsonString = { "chart": { "caption": "Yearly Sales", "xaxisname": "Year", "yaxisname": "Sales" }, "data": [], "linkeddata": [{ "id": [], "linkedchart": { "chart": { "caption": " Sales Summary", "subcaption": "For the year 2004", "xaxisname": "Quarter", "yaxisname": "Sales", "numberprefix": "$", "useroundedges": "1" }, "data": [] } }] } if (json.Table.length > 0) { for (i = 0; i < json.Table.length; i++) { var dataSeries = {}; dataSeries.label = json.Table.City; var item = parseFloat(json.Table.Value); dataSeries.value = item; dataSeries.link = json.Table.link; jsonString.data.push(dataSeries); } } if (json.Table.length > 0) { for (i = 0; i < json.Table.length; i++) { var dataSeries1 = {}; dataSeries1.label = json.Table.Property; var item = parseFloat(json.Table.Value); dataSeries1.value = item; var idseries = {}; idseries.id = json.Table.City; jsonString.linkeddata[0].id.push(idseries); jsonString.linkeddata[0].linkedchart.data.push(dataSeries1); } } var pieContainer = new FusionCharts("Scripts/Pie3D.swf", "Pie2D", "485", "280", "0", "1"); pieContainer.setJSONData(jsonString); pieContainer.render("ActualDatawise-Pie"); } }); }); </script> Share this post Link to post Share on other sites