Try this for X Axis Tick Labels Excel.ChartObjects xlCharts = (Excel.ChartObjects)xlWorkSheet.ChartObjects(Type.Missing) ĬhartPage.Axes().Select() ĬhartPage.Axes().TickLabels. Hi Siddharth, Actullay i want to provide the Angle to "Term1", "Term2" – User123 10 mins ago ~~> From here this is the part which you wantĬhartPage.Axes().AxisTitle.Select() ĬhartPage.Axes().AxisTitle.Orientation = ĬhartPage.Axes().AxisTitle.Orientation = -i
Var series = (Excel.Series)chartPage.SeriesCollection(1) Įxcel.Axis valueAxis = (Excel.Axis)chartPage.Axes(, .XlAxisGroup.xlPrimary) ĬhartPage.Location(.XlChartLocation.xlLocationAsNewSheet, "Chart_" + sheetName) Įxcel.ChartObjects xlCharts = (Excel.ChartObjects)xlWorkSheet.ChartObjects(Type.Missing) ĬhartRange = xlWorkSheet.get_Range("A1", "d5") ĬhartPage.SetSourceData(chartRange, misValue) Again, this method is not robust option-wise. The keyboard shortcut to use is ALT + H + F + Q + O. 2.1 Selecting Text Options to Rotate Text in an Excel Chart When the Format Axis dialogue box appears, you have to select Text options. Albeit limited options-wise, you can use it only if it gives you the desired angle and if you’re always working on texts that need rotating. From the resulting menu, select one of the quick options to angle your text. There is a combo of keys you can input to rotate texts in Excel. In that group, you will see a button with an a and b and an arrow all on an angle. At this point, to change the orientation of the text from horizontal to vertical, you simply need to go to Start, located at the top of the Excel toolbar, and. Object misValue = Įxcel.ChartObjects xlCharts = (Excel.ChartObjects)newWorksheet.ChartObjects(Type.Missing) Įxcel.ChartObject m圜hart = (Excel.ChartObject)xlCharts.Add(10, 80, 300, 250) ĬhartRange = newWorksheet.get_Range(cell1, cell2) ĬhartPage.SetSourceData(chartRange, ) ĬhartPage.ChartType = įoreach (KeyValuePair> kvp in writetocsv)ĭate = (0, ( - ('_')) + 1) On the Home tab of the Ribbon, find the Alignment group. i want to format the in Excel => Format Axis =>Alignment =>Custom angle newWorksheet.Select(Type.Missing) Note that this will work only on the top level if you are utilizing the 'Multi-Level Category Labels' feature of the chart. Then find the Alignment area (depends on your version) Then Change Text Direction to Rotate All Text 270 degrees. I want to provide the custome angle to my labels on the x-axis to like -35 degrees. Hi Surveza, Right Click on the Axis and choose Format Axis.