Free Support Forum - aspose.com

Issue in MSO/Native Charts Markers (Star-Plus and X)

Hi -

This is regarding legend markers with MSO/Native Charts , while we are testing our application with different Markers available with ASPOSE , we found STAR , PLUS and X markers are being displayed as SQUARE.

Please find the below code snippet which we are using , and provide ur suggesstions/ solution to resolve our issue.

if ("squareplus" == cMType.ToLower())
{ sSeries.MarkerSymbol = MarkerStyleTypeEx.Plus;}
else if ("squarestar" == cMType.ToLower())
{ sSeries.MarkerSymbol = MarkerStyleTypeEx.Star;}
else if ("squarex" == cMType.ToLower())
{ sSeries.MarkerSymbol = MarkerStyleTypeEx.X; }
Thanks
Regards
Venkat M.N

Hi Venkat,


Thanks for inquiring Aspose.Slides.

I have observed the issue shared by you. In order to further investigate the issue on my end please share a sample application along with source and generated output reproducing the issue. Please also share what output you are interested in Aspose.Slides to offer you.

Many Thanks,

Hi Muddasir,

I am attaching 2 projects with their respective ouputs.
First Proj: - Project1 with output as AsposeChartOutput1.pptx
Second Proj:- Project2 with output as AsposeChartOutput2.pptx

In project2 you can check that
a) series.MarkerSymbol = MarkerStyleTypeEx.Star;
b) series.MarkerSymbol = MarkerStyleTypeEx.X;
c) series.MarkerSymbol = MarkerStyleTypeEx.Plus;

are not working if the following line of code is added while setting the marker symbol

series.MarkerFill.Fill.FillType = FillTypeEx.Solid;
series.MarkerFill.Line.FillFormat.FillType = FillTypeEx.Solid;

Thanks,
Venkat


Hi Venkat,


I have worked with the sample project shared by you and have updated it for your convenience to serve the purpose. Actually, you were setting the marker fill format and line fill format to solid, but not setting any color. Doing so actually fill the marker symbol lines and fill color to Black color and it appears as square. If you set type to SolidFill then you are also needed to define the color. For your kind reference, I have also attached the generated presentation. Please share, if I may help you further in this regard.

Many Thanks,

Hi Muddasir,

I have created one project in which I have used your code as mentioned above.
But then it creates other problem with the rest of the symbols(Circle,Diamond....etc) if I set type as Solidfill and mention the color.

There are 2 scenarios as follows in the attached project code

a)With NoFill
series.MarkerSize = 20;
series.MarkerFill.Fill.FillType = FillTypeEx.NoFill;
series.MarkerFill.Line.FillFormat.FillType = FillTypeEx.Solid;
series.MarkerFill.Line.FillFormat.SolidFillColor.Color = System.Drawing.Color.Green;
series.MarkerFill.Fill.SolidFillColor.Color = System.Drawing.Color.Green;
series.MarkerFill.Line.Width = 3.0;

b)With SolidFill
series.MarkerFill.Fill.FillType = FillTypeEx.Solid;
series.MarkerFill.Line.FillFormat.FillType = FillTypeEx.Solid;
series.MarkerFill.Line.FillFormat.SolidFillColor.Color = System.Drawing.Color.Green;
series.MarkerFill.Fill.SolidFillColor.Color = System.Drawing.Color.Green;
series.MarkerFill.Line.Width = 3.0;

Thanks Venkat,

Hi Venkat,


I have observed the code sample project and observed inconsistencies in that. For the issue of plus and star shapes failing to get rendered in generated presentation the issue lies in the sample code shared by you. You have actually set the same fill color and line color for the mentioned symbols. When you do so, you will get the single color in the form of filled square. If you want to set the plus and star symbol then you either set the symbol fill color to NoFill or choose different color for fill color and line color.

For your second issue related to non filled Circle and Diamond symbols, I like to share that you have set their fill type to NoFill. When you do so, the symbol will not get filled. I have modified the code snippet for your convenience. Please share, if I may help you further in this regard.

Many Thanks,