Hi,
I want to create a RB where you can change three variables Resistance, Currents, Voltage using Radio buttons.
Here's what I have tried but something doesn't seem to be correct. Any advice?
Names Default To Here( 1 );
stk = Current Data Table();
col = stk << Get Column Names( "String" );
Resist = {};
curr = {};
Volt = {};
For( i = 1, i <= N Items( col ), i++,
If(
Contains( col[i], "Resistance" ),
Insert Into( Resist, col[i] ),
Contains( col[i], "Currents" ),
Insert Into( curr, col[i] ),
Contains( col[i], "Voltage" ),
Insert Into( Volt, col[i] ),
)
);
New Window( "",
H List Box(
V List Box(
Radio Box(
{"Resitance", "Currents", "Voltage"},
<<SetFunction(
Function( {neb},
sel = neb << get selected;
If(
sel == "Resistance",
For Each( {col, index}, Resit,
obj << Remove Variables( N Items( obj << get variables() ), Role( "Y" ) );
gb << add variables( col, Role( "Y" ), Position( index ) );
),
sel == "Currents",
For Each( {col, index}, curr,
obj << Remove Variables( N Items( obj << get variables() ) );
gb << add variables( col, Role( "Y" ), Position( index ) );
),
sel == "Voltage",
For Each( {col, index}, Volt,
obj << Remove Variables( N Items( obj << get variables() ) );
gb << add variables( col, Role( "Y" ), Position( index ) );
);
)
;
)
)
)
),
V List Box(
obj = stk << Graph Builder(
Size( 518, 543 ),
Show Control Panel( 0 ),
Variables(
X( :Resistance A5, Combine( "Parallel Merged" ) ),
X( :Resistance A6, Position( 1 ), Combine( "Parallel Merged" ) ),
X( :Resistance A7, Position( 1 ), Combine( "Parallel Merged" ) ),
X( :Resistance A8, Position( 1 ), Combine( "Parallel Merged" ) ),
X( :Resistance A9, Position( 1 ), Combine( "Parallel Merged" ) ),
X( :Resistance A10, Position( 1 ), Combine( "Parallel Merged" ) ),
X( :Resistance A11, Position( 1 ), Combine( "Parallel Merged" ) )
),
Elements(
Box Plot( X( 1 ), X( 2 ), X( 3 ), X( 4 ), X( 5 ), Legend( 2 ) ),
Histogram( X( 1 ), X( 2 ), X( 3 ), X( 4 ), X( 5 ), Legend( 3 ) )
),
);
gb = Report( obj )[Graph Builder Box( 1 )];
obj << Parallel Axis Merging( "High Similarity" );
)
)
);
Thanks,
Jackie