Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Theresa
Level III

How JSL make charts like excel?

How JSL make charts like excel? Could you share the script?

 

Table will attach below:

 

Theresa_0-1584313990013.png

 

AreaC#N/AGrtalOps Cert RateQ1 Goal
530s Cel1231580%90%
830s M641060%90%
14PI1552075%90%
CM15 15100%90%
DF1711894%90%
Drh1462070%90%
Ttro Area1011191%90%
DA831173%90%
PIch25729%90%
R7 7100%90%
TF1631984%90%
T1121385%90%
W13 13100%90%
Yie Area6 6100%90%
Grand Total1523318582%90%

 

3 REPLIES 3
Highlighted
stan_koprowski
Community Manager Community Manager

Re: How JSL make charts like excel?

Hi @Theresa 

I have included a script in the data table to create a similar graph using JMP.

I created the graph interactively and then saved the script to the data table.

To keep the bars in the same order as they appear in the data table you can uncheck the custom order and keep the row order levels checked when using the value order column property.

row order column property.png

To make the reference line appear "in-front" of the bars I right-clicked on the graph and chose customize.

 

Right-Click to customize draw orderRight-Click to customize draw order

 

Use the up or down arrow to move the reference line to the bottom so it will be drawn last.

use up or down arrow to change the draw orderuse up or down arrow to change the draw order

 

And for anyone following along that would like to see the JSL

Graph Builder(
	Size( 961, 673 ),
	Show Control Panel( 0 ),
	Variables(
		X( :Area ),
		Y( :Ops Cert Rate, Side( "Right" ) ),
		Y( :Ops Cert Rate, Position( 1 ) )
	),
	Elements(
		Bar( X, Y( 2 ), Legend( 4 ), Label( "Label by Value" ) ),
		Bar( X, Y( 1 ), Legend( 6 ), Label( "Label by Value" ) )
	),
	SendToReport(
		Dispatch(
			{},
			"Ops Cert Rate",
			ScaleBox,
			{Add Ref Line( 0.9, "Solid", "Medium Dark Red", "Q1 Goal", 2 )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				4,
				Properties( 0, {Fill Color( 37 )}, Item ID( "Ops Cert Rate", 1 ) )
			), Legend Model(
				6,
				Properties( 0, {Fill Color( 37 )}, Item ID( "Ops Cert Rate", 1 ) )
			)}
		),
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "Rate" )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "" )} ),
		Dispatch( {}, "Y r title", TextEditBox, {Set Text( "" )} ),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Grid Line Order( 1 ), Reference Line Order( 4 )}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {4, [-1], 6, [0]} ), Position( {-1, 0} )}
		)
	)
)

JMP Graph Builder Bar ChartJMP Graph Builder Bar Chart

 

 

Highlighted
Theresa
Level III

Re: How JSL make charts like excel?

thanks a lot.
May i know where did you click to get the first chart you attached?
Highlighted
stan_koprowski
Community Manager Community Manager

Re: How JSL make charts like excel?

Hi @Theresa,

If you are asking about the value ordering column property it can be accessed by

right-clicking the header area of the Area column, then select Column Properties, and select the property.

 

Or if you are asking how did I select the Graph Builder platform?

That can be accessed from the graph menu and then select graph builder.

 

Otherwise feel free to continue to ask additional questions until you get the information you seek.

 

cheers,

Stan

 

 

 

Article Labels

    There are no labels assigned to this post.