This will require scripting to my knowledge and it wasn't as simple as I thought it would be... hopefully there are easier methods to do this than the example I have here:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(529, 451),
Show Control Panel(0),
Variables(X(:age), Y(:height)),
Elements(Points(X, Y, Legend(11))),
);
filter = gb << Local Data Filter(Add Filter(columns(:sex), Where(:sex == "F")));
//filter = gb << Local Data Filter(Add Filter(columns(:age), Where(:age == 12)));
f = Function({a},
cur_filter_script = filter << Get Script;
filtered_values = Parse(Word(2, Char(Arg(Arg(Arg(cur_filter_script, 1), 2), 1)), "=="));
If(Type(filtered_values) == "List",
num_to_str = Transform Each({val}, filtered_values, char(val));
title = Concat Items(num_to_str, ", ");
,
title = char(filtered_values);
);
// set title changes wrong text (outline box)
// but << Show Title() controls correct one
// so we edit report layer
Report(gb)[TextEditBox(1)] << Set Text(title);
);
rs = filter << Make Filter Change Handler(f);
-Jarmo