Uso Make Filter Change Handler () per modificare dinamicamente il titolo dell'asse y in base alle modifiche apportate dall'utente sul filtro dati locale. Lo script utilizza la soluzione di @hogi da Qui . Tuttavia, nel mio caso di esempio (script sotto) che rappresenta da vicino il mio caso reale, il titolo dell'asse y cambia solo dopo che la seconda casella di controllo è selezionata su "età". Come modificare la tessera dell'asse y alla prima selezione dell'età (sono su JMP 16.2.0)?
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
Size( 855, 687 ),
Show Control Panel( 0 ),
Variables( X( :name ), Y( :age ), Group Y( :height ) ),
Elements( Points( X, Y, Legend( 37 ) ) ),
Local Data Filter(
Conditional,
Add Filter(
columns( :sex, :age ),
Where( :sex == "F" ),
Display( :sex, "Check Box Display" ),
Display( :age, "Check Box Display" )
)
),
SendToReport(
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "Y title", TextEditBox, {Rotate Text( "Left" )} )
)
);
ldf = Current Report()["Local Data Filter"] << get scriptable object;
changeTitle = Function( {this},
print(this);
ldfText = Regex(ldf << get where clause(),"\( *(:age == .*?)\)","\1");
if(ismissing(ldfText),ldfText = "all ages");
(Report( gb ) << XPath( "//TextEditBox" ))[4] << Set Text( ldfText );
);
fsh = ldf << Make Filter Change Handler(
changeTitle();
);