Gradient Fill in Line Chart

Hi,

I wants to apply gradient color for Series Lines in Line Chart.

I tried to use two ways of below code but it does not worked for me.

series.SeriesLines.GradientFill.SetOneColorGradient(Color.Blue, 0.7, Aspose.Cells.Drawing.GradientStyleType.Vertical, 2);

series.Border.GradientFill.SetOneColorGradient(Color.Blue, 0.7, Aspose.Cells.Drawing.GradientStyleType.Vertical, 2);

Please Let me know how can i do the same.

Thanks,

Amit

Hi,


Please try:

series.Area.FillFormat.SetOneColorGradient(Color.Blue, 0.7, Aspose.Cells.Drawing.GradientStyleType.Vertical, 2);


Let us know if you still have any issue.

thank you.

Hi,

Thanks for your reply.

I tried with the code

series.Area.FillFormat.Type = FillType.Gradient;

series.Area.FillFormat.SetTwoColorGradient(Color.Red,Color.Blue, Aspose.Cells.Drawing.GradientStyleType.Vertical, 2);

But it does not worked for me.

When i check the series properties it shows "Solid" color for lineColor option the chart.

Thanks,

Amit

Hi,


Please provide us a sample console application (runnable) to show the issue on our end, also provide input (if you have any) and output Excel file here, we will check your issue soon. Moreover, please provide your expected file that you may manually create in MS Excel having your desired chart’s series set with gradient fill color. It will help us to evaluate your issue more precisely.

Thank you.

Hi,

I am attaching the sample application for the same issue.

If you see in the InputExcel.xlsx file."Manual Chart" i creating manually in Excel.

Output file contains the output excel chart which is being created using the Aspose.Cell library.

Please check and let me know how can i fix this.

Thanks,

Amit

Hi,


Thanks for providing us the sample project with template file.

After an initial test, I observed the issue as you mentioned by using your sample project with your template file. It works fine with setting gradient fill color for a column type data series but for line type data series in the chart, it does not work as you pointed out. I have logged a ticket with an id “CELLSNET-42022” for your issue. We will look into it to figure it out soon.

Thank you.

Hi,


Please download and try our latest version/fix : Aspose.Cells for .NET v7.5.3.4


We have fixed your issue now.


Also, you may refer to the attached archive for your further reference.


Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.