Hello,
Hi Cristina,
Thanks for inquiring Aspose.Slides.
I have worked with the sample code shared by you and have successfully generated a chart with 3D effects on my end. I have used following code on my end. For reference, I have also attached the generated presentation as well.
public static void AddChart3D()
{
Presentation pres = new Presentation();
ISlide slide = pres.Slides[0];
// IChart chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 10, 10, 400, 300);
IChart chart = slide.Shapes.AddChart(ChartType.ClusteredBar, 10, 10, 400, 300);
//The caller code
foreach (var s in chart.ChartData.Series)
{
Add3DEffect(s);
}
pres.Save(“C:\Aspose Data\SavedPres.pptx”, SaveFormat.Pptx);
}
////The method applying the effects
public static void Add3DEffect(IChartSeries series)
{
var format = series.Format;
format.Effect3D.Depth = 4;
format.Effect3D.BevelTop.BevelType = BevelPresetType.Circle;
format.Effect3D.BevelTop.Width = 6;
format.Effect3D.BevelTop.Height = 6;
format.Effect3D.Camera.CameraType = CameraPresetType.OrthographicFront;
format.Effect3D.LightRig.LightType = LightRigPresetType.ThreePt;
format.Effect3D.LightRig.Direction = LightingDirection.Top;
}
Many Thanks,