We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issues with a simple chart

I have a simple chart that is being created programatically that is not coming out correctly when the file is opened in Excel. The issues are that t none of the axis labels show up and that the lines are smooth.

Here is the code that I use to add the chart to the spreadsheet:

int chartIndex = ws.Charts.Add(ChartType.LineStacked, 19, 0, 45, 10);
Chart chart = ws.Charts[chartIndex];
chart.Placement = PlacementType.FreeFloating;
int moveInDataSeriesIndex = chart.NSeries.AddR1C1("B12:E12", false);
SetSeriesName(chart, moveInDataSeriesIndex, "Move Ins");
int workOrderDataSeriesIndex = chart.NSeries.AddR1C1("B13:E13", false);
SetSeriesName(chart, workOrderDataSeriesIndex, "Work Orders");
int PrerenewalDataSeriesIndex = chart.NSeries.AddR1C1("B14:E14", false);
SetSeriesName(chart, PrerenewalDataSeriesIndex, "Pre Renewals");
int unclosedTrafficDataSeriesIndex = chart.NSeries.AddR1C1("B15:E15", false);
SetSeriesName(chart, unclosedTrafficDataSeriesIndex, "Unclosed Traffic");
chart.NSeries.CategoryData = "B11:E11";
chart.ShowLegend = true;
chart.CategoryAxis.IsVisible = true;
chart.ValueAxis.MinValue = 0.0;
chart.ValueAxis.MaxValue = 5.0;
chart.ValueAxis.IsVisible = true;

Hi,

Please download and try our latest version v5.1.0:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry248967.aspx

I have tested with your code and file a bit and it works fine.

Thank you.

After updating the assembly to v5.1, the chart looks the same to me when I open it in Excel. Just an FYI that I am opening it in Excel 2010.

I tried another method with the same results. This time I commented out the code that create the chart and instead built the chart in Excel and just updated the numbers programatically. Attached is the template file and the resulting file.

Hi,

Thanks for providing us further details and files.

I have logged your issue into our issue tracking system with an id: CELLSNET-18537. We will investigate your issue and get back to you soon.

Thank you.

Thanks. I have attached a file with the chart formattted correctly (using Excel).

Hi,

We have fixed the issue regarding chart's axis labels and line's smoothness in Excel 2010. Please try the attached version.


Thank you

The issues you have found earlier (filed as 18537) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Thanks, this works great.