- Home
- Forum
- ASP.NET Web Forms (Classic)
- I have problem to use Chart in Sharepoint 2010
I have problem to use Chart in Sharepoint 2010
when i use the Chart in Customer Webpart .and Deploy .
have some Problem ..the chart can't display img .
i think is the generate.ashx is wrong config ?
thansk all .
Hi Jaja,
1. Product information.
2. 2. Web.config
If you are using Chart[Web] in sharepoint 2010. Please
download the sample from below link.
The chart broken image issue occurs if the chart handlers
are not specified in the web.config file. In order to run the Chart application
in web server, you need to add the chart handlers which specifies the name,
path and type of the handlers in the webconfig file under the following tag.
System.webserver => handlers. Please find the following
code snippet to achieve this.
[web.config]
<system.webServer>
<handlers>
<add name="SFChart" path="syncfusion_generate.ashx"
verb="*"
type="Syncfusion.Web.UI.WebControls.Chart.ChartWebHandler,Syncfusion.Chart.Web,
Version= x.x.x.x, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
</handlers>
</system.webServer>
If you are running the chart application in the local machine via Visual
studio, then it’s enough to add the handlers in “httpHandler” tag. But for
hosting it, you have to add the same in webserver handler tag too.
Please let us know your concerns.
Siva
thanks you reply , I'm follow your instruction
now , the sharepoint can show Chart correct
thanks you : ) by the way i'm using Sharepoint Fundation 2010 . but i think it can be use in Server version.
but now i have a litte Question . i use ASP.NET Control to Postback get Data and Generator
the Chart . when i use the Chart Method to Export xls the Code like this
# region XlsIO
case "xlsio":
exportFileName = fileName + ".xls";
file = fileName + ".emf";
if (!System.IO.File.Exists(Server.MapPath(file)))
this.ChartWebControl1.SaveImage(Server.MapPath(file));
ExcelEngine engine = new ExcelEngine();
IApplication application = engine.Excel;
//A new workbook with a worksheet is created.
IWorkbook chartBook = application.Workbooks.Create(2);
IWorksheet sheet = chartBook.Worksheets[0];
sheet.Pictures.AddPicture(Server.MapPath(file));
chartBook.SaveAs(exportFileName, ExcelSaveType.SaveAsXLS, Response, ExcelDownloadType.PromptDialog);
chartBook.Close();
engine.Dispose();
OpenFile("XLsIO", exportFileName);
break;
# endregion
and i open the export xls , the chart is not bind data. how can i do this ?
Thanks you replay , again . 
Hi Jaja,
We regret for inconvenience caused.
We are unable to reproduce the issue. We have prepared a simple chart sample for exporting chart to excel. The sample can be downloaded from the following link.
Could you please try the above sample and get back to us whether you are able to reproduce the issue? If not, could you please give more information or by reproducing the issue in the above sample so that we could sort out the issue and provide you with solution. The information provided would be of great help in resolving the issue.
Please let us know if any concerns.
Regards,
Siva
- 3 Replies
- 2 Participants
-
JA Jaja
- Sep 13, 2012 03:04 PM UTC
- Sep 17, 2012 12:44 PM UTC