We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Chart legent font size issue

Thread ID:

Created:

Updated:

Platform:

Replies:

77383 Oct 29,2008 12:11 PM Oct 31,2008 07:42 AM ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
Alexey Zimarev
Asked On October 29, 2008 12:11 PM

When I set the legend font size using IChartShape.Legend.TextArea.Size, it is set in Excel, I can see it when I open font properties of my chart in Excel. The issue is that for underlying legend entries the font remains default so I still see the legend displayed with default font size n Excel. Only when I change some font properties in Excel and apply those changes, my font size is propagated to the entries. So I have to loop via all IChartShape.Legend.LegendEntries to set their TextArea.Size property. I think it's a bug because setting the Legend.TextArea.Size should set this font size for all entries in this legend as well.


Geetha M [Syncfusion]
Replied On October 30, 2008 01:22 AM

Hi Alexey,

Thank you for your interest in Syncfusion products.

I was not able to reproduce the issue. Please refer to the test sample in the below link:

http://websamples.syncfusion.com/samples/XlsIO.Web/6.4.0.14/F77383/main.htm

Could you please reproduce the problem in the above sample and send us so that it would help us to find the cause of the problem? Also please let us know the Essential Studio version you are currently using.

Regards,
Geetha


Administrator [Syncfusion]
Replied On October 30, 2008 09:40 AM

Well, the issue is still reproducable. YOur example really works, but I first converted your file to Excel 2007, then I removed the chart from it and modified your code to create the chart. The result - legend properties are no changed.

The new code:
ExcelEngine excelEngine = new ExcelEngine();
IApplication app = excelEngine.Excel;
IWorkbook workbook = app.Workbooks.Open(Server.MapPath(@"App_Data\TestChart.xlsx"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];

IChartShape chart = sheet.Charts.Add();
chart.DataRange = sheet.Range["A1:B6"];
chart.TopRow = 7;
chart.Legend.TextArea.Size = 12;
chart.Legend.TextArea.Italic = true;

workbook.SaveAs("Sample.xlsx", Response, ExcelDownloadType.PromptDialog);
workbook.Close();
excelEngine.Dispose();


Geetha M [Syncfusion]
Replied On October 31, 2008 07:42 AM

Hi Alexey,

Thank you for the modified code.

I was able to reproduce the issue. This has been forwarded to our developers for more analysis. Please follow up the incident #51040 regarding the issue and fix details.

Regards,
Geetha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;