locked
primary yaxis on right hand side, how? RRS feed

  • Question

  • Hi,

    A simple question,

    what property is set to get the primary yaxis to appear on the right side of the plot area?
    Sunday, January 24, 2010 4:12 PM

Answers

  • Why not just use the secondary axis? If you want to use both you can set primary axis position using Crossing property (as mentioned in the post above). The trick is that you can set this property to double.MaxValue to place the axis to the right most position.

    Alex.
    http://blogs.msdn.com/alexgor
    Sunday, January 24, 2010 6:31 PM

All replies

  • Well, I suppose this works somewhat, still more properties to adjust to get the labels outside the plot area...

    Chart1.ChartAreas(0).AxisX.Crossing = 100

    Is there another way?
    Sunday, January 24, 2010 4:28 PM
  • Why not just use the secondary axis? If you want to use both you can set primary axis position using Crossing property (as mentioned in the post above). The trick is that you can set this property to double.MaxValue to place the axis to the right most position.

    Alex.
    http://blogs.msdn.com/alexgor
    Sunday, January 24, 2010 6:31 PM
  • Alex,

    The problem with setting the crossing to double.maxvalue or any large number is that the tick marks and labels stick to the inside of the plot area.  This is for the primary y axis.

    I got the tick marks to go outside the plot area, how about the labels , there is no way that I see right now, so might be stuck and have to go with the secondary axis solution...
    Sunday, January 24, 2010 6:46 PM
  • If the data is sorted in the right way,

    just using
    .AxisX.IsReversed = True

    gets the primary y axis on the right hand side of the plot area.

    Sunday, January 31, 2010 11:50 AM