For example, the maximum and minimum values of this:
{gradient({Scale Values([200000 0 -200000])})}
mx=200000
200000
mn=-200000
{gradient({Scale Values([ma 0 -ma])})}
</CODE></P><P><CODE class=" language-jsl">
This is my old school way of handling this:
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Treemap( Categories( :city ), Sizes( :POP ), Coloring( :CO ) ); treemapGBPref = Get Platform Preference( treemap( "Use Graph Builder" ) ); prefVal = Arg( Arg( Arg( treemapGBPref, 1 ) ) ); mx = 20; mn = 1; report = obj << report; Eval( Parse( "report << Dispatch( {}, \!"400\!", ScaleBox, {Legend Model( 1, Properties( 0, {gradient( {Scale Values( [" || Char( mn ) || " " || Char( mx ) || "] )} )}, Item ID( \!"CO\!", 1 ) ) )} );" ) );
When all else fails, this method always works. You need to learn it and put it into your tool box.
Thank Jim!
{gradient( {Scale Values( [" || Char( mn ) || " " || Char( mx ) || "] )} )}
As an alternative you could create the matrix outside of the command and use it via Name Expr(range)
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Treemap( Categories( :city ), Sizes( :POP ), Coloring( :CO ) ); range = [1 20]; (obj << Get Legend Server()) << Legend Model( 1, Properties( 0, {gradient( Scale Values( Name Expr( range ) ) )} ) );