cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
yewhoo93
Level I

Failed to add text below Graph Builder using script

Hi all,

 

I recently updated from JMP 16 -> JMP 17 and the following script on line 5 is failing for me. I am not seeing the ' === below === ' below my graph builder. This used to work in JMP 16.

 

Any ideas on what happened or what I am missing? Appreciate the help in advance!

 

yewhoo93_0-1698821932916.png

yewhoo93_1-1698821989686.png

 

6 REPLIES 6
txnelson
Super User

Re: Failed to add text below Graph Builder using script

Try adding it after the Outline Box(), not after the whole report

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

biv = dt << Graph Builder( Variables( X( :age ), Y( As Column( :Height ) ) ) );
rbiv = Report( biv );
rbiv["Graph Builder"] << append( Text Edit Box( "=== Below ===" ) );

txnelson_0-1698823685793.png

 

Jim
jthi
Super User

Re: Failed to add text below Graph Builder using script

It does get added, but the place is something which isn't shown

jthi_0-1698824331801.png

Depending where you want to see the text, you can append it into other displayboxes in within the window. Graph Builder Outline box like Jim suggested or within the ListBox

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(Variables(X(:age), Y(:height)));
rep = Report(gb);
(rep << parent) << append(Text Edit Box("=== Below ==="));
-Jarmo
yewhoo93
Level I

Re: Failed to add text below Graph Builder using script

Appreciate your quick response and the suggestions. They are along the right track to the solution I am looking for.

 

I do want to add it right below the heading of the x-axis (as shown in the screenshot below).

 

Which listbox should I be appending the code too?

 

I tried looking at the Tree Structure and it didn't work when I appended right below the 'Age' TextEditBox.

 

yewhoo93_2-1698908002179.png

yewhoo93_4-1698908160713.png

 

jthi
Super User

Re: Failed to add text below Graph Builder using script

Few questions which affect how this can be approached:

  • What are you trying to outside of appending single text box?
  • What type of report are you building?
  • Why do you wish to append some additional text there?
  • How it will be appended (automated script, manually run script,...)?
-Jarmo
yewhoo93
Level I

Re: Failed to add text below Graph Builder using script

Thanks for the quick reply Jarmo,

 

I am trying to build a 'dashboard' requiring automation which appends multiple of these graph builders in one view.

 

The additional text is important to be there because I'll have many different graphs I want to loop through and be dynamic when I post them to the dashboard.

jthi
Super User

Re: Failed to add text below Graph Builder using script

Would it be easier to add the text box after V List Box with align("center") in which you contain both graph builder and the textbox?

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = New Window("demo",
	vlb = V List Box(align("center"))
);

vlb << Append(gb = dt << Graph Builder(Variables(X(:age), Y(:height))));
vlb << append(Text Edit Box("=== Below ==="));

there are also other methods depending on your full dashboard (H Center Box could work for example)

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = New Window("demo",
	vlb = V List Box()
);

vlb << Append(gb = dt << Graph Builder(Variables(X(:age), Y(:height))));
vlb << append(H Center Box(Text Edit Box("=== Below ===")));
-Jarmo