cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
zetaVagabond1
Level III

Column Switcher not appearing in Graph Builder script

I’ve written a Graph Builder script with two Column Switchers (for X and Y axes).
The code runs without errors, but the Column Switcher controls do not appear in the graph UI.

When I simplify to a standalone Graph Builder (outside New Window or New Script), the switchers appear normally.

Is there a known limitation or syntax nuance that causes Column Switcher not to render when used inside saved table scripts or New Window blocks?

Example (anonymized but structurally identical):

 

// Visualization Script: KPI Trends by X-axis

Current Data Table() << New Script(
	"Graphs: KPI v X-axis",
	New Window("KPI Trends",
		Graph Builder(
			Size( 457, 346 ),
			Fit to Window( "Off" ),
			Variables(
				X( :"X-axis Variable"n ),
				Y( :"Primary Metric (%)"n ),
				Overlay( :Batch_ID ),
				Color( :Group_ID )
			),
			Elements(
				Line( X, Y, Legend( 21 ) ),
				Points( X, Y, Legend( 22 ) )
			),
			
			// Switch between time-based axes
			Column Switcher(
				:"X-axis Variable"n,
				{:"X-axis Variable"n, :"Alternate X Variable"n}
			),
			
			// Switch between various KPIs on Y-axis
			Column Switcher(
				:"Primary Metric (%)"n,
				{
					:"Primary Metric (%)"n,
					:"Metric_1 (unit)"n,
					:"Metric_2 (unit)"n,
					:"Metric_3 (unit)"n,
					:"Metric_4 (unit)"n,
					:"Metric_5 (unit)"n,
					:"Metric_6 (unit)"n,
					:"Metric_7 (unit)"n
				}
				//Retain Axis Settings( 0 )   // (Commented)
			),

			SendToReport(
				Dispatch(
					{},
					"Primary Metric (%)",
					ScaleBox,
					{Min( 0 )}
				)
			)
		)
	)
);

Notes:

  • All referenced columns exist in the table and are numeric/continuous.

  • JMP version: 18

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Column Switcher not appearing in Graph Builder script

Quickly looking at your script I'm not sure what could be wrong. Is anything being printed to the log? Do you have multiple tables open? Is graph being created from the correct table when you run the table script?

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");


dt << New Script("Graph",
	New Window("",
		Graph Builder(
			Size(528, 448),
			Show Control Panel(0),
			Fit to Window("Off"),
			Variables(X(:SITE), Y(:NPN1)),
			Elements(Points(X, Y, Legend(3))),
			Column Switcher(:NPN1, {:NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1, :PNP4}),
			Column Switcher(:SITE, {:lot_id, :wafer, :Wafer ID in lot ID, :SITE}),
			SendToReport(
				Dispatch(
					{},
					"NPN1",
					ScaleBox,
					{Min( 0 )}
				)
			)
		)
	)
);
-Jarmo

View solution in original post

4 REPLIES 4
jthi
Super User

Re: Column Switcher not appearing in Graph Builder script

Quickly looking at your script I'm not sure what could be wrong. Is anything being printed to the log? Do you have multiple tables open? Is graph being created from the correct table when you run the table script?

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");


dt << New Script("Graph",
	New Window("",
		Graph Builder(
			Size(528, 448),
			Show Control Panel(0),
			Fit to Window("Off"),
			Variables(X(:SITE), Y(:NPN1)),
			Elements(Points(X, Y, Legend(3))),
			Column Switcher(:NPN1, {:NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1, :PNP4}),
			Column Switcher(:SITE, {:lot_id, :wafer, :Wafer ID in lot ID, :SITE}),
			SendToReport(
				Dispatch(
					{},
					"NPN1",
					ScaleBox,
					{Min( 0 )}
				)
			)
		)
	)
);
-Jarmo
zetaVagabond1
Level III

Re: Column Switcher not appearing in Graph Builder script

This code is exactly as per the reference script. In that this works fine. 

I thought this could be a version specific bug. 

jthi
Super User

Re: Column Switcher not appearing in Graph Builder script

My example script works fine on the versions I can test with: JMP18.2.0, JMP18.2.1, and JMP19.0.1

-Jarmo

Re: Column Switcher not appearing in Graph Builder script

For what it's worth, I created a dummy table with your column names and ran your exact script.  Both column switchers showed up as expected.  JMP 18.0.1

Recommended Articles