This project is read-only.

Reversing the Y Axis Direction

Jan 31, 2012 at 3:38 PM



i am creating a iso line graph to represent the depth of water on surface

need to reverse the Y Axis direction ..

it plots the Y axis from 0-1000 where 0 is at the bottom of the graph

but i need the Axis to start its 0 from top and end with 1000 at the bottom..

x axis to switch to top instead of bottom

similar to MS chart control . AxisY.reverse

Please help me out on this..

any Help is highly appreciated



Mar 30 at 9:03 PM
I'm doing exactly the same thing.
Did you solve the problem?
Jun 1 at 8:48 AM
Found somewhere on the Internet:

plotter.DataTransform = new NegativeYDataTransforms();
//lineTrend.RenderTransform = plotter.RenderTransform;

public class NegativeYDataTransforms :DataTransform
    public override Point DataToViewport(Point pt)
        return new Point(pt.X, -pt.Y);
    public override Point ViewportToData(Point pt)
        return new Point(pt.X, -pt.Y);