Line Chart Show Different Shapes in Legend and Line

I have attached here sample chart in excel, the same i want to do using appose. please update me soon.


Main is
Shapes like diamond and Square how to place in Legend and Lines.

Thanks & Regards
Ravi

Hi Ravi,

Thanks for your posting and using Aspose.Cells.

You can set the markers of your chart series using Chart.NSeries[1].Marker property.

Please see the following code, it sets the Markers of the first and second series. It sets the marker style, fill color and marker size.

I have attached the source file used in this code and the output file for your reference. Also attached the screenshot for you to view the difference between source and output file.

C#


Workbook workbook = new Workbook(“source.xlsx”);


Worksheet worksheet = workbook.Worksheets[0];


Chart ch = worksheet.Charts[0];


//Set the markers of first series

Marker marker = ch.NSeries[0].Marker;

marker.MarkerStyle = ChartMarkerType.Diamond;

marker.Area.FillFormat.Type = FillType.Solid;

marker.Area.FillFormat.SolidFill.Color = Color.Red;

marker.MarkerSize = 16;


//Set the markers of the second series

marker = ch.NSeries[1].Marker;

marker.MarkerStyle = ChartMarkerType.Square;

marker.Area.FillFormat.Type = FillType.Solid;

marker.Area.FillFormat.SolidFill.Color = Color.Blue;

marker.MarkerSize = 16;


workbook.Save(“output.xlsx”);