Salut @hcarr01 ,
Je ne sais pas exactement ce que vous voulez faire, mais je pense que je comprends. C'est une façon de le faire en utilisant le code JSL ci-dessous - vous pouvez voir comment cela se fait sur le fichier Big Class.jmp. Ici, j'ai juste choisi de colorer :age <=14 rouge et >=15 vert.
Names Default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
For(i=1, i<=NRows(), i++,
If(
:age[i]<=14,
:age<<COLOR cells="">=15, :âge< <COLOR cells=""></COLOR></COLOR>
Another option would be to set a Spec Limit for the column and use Analyze > Quality and Process > Manage Limits and then use the red hot-button to color out of spec cells. The default here is blue if > USL and red if < LSL, and I don't think you can edit this in the preferences.
One of these options should get you to where you want to go, I think. If you want to color the row state, then you could also try the Color by Column() command. See the Scripting Index example:
<CODE class=" language-jsl">Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Color by Column( :Age );
Wait( 2 );
dt << Color Rows by Row State;
The last command will also color the rows according to how they've been assigned in Color by Column.
Definitely one of these options should get you what you're after.
Good luck!,
DS
Dans le constructeur de graphique, je créé une mesure à partir de la capture ci-dessous :

Une fois que la nouvelle mesure est créé par exemple Transformation[B] = A - B je la rajoute dans le graphique comme dans capture ci-dessous :

Est-il possible de modifier la couleur de la mesure Transformation[B] en fonction des valeurs ?
J'ai essayé avec le script suivant mais rien ne se passe, aucune couleur ne s'affiche sur le graphique !
Graph Builder(
Transform Column(
"indicateurs (A-B)",
Formula( Col Sum( :A ) - Col Sum( :B ) )
),
Size( 534, 450 ),
Show Control Panel( 0 ),
If( indicateurs (A-B) < 0,
Title Fill Color( "Light Red" ),
Title Frame Color( "Light Red" ),
Level Fill Color( {255, 193, 202} ),
Level Frame Color( "Light Red" ),
Level Spacing Color( "Light Red" ),
,
Title Fill Color( "Light Green" ),
Title Frame Color( "Light Green" ),
Level Fill Color( {190, 255, 202} ),
Level Frame Color( "Light Green" ),
Level Spacing Color( "Light Green" ),
),
Variables(
X( :Mois ),
Y( :A ),
Y( :B, Position( 1 ) ),
Group X( :"indicateurs (A-B)"n )
),
Elements( Bar( X, Y( 1 ), Y( 2 ), Legend( 5 ), Label( "Label by Value" ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties( 0, {Fill Color( 51 )}, Item ID( "A", 1 ) ),
Properties( 1, {Fill Color( 21 )}, Item ID( "B", 1 ) )
)}
)
)
);