Subscribe Bookmark RSS Feed

How to append the chart into tabs

blue1994

Contributor

Joined:

Feb 27, 2017

Hi, everyone

I have face one problem here, how can i divide the the chart into different tab?
Now i have 5 tabs with different product names,and each of the product has its own chart.

VC << Variability chart(
    Y(:Name( "I_P3G_G_PSVT_0.6/0.06" ) ,:Name( "I_P3HG_G_PHVT_0.6/0.06" ),:Name("NEW_I_P3G_G_PSVT_0.6/0.06") , :Name("NEW_I_P3HG_G_PHVT_0.6/0.06"), :Name("Gross Yield") ),
	X( :Name( "Lot" ), :Name( "F_V_L " ) ),
	Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
	
);

On the above code, it will generate out 3 types of products(meant here 3 different product name) with 5 variability charts(all the charts are different from each other-data extract from dataset), so how can i append these 3 different types of product into 3 different tabs?How to divide each of the chart and then append into tabs?

 

This is the tabs that are already created:

VariabilityWindow = New Window("Variability Chart",tb = Tab Box() );

For(i = 1, i <=Nrows(dt2), i++,
	tb << insert(
		dt2: F D[i] || Char(i),
		V list Box(
			Button Box("Variability Chart #" || Char(i) ),
)
)
);

Thanks.

 

6 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

JMP allows one to append, prepend, sibappend, etc. to any other object.  All that has to be done, is to identify the object to be moved, and the object to be moved to, and then determine what placement (append, prepend, etc.) that provides the desired placement.  Here is an example

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );

// Create a display window
nw = New Window( "test", tb = Tab Box( "tab 1", vlb1 = V List Box() ) );

// create a display
biv1 = bivariate( x( :height ), y( :weight ), invisible );

// Move the chart to the tab box
vlb1 << append( Report( biv1 ) );
Jim
Craige_Hales

Staff

Joined:

Mar 21, 2013

cool...hadn't thought about using invisible that way.

Craige
blue1994

Contributor

Joined:

Feb 27, 2017

Hi,
What i trouble now is when i run the script, it automatic generate out 3 of the charts of 3 different products due to they use the same parameters list from my data table.
So for my case, I need to separate it one by one? After that just append into each tab?
txnelson

Super User

Joined:

Jun 22, 2012

Yes, each chart needs to be defined as required.

Jim
blue1994

Contributor

Joined:

Feb 27, 2017

is there any alternative ways to do it?
Can you give me some hints, what functions can be apply to separate the chart?
I have try using the locate items in a list, then try to append into the tabs, but it seems cannot function.
It still generate out all the 3 charts together when i run the script.
Can you share with me some hints?
Thanks
ian_jmp

Staff

Joined:

Jun 23, 2011

Not sure if this gives further help or not. But building on Jim's example above:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );

xList = {:height, :weight};
yList = {:height, :weight};

// Create a display window
nw = New Window( "test", tb = Tab Box());

// Loop over the lists
for(x = 1, x <= NItems(xList), x++,
	for(y = 1, y <= NItems(yList), y++,
		// Make a tab box in thw window
		tb << Append("Tab "||Char(x)||Char(y), vlb = VListBox());
		// Create an invisible display
		biv = bivariate( x( xList[x] ), y( yList[y] ), invisible );
		// Move the chart to the tab box
		vlb << append( Report( biv ) );
		// Close the invisible display
		Report(biv) << closeWindow;
	);
);