Cheiro

Members
  • Content count

    8
  • Joined

  • Last visited

Everything posted by Cheiro

  1. Hi, We have an ASP.NET application that has fusion charts on different pages and the application has a pdf report generation fuctionality. The user can export the charts (server side) and can add it to a queue to add it to the PDF report. We have a load balancing environment. Now the issue is... If the user exports images from different pages (say around ten images) and add them to the queue. few images are getting saved on Server A and few on Server B. Hence while generating the PDF report few images go missing. Is there a solution to handle this scenario? Please advise Cheiro
  2. Hi, I am trying to export Fusion charts server side, the export is initiated through javascript. Its ASP.net application I am using Fusion charts version : FusionCharts v3.2.1 (Released on 6th October 2010) The problem i am facing is... the export happens properly if i run it locally in visual studio through F5... But when i deploy it in IIS and try to browse to the page and export it i get the error saying it was not able to reach the export handler. Please advise on resolving this issue The XML is as below <chart exportEnabled='1' exportAction='Save' exportAtClient='0' exportHandler='http://localhost:843/Export_Handler/FCExporter.aspx' caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1' > <set label='Jan' value='462' /> <set label='Feb' value='857' /> <set label='Mar' value='671' /> <set label='Apr' value='494' /> <set label='May' value='761' /> <set label='Jun' value='960' /> <set label='Jul' value='629' /> <set label='Aug' value='622' /> <set label='Sep' value='376' /> <set label='Oct' value='494' /> <set label='Nov' value='761' /> <set label='Dec' value='960' /> </chart> The path : http://localhost:843...FCExporter.aspx is valid when i browse to this from IIS i get the below DOMId= height=0 width=0 fileName= statusMessage=Insufficient data. statusCode=0 please find the attached screen shots and the aspx code files code behind : using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using InfoSoftGlobal; public partial class Export_save : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Literal1.Text = FusionCharts.RenderChart("../FusionCharts/Column3D.swf", "./Data/SaveData.xml", "", "myFirst", "600", "300", true, true); } } aspx markup <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Save.aspx.cs" Inherits="Export_save" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>FusionCharts - Export Example - Export chart and save the exported file to a server-side folder </title> <link href="../assets/ui/css/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../FusionCharts/FusionCharts.js"></script> <style type="text/css"> h2.headline { font: normal 110%/137.5% "Trebuchet MS" , Arial, Helvetica, sans-serif; padding: 0; margin: 25px 0 25px 0; color: #7d7c8b; text-align: center; } p.small { font: normal 68.75%/150% Verdana, Geneva, sans-serif; color: #919191; padding: 0; margin: 0 auto; width: 664px; text-align: center; } </style> <script type="text/javascript"> // this function exports chart function exportChart(exportFormat) { if ( FusionCharts("myFirst").exportChart ) { document.getElementById ( "linkToExportedFile" ).innerHTML = "Exporting..."; FusionCharts("myFirst").exportChart( { "exportFormat" : exportFormat } ); } else { document.getElementById ( "linkToExportedFile" ).innerHTML = "Please wait till the chart completes rendering..." ; } } // This event handler function is called by the chart after the export is completed. // The statusCode property when found "1" states that the export is successful // You can get the access file name from fileName property function FC_Exported ( statusObj ) { if ( statusObj.statusCode == "1" ) { document.getElementById ( "linkToExportedFile" ).innerHTML = "Export successful. You can view it from <a target='_blank' href='" + statusObj.fileName + "'>here</a>."; } else { // If the export is found unsuccussful get the reason from notice property document.getElementById ( "linkToExportedFile" ).innerHTML = "Export unsuccessful. Notice from export handler : " + statusObj.notice; } } </script> </head> <body> <form id="form1" runat="server"> <div id="wrapper"> <div id="header"> <div class="back-to-home"> <a href="../Default.aspx">Back to home</a></div> <div class="logo"> <a class="imagelink" href="../Default.aspx"> <img src="../assets/ui/images/fusionchartsv3.2-logo.png" width="131" height="75" alt="FusionCharts v3.2 logo" /></a></div> <h1 class="brand-name"> FusionCharts</h1> <h1 class="logo-text"> ASP.NET(C#) Export Examples</h1> </div> <div class="content-area"> <div id="content-area-inner-main"> <h2 class="headline"> Export example - Export chart and save the exported file to a server-side folder</h2> <div class="gen-chart-render"> <center> <asp:Literal ID="Literal1" runat="server"></asp:Literal> <div id="linkToExportedFile" style="margin-top: 10px; padding: 5px; width: 600px; background: #efefef; border: 1px dashed #cdcdcd; color: 666666;"> Exported status.</div> <br /> <input value="Export to JPG" type="button" onclick="JavaScript:exportChart('JPG')" /> <input value="Export to PNG" type="button" onclick="JavaScript:exportChart('PNG')" /> <input value="Export to PDF" type="button" onclick="JavaScript:exportChart('PDF')" /> </center> </div> <div class="clear"> </div> <p> </p> <p class="small"> Right click on the chart to accee various export options or click any of the buttons below</p> <div class="underline-dull"> </div> </div> </div> <div id="footer"> <ul> <li><a href="../Default.aspx"><span>« Back to list of examples</span></a></li> <li class="pipe">|</li> <li><a href="../NoChart.html"><span>Unable to see the chart above?</span></a></li> </ul> </div> </div> </form> </body> </html>
  3. No one???? No help on this???
  4. Invalid Xml Error

    Hi We have the following XML that renders chart perfectly in local build. But when it is deployed on the server in IIS, It shows "Invalid XML Error" If we refresh the page after a couple of times the same XML Chart renders just fine. Below XML is from the Log which was captured from the server, same XML gave the error and also rendered fine after refreshes. When the debug more is set as on we get the message as -Start and end tag mismatch But if we check the xml we see that it is well formed. <chart exportEnabled='1' exportAction='Save' exportAtClient='0' exportHandler='../Export_Handler/FCExporter.aspx' showBorder='0' bgAlpha='0,0' baseFont='Arial' baseFontSize='11' labelDisplay='ROTATE' slantLabels='1' showShadow='0' showNames='1' animation='0' showLegend='1' rotateNames='1' showvalues='0' SYAxisName='Filter Hits' PYAxisName='Unique IPs' caption='Failures'> <categories> <category name='2010-1-1'/> <category name='2010-1-2'/> <category name='2010-1-3'/> <category name='2010-1-4'/> <category name='2010-1-5'/> </categories> <dataset alpha='90' color='BBFFBB' showValues='0' parentYAxis='P' seriesname='IPs'> <set value='0'/> <set value='56'/> <set value='78'/> <set value='41'/> <set value='525'/> </dataset> <dataset alpha='90' color='BBBBFF' showValues='0' parentYAxis='P' seriesname='Dest IPs'> <set value='0'/> <set value='110'/> <set value='135'/> <set value='41'/> <set value='642'/> </dataset> <dataset color='FF3333' showValues='0' anchorSides='8' parentYAxis='S' lineThickness='3' seriesname='Hits' anchorRadius='3'> <set value='0'/> <set value='98064'/> <set value='481958'/> <set value='171925'/> <set value='1969662'/> </dataset> </chart> Could anyone advise on this???
  5. Invalid Xml Error

    Hi Angshu, Thanks, Chart render : Flash we are using FusionChart.Renderchart() method with SWF Version: Current Version: FusionCharts v3.2.1 (Released on 6th October 2010) Chart Types: ../FusionCharts/MSCombiDY2D.swf ../FusionCharts/MSLine.swf After the deployment, This happens only for the first few times and after several refershes. with the same XML it renders the chart fine.
  6. Hi, Sometimes when there is no data, the chart shows "no Data to display" still the export of chart works and it gives a blank image. is there a way to check if the chart has given " no data to display" error and stop export? Regards, Cheiro
  7. "no Data To Display" Still Exports

    Hi, Please find the attached screen shots of chart export and code... the page renders chart using below here the xml has no data... intentionally protected void Page_Load(object sender, EventArgs e) { Literal1.Text = FusionCharts.RenderChart("../FusionCharts/Column3D.swf", "../FusionCharts/SaveDataEmpty.xml", "", "myFirst", "600", "300", false, true); } The xml is like so... the data inside is intentionally commented to simulate no data <chart exportEnabled='1' exportAction='Save' exportAtClient='0' exportHandler='../Export_Handler/FCExporter.aspx' caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1' > <!--<set label='Jan' value='462' /> <set label='Feb' value='857' /> <set label='Mar' value='671' /> <set label='Apr' value='494' /> <set label='May' value='761' /> <set label='Jun' value='960' /> <set label='Jul' value='629' /> <set label='Aug' value='622' /> <set label='Sep' value='376' /> <set label='Oct' value='494' /> <set label='Nov' value='761' /> <set label='Dec' value='960' />--> </chart> Even if the chart shows no data, it allows it to export which results in generation of a blank image.
  8. Hi, I am trying to export fusion chart serverside using javascript to initiate the export. The chart to be exported resides on say Deatils.aspx page. The chart is rendered by using the following code FusionCharts.RenderChartHTML("../FusionCharts/MSCombiDY2D.swf", _url, "", "details_chart", "730", "350", false); where _url is GenerateGraph.aspx, this page renders the graph asynchronously i.e the parent page Details.aspx will continue to render other objects while the chart is loaded paralelly. Now to export the chart the user clicks a link button, on its "OnClientClick", the following javascript function is called which resides on the Details.aspx page // this function exports chart function exportChart(exportFormat) { if (FusionCharts("details_chart").exportChart) { document.getElementById("linkToExportedFile").innerHTML = "Exporting..."; FusionCharts("details_chart").exportChart({ "exportFormat": exportFormat }); } else { document.getElementById("linkToExportedFile").innerHTML = "Please wait till the chart completes rendering..."; } } but the above javascript function throws an error saying that it could not find the "details_chart" object, quite understandably as the whole chart rendering is being taken by GenerateGraph.aspx. In the above scenario how do i do i export the graph??? Is there a way or workaround to get the chart object and javascript exports normally?. I will not be able to render the graph on the Details.aspx itself, (which would solve the problem), as it will block the whole page's loading until graph renders and it is totally unacceptable from user's perspective. Awaiting advice and solutions from you guys. Thanks, Cheiro