Search code examples
c#.netchartsspreadsheetgear

Spreadsheetgear chart x-axis text orientation


I am using Spreadsheetgear to create and modify charts. I can create a chart and modify the data easily, however, I cannot seem to modify the orientation of text the way that I want.

The text lies on the x-axis and I am trying to get it to display at a 45 degree angle. I can do this manually by right clicking on the chart and manually setting the orientation angle to 45, but I want to do this using C#. Any help would be greatly appreciated.


Solution

  • IChart chart = ...;
    chart.Axes[SpreadsheetGear.Charts.AxisType.Category].TickLabels.Orientation = 45;