Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Dec 25, 2019 10:57 am

I have create a line chart,but this settings to change series color does't work,please help.below is my code

var chart = sheet.Charts.Add(ExcelChartType.Line);---
series1.Format.Fill.FillType = ShapeFillType.SolidColor;
series1.Format.Fill.ForeColor = System.Drawing.Color.Red;

standheo
 
Posts: 24
Joined: Mon Oct 08, 2018 11:13 am

Thu Dec 26, 2019 2:38 am

Hi,

Thanks for your inquiry.
Please try the code below to set the series color of line chart in Excel file.
Code: Select all
            ChartSerie series1 = chart.Series[0];
            //set the line type as solid
            series1.Format.LineProperties.Pattern = ChartLinePatternType.Solid;
            //set the color of the line
            series1.Format.LineProperties.Color = Color.Yellow;

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Thu Dec 26, 2019 3:15 am

I have tryed your code,it did't work for freespire.xls package.
after i changed to the latest spire.xls package,it works.
i want to know if free version can't change series solor of line chart, or this is just a issue?

standheo
 
Posts: 24
Joined: Mon Oct 08, 2018 11:13 am

Thu Dec 26, 2019 10:30 am

Hi,

Thanks for your reply.
Since we update free version irregularly, we suggest you use the latest commercial version because the fixes and new features are always included in it firstly.
We will send you a one-month free license of Spire.XLS tomorrow. Please check and apply it to have a better evaluation on our product.
Here is a guide for you: https://www.e-iceblue.com/Tutorials/Licensing/Licensing.html.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Return to Spire.XLS

cron