Gradients with stop values

Hello all,

I'm using Aspose Cells .NET 4.4 to create charts using gradients:

e.g.
chart.NSeries[2].Points[i].Area.FillFormat.SetTwoColorGradient(color1, color2, GradientStyleType.Vertical, 4);

How is it possible to change the gradient's second stop value from 50% (default) to e.g. 80% (as it is possible in Excel)?

Thanks in advance for a quick feedback.

Martin

Hi Martin,


Thank you for your sample file.
Attached to my reply is a snapshot of Excel 2010. Please confirm that you are talking about this feature of MS Excel. If yes then I am afraid, there is no functionality available in Aspose.Cells for .NET API to set the Gradient Fill Stop value other than 50%.
If you confirm this requirement, then we can log it as “Required Feature” in our system and support it in our future release.

Hi,

I think you may use our latest version e.g v5.3.2, 5.3.3 to specify gradient stops. You cannot implement the advanced gradient options in older version like v4.4 that you are using. Please see the following sample code here.

Workbook workbook = new Workbook(“e:\test2\gradient_sample.xls”);
Worksheet csheet = workbook.Worksheets[“Chart”];
Chart chart = csheet.Charts[0];
SeriesCollection nseries = chart.NSeries;

Series aseries;
aseries = nseries[2];

CellsColor cellColor = workbook.CreateCellsColor();
cellColor.Color = Color.Blue;

ChartPointCollection datapoints = aseries.Points;
for (int i = 0; i < datapoints.Count; i++)
{
datapoints[i].Area.FillFormat.GradientFill.GradientStops.Add(80, cellColor, 2);
}

workbook.Save(“e:\test2\outputFile.xls”);

I have also attached our latest fixed version here.


Thank you.

Thanks for your answer.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Is it possible to upgrade my v4.4 license to 5.3.3 and how much does it costs?

Hi,

If your license expiry date has not passed, then you are eligible to get new update free of cost.

Please post your question on Aspose.Purchase forum to get more help.