We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Data labels rotation per series

Hi,


I would like to know how I can rotate the data labels per series. I want to rotate them 60 degrees. If there is no way to do it per series. Please let me know how to rotate the chart’s data labels.

Thank you

Hi Alexandros,

Thanks for your interest in Aspose.Slides.

I have observed your requirements and have not been able to completely understand them. Can you please share the requirements in the form o PowerPoint presentation so that I may understand them on my end to help you further in this regard. As per my understanding, if you are talking about chart series data labels, they cannot be rotated even in PowerPoint. Please share the requested information so that I may help you further.

Many Thanks,

It is really easy to understand what i need. I need the labels in the chart to rotate in x degrees. In PowerPoint this is possible if you do the following:

  • Go to a chart
  • Format Data Labels
  • Alignment
  • Custom angle = 60 degrees
And done.

Thank you

Hi Alexandros,

I have observed your requirements and suggest you to please try using the following sample code on your end to serve the purpose. I hope this will be helpful. Please share, if I may help you further in this regard.

public static void TestChartLabelsRotation()
{
Presentation pres = new Presentation();
IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 300, 300);

IChartData chartData = chart.ChartData;

IChartSeries series = chartData.Series[0];

series.Labels.DefaultDataLabelFormat.ShowValue = true;

series.Labels.DefaultDataLabelFormat.TextFormat.TextBlockFormat.AnchoringType = TextAnchorType.Center;
series.Labels.DefaultDataLabelFormat.TextFormat.TextBlockFormat.TextVerticalType = TextVerticalType.Vertical270;

pres.Save(“D:\Aspose Data\ChartLabels.pptx”, SaveFormat.Pptx);
}

Many Thank,

Hi,


I have found this way. However, I need to set a custom value. For example -60 degrees. Is it possible?

Thank you in advance.

Hi Alexandros,


I have observed your requirements and regret to share that at the moment setting custom angle for text rotation is unavailable in Aspose.Slides. An issue with ID SLIDESNET-37033 has been added in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the support will be available…

Many Thanks,

Any updates on the above?

Hi Alexandros,

I have verified from our issue tracking system and glad to share that concerned issue has been marked as resolved in upcoming version of Aspose.Slides for .NET 16.1.0. We will share the notification with you as soon as the product will be released online during February.

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-37033) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.