Hi!
1)
I have data with one column that has two different names (depending on which data I am using).
It is either called "Storage condition" or "Temperature".
I made a graph with graph builder and saved the script, but I would like to use the same script for every database I am using.
I tried to add | to the script - but it doesn´t seem to work.
Any ideas?
Graph Builder(
Variables(
X( :Sample name ),
Y( :Name( "main peak (%)" ) ),
Y( :Name( "aggregate (%)" ), Position( 1 ) ),
Y( :Name( "degradation (%)" ), Position( 1 ) ),
Group X( <FONT color="#FF0000">:Storage condition | :Temperature,</FONT> N View Levels( 1 ), First View Level( 3 ) ),
Group Y( :Time point, N View Levels( 1 ), First View Level( 4 ) )
),
Elements(
Bar(
X,
Y( 1 ),
Y( 2 ),
Y( 3 ),
Legend( 14 ),
Bar Style( "Stacked" ),
Label( "Label by Value" )
)
),
SendToReport(
Dispatch(
{},
"main peak (%)",
ScaleBox,
{Min( 90 ), Max( 101 ), Inc( 1 ), Minor Ticks( 1 )}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Text( "Relative peak area (%)" )}
)
)
)2)
I have a stacked bar and I added lable by value.
However, when I change the scale (Y-axis), the lower value is not shown (but it is shown when the scale hasn´t been changed).
Can I somehow have the Y-axis scale from 95-100 and yet see both values?

Thanks!
All that needs to be done, is to determine which column has been extracted, and then specify it in the script. Here is my modification of your script:
names default to here(1);
dt=current data table();
If(try(dt:sex<<GET name=""></GET>
Concerning the stacked bar issue, I suggest you contact JMP Support
support@jmp.com
Hello,
Thank you for this, but it only seems to work when I have "Storage condition" but not "Temperature".
Should I always change the script depending if I have "Storage condition" or "Temperature"? Or can I have in the script "Storage condition" OR "Temperature"?
Thanks!
When you run the script on a data table that has the Temperature column, what error is specified in the JMP Log?
I´m sorry, I meant the other way around - it works with Temp but not Storage Cond
My error.....I did not change the column it was getting the conditional check from....try this code
names default to here(1);
dt=current data table();
If(try(dt:Storage condition<<GET name=""></GET>