Subscribe Bookmark RSS Feed

Graph legends

matthewh

Community Trekker

Joined:

Jun 23, 2011

Hi,

I am creating a stacked bar chart from JSL and want to be able to access the legend from my script. The problem I have is that each bar can contain quite a few categories, but by default JMP puts the legend key into just a single column under the graph, which is not attractive.

Interactively, I can simply double-click in the legend area to access the "Legend settings", then change the "Item Wrap" setting to a more useful number, but I would like to be able to set this from my JSL script.

Does anyone know if (and how) this is possible, as I can't find anything useful in the scripting manual!

Many thanks,

Matthew.
3 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

Hello Matthew,

Once you have created your bar chart to you liking, you should be able to see the JSL that created it. Click on the little red triangle in the upper left hand corner of the bar chart, then go to Script > Save Script to Script Window.

Regards,
Peter
matthewh

Community Trekker

Joined:

Jun 23, 2011

Hi Peter,

thanks for your reply! Unfortunately I tried that and it doesn't seem to work - changing the Item Wrap setting does not change the resulting JSL code (it is identical to the default code). Also, if I do Script > Redo analysis, it redraws the graph with the previous Item Wrap setting.

I'm sure it must be possible from JSL via some sort of "SendToReport( Dispatch(" type command, but I can't work it out.

Regards,

Matthew.
XanGregg

Staff

Joined:

Jun 23, 2011

Sorry, looks like you can't get there in Chart. Here's the equivalent in Graph Builder: