Search code examples
c#mschart

change column value to vertical in MSchart


I create a chart with MSchart but for some charts I wanna to make data values of each column to be vertical. There is no much space for labels to be horizontal. I see some similar question but none of them works for me.

Data Values


Solution

  • To turn the DataPoint labels you need to first turn off the SmartLabelStyle:

     chart1.Series[0].SmartLabelStyle.Enabled = false;
    

    Now you can set the LabelAngle :

     chart1.Series[0].LabelAngle = 90;