cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
SophieC32
Level I

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

Bonjour,

 

J'ai un script qui me permettait de lancer un script depuis une base de données pour générer un graphique. Ensuite je supprime des éléments de ce graphique et c'est là où ça coince dans le script... Ce script marchait en JMP15 mais ne marche plus en JMP16 .

 

J'ai déjà remplacé "top" par "top parent", mais même si le code en lui-même marche, quand je le mets dans une Platform ça ne marche plus. Quelqu'un  a rencontré un problème similaire ?

 

J'ai l'erreur suivante : 

 

SophieC32_0-1653658373865.png

 

 

//:*/

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;

	
);

 

 

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;