This project is read-only.

CursorCoordinateGraph for inner plotter

Oct 19, 2010 at 10:41 PM

How do I get a cursor coordinator on the right axis?

I tried to add the Cursor Coordinator to the InnerPlotter before adding the innerPlotter to the plotter children

But it did not work

Oct 20, 2010 at 2:22 PM
Edited Oct 20, 2010 at 6:15 PM

Look at the YTextMapping property, you can set this to a delegate that will translate the value as you desire.

In this example, injectedPlotter shares the x axis but the range on the y axis is different. Its viewport's transform has already been set.

DataTransform transform = injectedPlotter.Viewport.Transform.DataTransform; 
cursorTrackingGraph.YTextMapping = (y => String.Format(s, transform.ViewportToData(new Point(0, y)).Y));

I actually have a graph with several Y axes, and  build an array of these, so the user can press a key to cycle through them. It works very well.




My explanation was how to show the other Y axis value in the cursor coordinate graph. After rereading your question, I'm not sure that's what you were asking. Let me know if you need more help.