Need to remove back line in line chart.. how to acheive

Answered Need to remove back line in line chart.. how to acheive

  • Monday, September 20, 2010 1:47 PM
     
     
    Hi ,I m using one line chart in my application .i want to remove back lines ..i just want tho show the bars thats it in my chart.. is there any way to remove those line..

All Replies

  • Monday, September 20, 2010 1:55 PM
    Moderator
     
     Proposed Answer

    do you mean the GridLines?

    look in the Chart.ChartAreas.AxisX or AxisY. That is where the GridLines property is

    you can set the Enabled property to False

  • Monday, September 20, 2010 1:56 PM
    Moderator
     
     Answered Has Code

    I'm not sure which black lines you are referring to, but you could try:

    'remove only the gridlines
    Chart1.ChartAreas(0).AxisX.MajorGrid.Enabled = False
    Chart1.ChartAreas(0).AxisY.MajorGrid.Enabled = False
    
    'or remove the axes and gridlines (will also remove axis labels)
    Chart1.ChartAreas(0).AxisX.Enabled = AxisEnabled.False
    Chart1.ChartAreas(0).AxisY.Enabled = AxisEnabled.False
  • Tuesday, September 21, 2010 7:20 AM
     
     
    thanks man ..working...
  • Saturday, January 21, 2012 3:14 AM
     
     
    thanks man ..working...

    When someone answers your question, please mark it as the answer.

    Thanks!


    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)