Subscribe Bookmark RSS Feed

How to link a Chart display box from report to source dt?

djhanson

Community Trekker

Joined:

Jun 23, 2011

Hi, does anyone know how to link a chart display box from a report located in a new window to the source data table? (e.g. hyperlink it somehow, etc)

Here's what I mean:

myBiv=Bivariate(

     Y( :Y ),

     X( :X ), ....

);

myReport=myBiv<<report;

new window("MyWin",myReport[outlinebox(1)]);  //create a display box of the chart in the new window

So "MyWin" window displays a chart display box and I'd like to click on it to open up/maximize the original data table (which created the source chart myBiv if that makes sense).  thanks, dj

3 REPLIES
djhanson

Community Trekker

Joined:

Jun 23, 2011

I think what I was looking for was some way to embedd a URL into an object.  I briefly looked into MouseTrap and Handle...but ended up doing a separate ButtonBox("My Window",data table(dt)<<show window(1)) instead.  cheers, dj

ms

Super User

Joined:

Jun 23, 2011

An example using mousetrap:

path = "$SAMPLE_DATA/Big Class.jmp";

dt = Open( path );

myBiv = Bivariate( Y( :height ), X( :weight ), );

myReport = myBiv << report;

Eval(

  Parse(

  Eval Insert(

  "myReport[frame box( 1 )] << add graphics script( Mousetrap( Open( \!"^path^\!" ) ))"

  )

  )

);

New Window( "MyWin", myReport[Outline Box( 1 )] );

Close( dt, No Save );

Clear Globals();

//Click on graph in MyWin to open original table

markbailey

Staff

Joined:

Jun 23, 2011

Is there a reason that you won't simply include the original report in the new window in the first place? For example,

New Window( "My New Window",

     // include report object directly

     Bivariate( Y( :Y ), X( :X ) )

);

It would have all of the usual live, interactive features.

Learn it once, use it forever!