aspose-free-consulting / projects

The starting point for Aspose free consulting projects
5 stars 5 forks source link

Aspose Slides - Chart title bottom padding #423

Open sfgny opened 1 month ago

sfgny commented 1 month ago

Hi,

Is there a solution on how to adjust the bottom spacing between chart title and the graph?

chart.HasTitle = true;
var chartTitle = chart.ChartTitle.AddTextFrameForOverriding(data.chartTitle);

var textFormat = chartTitle.Paragraphs[0].Portions[0].PortionFormat;
textFormat.LatinFont = new FontData("Arial");
textFormat.FillFormat.FillType = FillType.Solid;
textFormat.FillFormat.SolidFillColor.Color = Color.Black;
textFormat.FontBold = NullableBool.True;
textFormat.FontHeight = 11;

chart.ChartTitle.TextFrameForOverriding.TextFrameFormat.CenterText = NullableBool.True;

Note: red arrow is not part of the graph, just indication of the issue. image

I tried to use the X and Y position to adjust the bottom padding of the title however the X position does not look good. This function is being used for multiple graph which should be dynamic, and the text must always be in center.

chart.ChartTitle.X = 300 / width;
chart.ChartTitle.Y = 0.15f;

image

I also tried the margin bottom, but it does not work at all for any value. chart.ChartTitle.TextFrameForOverriding.TextFrameFormat.MarginBottom = 10; chart.ChartTitle.TextFrameForOverriding.TextFrameFormat.MarginBottom = -100;

Please assist! thanks.

Aspose.Slides version: Aspose.Slides.NET Version 24.6.0

andreypotapovaspose commented 1 month ago

@sfgny, We have opened the following new ticket(s) in our internal issue tracking system and will investigate the case according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44639

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.