cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

How to delete elements in a graph builder object? [Platform, JMP16]

SophieC32
Level I

Good morning,

 

I have a script that allowed me to run a script from a database to generate a graph. Then I remove elements from this graph and that's where it gets stuck in the script... This script worked in JMP15 but no longer works in JMP16.

 

I have already replaced "top" by "top parent", but even if the code in itself works, when I put it in a Platform it doesn't work anymore. Has anyone encountered a similar problem?

 

I have the following error:

 

undefined

 

 

//:*/

Platform(
 Data Table( "3.1.2 - 3ACTI__Chambre__EQPID__B - Time Lines Table" ),
 gb1 = Graph Builder(
  Size( 575, 508 ),
  Show Control Panel( 0 ),
  Variables(
   X( Column( "3ACTI__DAY__B" ) ),
   Y( :Mean ),
   Overlay( Column( "3ACTI__Chambre__EQPID__B" ) )
    
  ),
  Elements( Line( X, Y, Legend( 4 ), Missing Values( "Connect Dashed" ) ), Points( X, Y, Legend( 1 ) ) ),
  Column Switcher(
   Column( "3ACTI__DAY__B" ),
   {Column( "3ACTI__DAY__B" ), Column( "3ACTI__WEEK__B" ), Column( "3ACTI__MONTH__B" )},
   Title( "Date Switcher" )
     
  ),
  Column Switcher( :Mean, {:Mean, :Median, :Std Dev}, Title( "Stat Switcher" ) ),
  SendToReport(
   Dispatch(
    {},
    "Graph Builder",
    OutlineBox,
    {Set Title(
     "Time Line by Date -!" || "Range SiO2 BASE" || " by " || "3ACTI__Chambre__EQPID__B"
    ), Image Export Display( Normal )}
       
   ),
   Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
       
  )
 );
 
 (gb1 << top parent)[Lineup Box( 1 )] << delete;
 (gb1 << top parent)[Popup Box( 1 )] << delete;
 (gb1 << top parent)[Text Box( 1 )] << delete;
 (gb1 << top parent)[Lineup Box( 1 )] << delete;
 (gb1 << top parent)[Slider Box( 1 )] << delete;
 (gb1 << top parent)[Popup Box( 1 )] << delete;
 (gb1 << top parent)[Text Box( 1 )] << delete;

 
);

 

 

This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .

1 ACCEPTED SOLUTION

Accepted Solutions
mikedriscoll
Level VI


Re: How to delete elements in a graph builder object ? [ Platform, JMP16]

Looks like the error is happening because the graph did not get drawn. I haven't used the platform() function, but if you append it in a vlistbox (or other display box container) within a new window() then the graph gets drawn. Then move the <<delete() commands to the end, after the graph is drawn. You might want to delete another slider box.  Here's an example with big class.jmp

 

names default to here (1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = new window("test", );
nw << append(Platform(
	dt,
	gb1 = Graph Builder(
		Size( 575, 508 ),
		Show Control Panel( 0 ),
		Variables(
			X( :height),
			Y( :age ),
			Overlay( :name )
   	
		),
		Elements( Line( X, Y, Legend( 4 ), Missing Values( "Connect Dashed" ) ), Points( X, Y, Legend( 1 ) ) ),
		Column Switcher(
			Column( "height" ),
			{Column( "height" ), Column( "weight" )},
			Title( "Date Switcher" )
    	
		),
		Column Switcher( :age, {:age, :sex}, Title( "Stat Switcher" ) ),
		SendToReport(
			Dispatch(
				{},
				"Graph Builder",
				OutlineBox,
				{Set Title(
					"Time Line by Date -!" || "Range SiO2 BASE" || " by " || "3ACTI__Chambre__EQPID__B"
				), Image Export Display( Normal )}
      	
			),
			Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
      	
		)
	);
	
	
));

	(gb1 << top parent)[Lineup Box( 1 )] << delete;
	(gb1 << top parent)[Popup Box( 1 )] << delete;
	(gb1 << top parent)[Text Box( 1 )] << delete;
	(gb1 << top parent)[Lineup Box( 1 )] << delete;
	(gb1 << top parent)[Slider Box( 1 )] << delete;
	(gb1 << top parent)[Popup Box( 1 )] << delete;
	(gb1 << top parent)[Text Box( 1 )] << delete;

View solution in original post

1 REPLY 1
mikedriscoll
Level VI


Re: How to delete elements in a graph builder object ? [ Platform, JMP16]

Looks like the error is happening because the graph did not get drawn. I haven't used the platform() function, but if you append it in a vlistbox (or other display box container) within a new window() then the graph gets drawn. Then move the <<delete() commands to the end, after the graph is drawn. You might want to delete another slider box.  Here's an example with big class.jmp

 

names default to here (1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = new window("test", );
nw << append(Platform(
	dt,
	gb1 = Graph Builder(
		Size( 575, 508 ),
		Show Control Panel( 0 ),
		Variables(
			X( :height),
			Y( :age ),
			Overlay( :name )
   	
		),
		Elements( Line( X, Y, Legend( 4 ), Missing Values( "Connect Dashed" ) ), Points( X, Y, Legend( 1 ) ) ),
		Column Switcher(
			Column( "height" ),
			{Column( "height" ), Column( "weight" )},
			Title( "Date Switcher" )
    	
		),
		Column Switcher( :age, {:age, :sex}, Title( "Stat Switcher" ) ),
		SendToReport(
			Dispatch(
				{},
				"Graph Builder",
				OutlineBox,
				{Set Title(
					"Time Line by Date -!" || "Range SiO2 BASE" || " by " || "3ACTI__Chambre__EQPID__B"
				), Image Export Display( Normal )}
      	
			),
			Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} )
      	
		)
	);
	
	
));

	(gb1 << top parent)[Lineup Box( 1 )] << delete;
	(gb1 << top parent)[Popup Box( 1 )] << delete;
	(gb1 << top parent)[Text Box( 1 )] << delete;
	(gb1 << top parent)[Lineup Box( 1 )] << delete;
	(gb1 << top parent)[Slider Box( 1 )] << delete;
	(gb1 << top parent)[Popup Box( 1 )] << delete;
	(gb1 << top parent)[Text Box( 1 )] << delete;