Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Tue May 09, 2017 12:09 pm

Hello

I am loading in a line chart.

When it is loaded into spire, it becomes a "ChartType.LineMarkers" where it should be "ChartType.Line".

This is simple to Work around though.

My second issue is that when I do

Code: Select all
IChart chart = presentation.Slides[0].Shapes[0] as IChart;

                for (int i = 0; i < chart.Series.Count; i++)
                {
                    chart.Series[i].Fill.FillType = FillFormatType.Solid;
                    chart.Series[i].Fill.SolidColor.Color = Color.Aqua;
                }


The colors are unchanged after saving. This same code is changing colors fine on other charts.

How do i change the colors of series in a line chart?

The attach function is not working for me, so i have uploaded my test project externally: https://ufile.io/ler44
Last edited by Archigo on Thu May 11, 2017 9:35 am, edited 1 time in total.

Archigo
 
Posts: 21
Joined: Tue Apr 11, 2017 2:00 pm

Wed May 10, 2017 6:52 am

Dear Archigo,

Thanks for your inquiry.
I have reproduced the two issues and posted it to our Dev team. Once there is any great progress, we will let you know.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue May 23, 2017 9:15 am

Dear Archigo,

Thanks for your waiting.
Now the ChartType issue has been fixed in Spire.Presentation Pack Hotfix Version:2.8.10, welcome to have a test.
For the second issue, there is something wrong in your code, please change it to below code.
Code: Select all
chart.Series[i].Line.FillType = FillFormatType.Solid;
chart.Series[i].Line.SolidFillColor.Color = Color.Aqua;

Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Jun 01, 2017 7:22 am

The new version fixed my issue, thanks :)

I cannot find anywhere in the tutorial where it is showed that you need to use "chart.Series[i]. Line" instead of "chart.Series[i].Fill" which is used for all the chart types in the tutorials. This might be worth adding as a hint in the tutorial about coloring series.

Archigo
 
Posts: 21
Joined: Tue Apr 11, 2017 2:00 pm

Thu Jun 01, 2017 7:25 am

Dear Archigo,

Thanks for your suggestion.
We will add that in the tutorial about coloring series, if you have any question, please do not hesitate to contact us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Presentation