Subscribe Bookmark RSS Feed

Mouse location graph builder

rw1

Community Trekker

Joined:

Jan 26, 2012

Is there a way to get the mouse location on a graph created using graph builder?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales

Staff

Joined:

Mar 21, 2013

Solution

yes, you can use the cross hair tool (shortcut C, A to get back to Arrow)

8067_crosshair.png

to read coordinates off a graph.

If you are writing JSL code to do something, you can add a graphic script:


Graph Builder(


    Size( 522, 450 ),


    Show Control Panel( 0 ),


    Variables( X( :weight ), Y( :height ) ),


    Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) ),


    SendToReport(


        Dispatch(


            {},


            "Graph Builder",


            FrameBox,


            {Add Graphics Script(


                2,


                Description( "Script" ),


                If( Is Empty( g_x1 ),


                    g_x1 = [139.41, 134.50, 92.26];


                    g_y1 = [68.63, 52.27, 63.04];


                );


                Drag Line( g_x1, g_y1 );


            ), Grid Line Order( 1 ), Reference Line Order( 3 )}


        )


    )


)



there are several script functions similar to drag_line that allow the graph to interact with the mouse.  This example is built in to the graph's Customize->plus->samples.  You can drag the endpoints.

Craige
2 REPLIES
Craige_Hales

Staff

Joined:

Mar 21, 2013

Solution

yes, you can use the cross hair tool (shortcut C, A to get back to Arrow)

8067_crosshair.png

to read coordinates off a graph.

If you are writing JSL code to do something, you can add a graphic script:


Graph Builder(


    Size( 522, 450 ),


    Show Control Panel( 0 ),


    Variables( X( :weight ), Y( :height ) ),


    Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) ),


    SendToReport(


        Dispatch(


            {},


            "Graph Builder",


            FrameBox,


            {Add Graphics Script(


                2,


                Description( "Script" ),


                If( Is Empty( g_x1 ),


                    g_x1 = [139.41, 134.50, 92.26];


                    g_y1 = [68.63, 52.27, 63.04];


                );


                Drag Line( g_x1, g_y1 );


            ), Grid Line Order( 1 ), Reference Line Order( 3 )}


        )


    )


)



there are several script functions similar to drag_line that allow the graph to interact with the mouse.  This example is built in to the graph's Customize->plus->samples.  You can drag the endpoints.

Craige
rw2

Community Trekker

Joined:

Feb 21, 2015

Thanks - this worked great.