Line chart - wrong load type and changing series colors

Technical support for Presentation

Moderator: iceblue support

Line chart - wrong load type and changing series colors

Postby Archigo » 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: 17
Joined: Tue Apr 11, 2017 2:00 pm

Re: Line chart - wrong load type and chaning series colors

Postby Betsy.jiang » 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: 1629
Joined: Tue Sep 06, 2016 8:30 am

Re: Line chart - wrong load type and changing series colors

Postby Betsy.jiang » 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: 1629
Joined: Tue Sep 06, 2016 8:30 am

Re: Line chart - wrong load type and changing series colors

Postby Archigo » 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: 17
Joined: Tue Apr 11, 2017 2:00 pm

Re: Line chart - wrong load type and changing series colors

Postby Betsy.jiang » 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: 1629
Joined: Tue Sep 06, 2016 8:30 am


Return to Spire.Presentation

Who is online

Users browsing this forum: No registered users and 0 guests