Change Gradient Max with Slider boxHello,
Is there a way to vary the Max value of the gradient using the slider box?

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Wafer Stacked.jmp" );
sliderValue = .6;
New Window( "",
H List Box(
Panel Box( "Slider Box",
tb = Text Box( "Gradient Maxium: " || Char( sliderValue ) ),
sb = Slider Box( 0, 10, sliderValue, tb << Set Text( "Value: " || Char( sliderValue ) ) )
),
H List Box(
Graph Builder(
Size( 592, 569 ),
Show Control Panel( 0 ),
Variables( X( :X_Die ), Y( :Y_Die ), Color( :Defects ) ),
Elements( Heatmap( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 5, Properties( 0, {gradient( {Min Lightness( 0 ), Width( 12 )} )}, Item ID( "Defects", 1 ) ) )}
)
)
)
)
)
);Automation and ScriptingRe: Change Gradient Max with Slider boxYou can
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Wafer Stacked.jmp");
sliderValue = 0.6;
nw = New Window("",
H List Box(
Panel Box("Slider Box",
sb = Slider Box(0, 10, sliderValue,
vals = [.] || Matrix(sliderValue);
Eval(EvalExpr(
item << Set Properties({gradient({Scale Values(Expr(vals))})})
));
)
),
H List Box(
gb = dt << Graph Builder(
Size(592, 569),
Show Control Panel(0),
Variables(X(:X_Die), Y(:Y_Die), Color(:Defects)),
Elements(Heatmap(X, Y, Legend(5))),
SendToReport(
Dispatch({}, "400", ScaleBox,
{Legend Model(
5,
Properties(
0,
{gradient({Min Lightness(0), Width(12)})},
Item ID("Defects", 1)
)
)}
)
)
)
)
)
);
server = gb << Get Legend Server;
item = server << Get Legend Item(5, 1);Re: Change Gradient Max with Slider boxI believe you can do what you want by changing the Scale Values using a Set Gradient Scale Values message. See the Scripting Index for description and examples.