cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Add Row legend to Control Chart

Hey all!

I'm working on some P-charts and I would like to add a legend. First thing I notice is that I can't "click my way" to adding one to a chart. I've tried forcing my script to add it, and that results in an error (as expected).

Any ideas how I can add a legend? I suspect it will involve more advanced scripting techniques, but I'm open :).

Cheers!
Chadd

Example Script:
asdf = Current Data Table() << Control Chart(
Sample Label( :week ),
Sample Size( :units ),
KSigma( 3 ),
Chart Col( :Blah, P ),
By( :stuff )
);

Report(asdf)[Frame Box(1)] << Row Legend (:week, color(1), marker(1));

Error:
Send Expects Scriptable Object in access or evaluation of 'Send' , Report( asdf )[Frame Box( 1 )] << Row Legend( :week, color( 1 ), Marker( 1 ) )
1 REPLY 1

Re: Add Row legend to Control Chart

I believe the error is because of the color and marker fields. If you run the command just with 

Report(asdf)[Frame Box(1)] << Row Legend (:week);

this should work fine. 

The legend will use the color settings in the column :week whic you would have to define in advance, best in the column properties as value labels or alternatively as Mark rows by column option using this column..

/****NeverStopLearning****/

Recommended Articles