Zedgraph :Zoom to Datapoint

2012-08-14
2012-10-04
  • justunme0805

    justunme0805 - 2012-08-14

    Hello Everyone,

    I have two text boxes where the user enters the X and Y location. Using this
    information i need to zoom to that datapoint or curve in the graph. Any inputs
    and code samples will be appreciated.

    Thanks

    JJ

     
  • Anonymous - 2012-10-04

    You could do something like this:

    double x = 9.9;
    double y = 12.1;
    double spacing = 5.0;
    zgc.GraphPane.XAxis.Scale.Min = x - spacing;
    zgc.GraphPane.XAxis.Scale.Max = x + spacing;
    zgc.GraphPane.YAxis.Scale.Min = y - spacing;
    zgc.GraphPane.YAxis.Scale.Max = y + spacing;
    zgc.Refresh();

    I don't know if 'spacing' is the correct word, english isn't my native language ;)

     
    Last edit: Anonymous 2012-10-04

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks