Free Support Forum -

Chart y-axis data truncate problem

I am facing problem in showing the chart. The y-axis the data it is showing parallel to y-axis when there is more text. In all other cases, it is showing the data parallel to x-axis and looks good. Attached is the image which shows the problem. Can we set the width for the y-axis data titles or can we define the direction either show horizontal or vertical?

Please help me out.//


Yes, the attached image shows the truncate problem. However, in order to further investigate the issue, we need the source data sheet as well. Please share the source Excel file as well.

Thank you

Attached is the sample Excel file.
And below is the code to generate the chart.

chart.NSeries.Add(string.Format("{0}!C1:C{1}", sheet1.Name, rowIndex - 1), true);
chart.NSeries.Add(string.Format("{0}!D1:D{1}", sheet1.Name, rowIndex - 1), true);

//Set properties of nseries
chart.NSeries.Add(string.Format("{0}!B1:B{1}", sheet1.Name, rowIndex - 1), true);
//Chart categories - Y Axis.
chart.NSeries.CategoryData = string.Format("{0}!A1:A{1}", sheet1.Name, rowIndex - 1);

rowIndex is some variable which holds number of rows in the excel data.


Do you use Chart to Image feature?. If so, kindly post your generated/source Excel file here, we will check it soon.

Generally, you may use:
chart.CategoryAxis/ValueAxis.TickLabels.Rotation = 0; to set the labels horizontally, so you may try it.

If you still have any problem, kindly let us know.

Thank you.

Rotation did the trick.
Thanks for the solution.