Hi,
I’m having trouble rendering the legend on one of my charts.
Here is my code.
protected void Page_Load(object sender, EventArgs e)
{
//Instantiate an instance of license and set the license file through its path
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense(“Aspose.Cells.lic”);
//Create a new workbook.
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();
//Open the existing excel file which contains the column chart.
System.String file = Server.MapPath(“2009.xls”).ToString();
workbook.Open(@file);
//Get the designer chart (first chart) in the first worksheet.
//of the workbook.
System.Text.StringBuilder sb = new System.Text.StringBuilder();
//int i=0;
for (int i = 0; i < workbook.Worksheets[6].Charts.Count; i++)
{
Aspose.Cells.Chart chart = workbook.Worksheets[6].Charts[i];
chart.ToImage(@Server.MapPath(i+".jpg"));
sb.AppendLine("<img src="+i+".jpg>Image"+i+"
");
");
}
Label1.Text = sb.ToString();
}
The first chart on sheet 6 is having the problem. The legend isn’t showing the full words. Two of the words are being cut off. Is there anything I can do to get this working?