Un altro rompicapo per gli sceneggiatori là fuori...
Se ho un grafico che assomiglia a questo:

dt = Open("$Sample_Data/Big Class.jmp");
graph = dt << Graph Builder(
Size( 532, 452 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
);
Come lo farei apparire come sotto, dopo che la finestra del grafico è stata creata e usando solo i messaggi per lo stesso costruttore di grafici (cioè consideriamo gli stati delle righe fuori dalla tabella). Tramite la GUI, lo farei facendo clic con il pulsante destro del mouse sull'indicatore accanto a "altezza" nella legenda e modificando l'indicatore e il colore. Non riesco a capire come farlo tramite la messaggistica JSL, però.

dt = Open("$Sample_Data/Big Class.jmp");<BR /><BR />graph = Graph Builder(
Size( 532, 452 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
3,
Properties(
0,
{Line Color( 51 ), Marker( "Filled Down Triangle" )},
Item ID( "height", 1 )
)
)}
)
)
);
Pensieri?
M
Ciao Mike-
Penso che tu possa farlo impostando i valori nella legenda usando Legend Server e Legend Item. Di recente stavo cercando di fare qualcosa di simile e mi sono imbattuto in queste funzioni.
names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
);
server = gb << get legend server;
item1 = server << get legend item( 3, 1 );
item1 << set properties(
{
marker size ( 5 ),
marker ("Filled Down Triangle"),
Line Color ( 19 )
}
);
item2 = server << get legend item( 4, 1 );
item2 << set properties(
{
Line Color ( 25 ),
Line Style ( 2 )
}
);
- Scott
Stavo pensando la stessa cosa, ma immagino che ci sia qualcosa in quella strategia che non funziona bene quando si trova all'interno di una finestra del dashboard/generatore di applicazioni. Non riesco a connettermi al Legend Server.