Hi,
I want to have a checkbox where the user can select the option to view the data. I tried using function but something doesn't seem to be correct in my code. Could you please advice?
Names default to here( 1 );
dt = Open( "$SAMPLE_DATA/Time Series/Raleigh Temps.jmp" );
New window(
"Graph with filter",
Data filter context box(
H list box(
V list box(
Text Box( "Enter month:"),
check Box( {"1","2", "3"}, << set(2),
<<SetFunction( Function( {neb},
ldf << (Filter Column( :Month Number ) << Where( :Month Number == ( neb << Get()) ) );
))
),
lb = outline box(
"data filter",
ldf = dt << Data filter(
"Local",
Add Filter(
columns( :Month Number ),
Where( :Month Number == 1 )
)
)
),
<< Padding(
Left(20), Right(20), Top(20), Bottom(20)
)
),
dt << Graph Builder(
Size( 400, 300 ),
Show Control Panel( 0 ),
Variables(
X( :Name( "Month/Year" ) ),
Y( :Temperature ),
Y( :Predicted Temperature, Position( 1 ) )
),
Elements( Line( X, Y( 1 ), Y( 2 ), Legend( 23 ) ) )
);
)
)
);
lb << Visibility("collapse");