Free Support Forum - aspose.com

Smoothing of series lines in a line graph

You had posted a patch version on the forum, on 2/24/06 at 6:57 am, to fix a problem with the smoothing of lines. Is that fix included in version 3.7.1 ? We purchased 3.7.1 earlier this week.

Yes. Please check it in v3.7.1.

I checked in v 3.7.1. It does not appear to be working, as the lines are not smoothed out - they look just like the evaluation copy that we had before. Here is a screenshot. My code is somewhat like this, and the ChartType is "ChartType.Line":

for (int i = 0; i < chart.NSeries.Count; i++)

{

......

chart.NSeriesIdea [I].Smooth = true;

}

Please remove old reference to aspose.cells.dll in your project and re-add reference to v3.7.1.

I tried the following sample code and it works fine. You can try it in your machine.

Excel excel = new Excel();
excel.Worksheets[0].Cells["A1"].PutValue(1);
excel.Worksheets[0].Cells["A2"].PutValue(5);
excel.Worksheets[0].Cells["A3"].PutValue(3);

excel.Worksheets[0].Cells["B1"].PutValue(5);
excel.Worksheets[0].Cells["B2"].PutValue(12);
excel.Worksheets[0].Cells["B3"].PutValue(3);

int index = excel.Worksheets[0].Charts.Add(ChartType.Line, 10, 4, 22, 8);
Chart chart = excel.Worksheets[0].Charts[index];
chart.NSeries.Add("A1:B3", true);

for(int i = 0; i < chart.NSeries.Count; i ++)
{
chart.NSeriesIdea [I].Smooth = true;
}

excel.Save("d:\\test\\abc.xls");