Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
lo_user
Level I

how do i delete empty GraphBuilderBox ?

Hi,

I would like to create an interactive report. 

the report is built by appending graphs through a loop by the amount of parameters (entities). 

but if i choose X through Data Filter from {x,y,z} i get empty frame box (which is expected of course). 

 

I would like to create a button that will delete those empty FrameBox s, but i cant find a way to know if the GraphBuilderComponentBox has FrameBox as a child or not. (i found that if the FrameBox is empty it doesnt appear under GraphBuilderComponentBox  tree)

 

example for empty FrameBox:

lo_user_0-1587541393231.png

 

 

Thanks in advanced!

 

3 REPLIES 3
Highlighted
txnelson
Super User

Re: how do i delete empty GraphBuilderBox ?

You may be able to detect the absence of the FrameBox() using something like:

If( Try( Report( gb )[framebox( 1 )] << get image, "no framebox" ) == "no framebox",
	Report( gb )[Outline Box( 1 )] << delete
);
Jim
Highlighted
lo_user
Level I

Re: how do i delete empty GraphBuilderBox ?

Hi, 

as i understand your way references only one chart, how can i select all the chart with empty data?

this is my try with Xpath:

 

If( Try( (chartreport << XPath( "//FrameBox" )) << get image, "no framebox" ) == "no framebox",
	(chartreport << XPath( "//OutlineBox" )) << delete
);

For( j = 1, j <= N Items( entity_list ), j++,
	graph << append( Build_chart1( entity_list[j] ) )
);

chartreport = New Window( "test ", ob = H List Box( graph ) );

 

 

Highlighted
txnelson
Super User

Re: how do i delete empty GraphBuilderBox ?

I think you will need to look for OutlineBox() and then loop through them to check for missing frame boxes

zip=report(gb) << XPath( "//OutlineBox" )

Loop across the subscripts of zip, and check to see if there is a framebox there or not

If( try(zip[I][framebox(1)]<<get image, "no framebox") == "no framebox", ……….)
Jim
Article Labels

    There are no labels assigned to this post.