【问题标题】:Blank image when Exporting fusionchart to image将融合图导出为图像时出现空白图像
【发布时间】:2011-12-25 03:51:15
【问题描述】:

我正在尝试重复 here 中的示例并重写 c# 上的代码,但结果我得到一个空白图像。我哪里错了?

        protected void BtnSave_Click(object sender, EventArgs e)
    {
       SWFToImage.ISWFToImageObject swfobj  = new SWFToImage.SWFToImageObject();
            swfobj.InitLibrary("demo", "demo");
            swfobj.InputSWFFileName = Server.MapPath("FusionCharts/") + "MSColumn2D.swf";
       swfobj.ImageOutputType = SWFToImage.TImageOutputType.iotJPG;
       string filenm = Server.MapPath("FusionCharts/" + "MSColumn2D.jpg"); 
swfobj.Execute_Begin();
swfobj.Execute_SetVariable("dataXML", "<chart yAxisName='Sales Figure' caption='Top 5 Sales Person' numberPrefix='$' useRoundEdges='1' bgColor='FFFFFF,FFFFFF' showBorder='0' ><set label='Alex' value='25000'  /><set label='Mark' value='35000' /> <set label='David' value='42300' /><set label='Graham' value='35300' /><set label='John' value='31300' /></chart>");
swfobj.Execute_SetVariable("chartWidth", "750");
swfobj.Execute_SetVariable("chartHeight", "600");
swfobj.ImageWidth = 600;
swfobj.ImageHeight = 500;      
swfobj.Execute_GetImage();
swfobj.SaveToFile(filenm);
swfobj.Execute_End();        

    }

【问题讨论】:

    标签: c# asp.net fusioncharts


    【解决方案1】:

    你一定错过了dataXML中的animation='0',我在帖子中已经清楚地提到了。另外建议添加

    Threading.Thread.Sleep(10000)
    

    之前

    swfobj.Execute_GetImage();
    

    谢谢

    【讨论】:

      猜你喜欢
      • 2012-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-04
      相关资源
      最近更新 更多