BookmarkSubscribe
Choose Language Hide Translation Bar
DSA
DSA
Community Trekker

Column switcher & callback scripts?

Hey JMP community,

 

I have a control chart with a column switcher, and I would like to update a reference line in the control chart when the column in the switcher is changed, but I cannot find an action on the column switcher object that seems to be able to to that. All the actions i get in showproperties() are related to changing the values via JSL.

 

 

Any suggestions? :)

 

Thanks in advance,

Daniel

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Column switcher & callback scripts?

Frame Box() is where you will find such call backs.  You can 

     << Add Graphic Script

to the Frame Box(), which is triggered anytime something changes in the chart

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
	Y( :weight ),
	X( :height ),
	FitLine
);
rbiv = biv << report;
framebox = rbiv[frame box( 1 )];
framebox <<
Add Graphics Script(
	Transparency( 0.5 );
	Fill Color( {1.0, 0.5, 0.0} );
	Polygon( [60, 72, 57], [75, 120, 120] );
);
Jim
5 REPLIES 5
txnelson
Super User

Re: Column switcher & callback scripts?

Frame Box() is where you will find such call backs.  You can 

     << Add Graphic Script

to the Frame Box(), which is triggered anytime something changes in the chart

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
	Y( :weight ),
	X( :height ),
	FitLine
);
rbiv = biv << report;
framebox = rbiv[frame box( 1 )];
framebox <<
Add Graphics Script(
	Transparency( 0.5 );
	Fill Color( {1.0, 0.5, 0.0} );
	Polygon( [60, 72, 57], [75, 120, 120] );
);
Jim
DSA
DSA
Community Trekker

Re: Column switcher & callback scripts?

Thank you for a very quick and accurate reply Jim,

it works flawlessly!

 

/Daniel

0 Kudos
Highlighted
DSA
DSA
Community Trekker

Re: Column switcher & callback scripts?

Hmm, now when I have played a bit with it it does seem like the script is launched always, over and over, and not only on changes in the graph.

 

It is basically killing JMP by updating this reference line over and over...

 

rep2 = cc2 << Report;
rep2[FrameBox(2)]<<Add Graphics Script( SCRIPT );

 

I am running JMP 13.2.0

0 Kudos
txnelson
Super User

Re: Column switcher & callback scripts?

I have run into your observed issue, and overcome it by putting into the Grapics Script my own logic to only update when the script detects the change conditions I want to trigger on.

Jim
DSA
DSA
Community Trekker

Re: Column switcher & callback scripts?

Thanks for the reply.

 

I've managed to implement a trigger as you suggested and it works much better now.

 

Thanks,

Daniel