locked
Labels not showing on Column chart RRS feed

  • Question

  • Hi All,

    I am using the column chart in my VB.Net code. I have a very long series of data round 20 columns are creating. I am facing the problem is the labels are not showing under all columns. It is showing for 2 alternate columns.

    Can anyone please help on this, I want to show all the lavels on the chart.

    Thanks in advance.

    Afreen

    Wednesday, November 6, 2013 2:28 PM

Answers

  • Thanks alot George.

    Now its showing all the values on X Axis.

    Thanks again for your help.

    Regards,

    Afreen

    • Marked as answer by Afreen_IT Thursday, November 7, 2013 7:09 PM
    Thursday, November 7, 2013 7:09 PM

All replies

  • Hi Afreen,

    The chart control attempts to fit on as many axis labels without overlapping as it can depending on the size of the control. 

    The axis has a IntervalAutoMode which can either be FixedCount or VariableCount. VariableCount will mean that the chart will remove tick marks and hence labels on the axis for the sake of clarity. If you want to always show all the labels use FixedCount.

    You may have to change how the labels are displayed, which you can do with the axis LabelStyle. So you could set LabelStyle.IsStaggered to true so the labels are shown in 2 rows, or you could set LableStyle.Angle =90 so the labels are shown at 90 degrees to the axis.

    Download the samples from the link in the 'Helpful Links' sticky there are examples that demonstrate this.


    George
    http://www.sharpstatistics.co.uk

    Wednesday, November 6, 2013 7:47 PM
  • Hi George,

    Thanks for providing this solution.

    I tried this but still I am getting the labels for every alternate column not for all the columns (XValueMember).

    So, is there any other way to do this.

    Thanks in advance.

    Afreen

    Wednesday, November 6, 2013 8:52 PM
  • Difficult to know without seeing what you are doing, can you post a picture and a minimal example of your code?

    George
    http://www.sharpstatistics.co.uk

    Thursday, November 7, 2013 2:57 PM
  • Hi George,

    Thanks again.

    I am attaching the picture of the chart. If you see the name of the locations below the columns, they are not showing for all columns. That is my problem, I want to show the names under all the columns.


    Afreen

    Thursday, November 7, 2013 3:48 PM
  • You only have tick marks for alternate columns so it is not the label resizing that is causing the problem. Try setting the x axis interval to 1.

    George
    http://www.sharpstatistics.co.uk

    Thursday, November 7, 2013 6:52 PM
  • Thanks alot George.

    Now its showing all the values on X Axis.

    Thanks again for your help.

    Regards,

    Afreen

    • Marked as answer by Afreen_IT Thursday, November 7, 2013 7:09 PM
    Thursday, November 7, 2013 7:09 PM