locked
Chart zoom - axis and tick marks RRS feed

  • Question

  • Hi,

    I have a form which displays a chart.  I have chosen IsUserSelectionEnabled = true so I can zoom in on both x and y axis, which is just great.

    However, I notice that the axis labels, tick marks, or the major grid lines don't recalculate themselves.  That's fine, but I would like to keep the usual 5 major grid lines and recalculate them.

    Is there a method with the IsUserSelectionEnabled that can do this, or will it need to be done manually to calculate what the Min, Max and Interval should be (for both X and Y) and then set this with some kind of event handled sub function?

    Phil

    • Moved by Chester Hong Friday, August 24, 2012 6:16 AM (From:Windows Forms General)
    Thursday, August 23, 2012 6:10 PM

Answers

  • Hi,

    Check this link..

    http://www.codeproject.com/Articles/357817/MSChart-Extension-Zoom-and-Pan-Control

    • Proposed as answer by Ravindra.PC Monday, September 10, 2012 6:06 AM
    • Unproposed as answer by siplaModerator Monday, September 10, 2012 8:46 AM
    • Proposed as answer by Ravindra.PC Tuesday, September 18, 2012 8:32 AM
    • Marked as answer by newmanpj Tuesday, October 16, 2012 8:52 AM
    Monday, September 10, 2012 6:06 AM

All replies

  • Hi newmanpj,

    I'll move your thread to Chart Controls for .NET Framework, since you are asking about the chart controls.

    Thanks for your understanding.

    Best regards,


    Chester Hong
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, August 24, 2012 6:15 AM
  • Hi,

    Check this link..

    http://www.codeproject.com/Articles/357817/MSChart-Extension-Zoom-and-Pan-Control

    • Proposed as answer by Ravindra.PC Monday, September 10, 2012 6:06 AM
    • Unproposed as answer by siplaModerator Monday, September 10, 2012 8:46 AM
    • Proposed as answer by Ravindra.PC Tuesday, September 18, 2012 8:32 AM
    • Marked as answer by newmanpj Tuesday, October 16, 2012 8:52 AM
    Monday, September 10, 2012 6:06 AM
  • Hi,

    this looks really promising.  I've got the programme to run, and it does pretty much everything I want.  However, I'm very much a beginner at Visual Studio, so I'm not sure how best to implement this into my code.

    Firstly, I'm writing in Visual Basic (.NET) - and it's a bit late to change everything to C# so I'll need to change this programme.

    How do I implement this though? Do I just copy across the MSChartExtension.cs file (and update to VB) and then include it in my main program, or do I have to pick and choose certain parts of the code in order to implement it?

    Phil

    Tuesday, September 18, 2012 4:31 PM