cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

GraphBuilder Bars with a solid pattern should have an outline

In JMP 14, GraphBuilder Bars with a patten have an outline.  Bars with no pattern or solid, have no outline.  I typically use a white graph background. But whatever the background color, if a bar has the same color as the background color, it is indistinguishable from the the background.

 

Having a white background, means I cannot have a  solid, white bar.

4 Comments
XanGregg
Staff

Possible work-around, give the bar an empty pattern:

 

Graph Builder(
	Size( 524, 444 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ) ),
	Elements( Bar( X, Y, Legend( 4 ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model( 4,
				Properties( 0, {Fill Pattern( "none" )}, Item ID( "Mean", 1 ) )
			)}
		)
	)
);
gzmorgan0
Super User (Alumni)

Xan,

 

In JMP 15, your script does accommodate a solid white, non-stacked bar, however, this needs to be specified via script, Pattern Chooser does not have a None option.  The default is a fill color. Then if you select the panel to the left of solid, the outline will be the previous solid color and empty or white bar.  Now click on the Legend and and select fill color to be white and the bar is blended with the background and if a user does not recognize or know the proper sequence of steps (select a color, not white, then go to Pattern Chooser and select the one next to solid).

image.png

I made the recommendation because the sequence was rather strange. I made this recommendation based after replying to a user who wanted a black outline for each stacked bar.

 

Here is a script to create a table with 2 embedded scripts. The first was written in the user reply, the second script displays the fill with patterns. Now, if the blank pattern is selected teh outline remains.

 

Just my 2 cents, if the color is the same as the background color and the blank pattern is selected some opposing or black color should be used for an outline, or prompt the user if they want an outline. Just ideas, not a big user of bar charts and I know how to fix.

 

New Table( "GraphBuilder_CustomBars_Script",
	Add Rows( 11 ),
	New Script(
		"Count vs. Day solid trick",
		Graph Builder(
			Size( 531, 450 ),
			Show Control Panel( 0 ),
			Variables( X( :Day ), Y( :Count ), Overlay( :Grades ) ),
			Elements(
				Bar( X, Y, Overlay( 0 ), Legend( 6 ), Summary Statistic( "Sum" ) ),
				Bar( X, Y, Legend( 7 ), Bar Style( "Stacked" ) )
			),
			SendToReport(
				Dispatch(
					{},
					"400",
					ScaleBox,
					{Legend Model(
						6,
						Properties( 0, {Fill Color( 0 )}, Item ID( "Sum", 1 ) )
					), Legend Model(
						7,
						Properties( 3, {Fill Color( 0 )}, Item ID( "Total", 1 ) )
					)}
				),
				Dispatch(
					{},
					"graph title",
					TextEditBox,
					{Set Text( "Count vs. Day" )}
				),
				Dispatch(
					{},
					"Graph Builder",
					FrameBox,
					{DispatchSeg( BarSeg( 1 ), Set Width Proportion( 0.56 ) )}
				),
				Dispatch(
					{},
					"400",
					LegendBox,
					{font( "Segoe UI", 9, "Bold" ),
					Legend Position( {6, [-1], 7, [0, 1, 2, 3]} ),
					Position( {-1, 0, 1, 2, 3} )}
				)
			)
		)
	),
	New Script(
		"Count vs. Day with Pattern",
		Graph Builder(
			Variables( X( :Day ), Y( :Count ), Overlay( :Grades ) ),
			Elements( Bar( X, Y, Legend( 7 ), Bar Style( "Stacked" ) ) ),
			SendToReport(
				Dispatch(
					{},
					"400",
					ScaleBox,
					{Legend Model(
						7,
						Properties(
							0,
							{Fill Pattern( "left slant light" )},
							Item ID( "A", 1 )
						),
						Properties(
							1,
							{Fill Pattern( "vertical medium" )},
							Item ID( "B", 1 )
						),
						Properties(
							2,
							{Fill Pattern( "h wave heavy" )},
							Item ID( "C", 1 )
						)
					)}
				)
			)
		)
	),
	New Column( "Day",
		Character( 6 ),
		"Nominal",
		Set Values(
			{"First", "First", "First", "Second", "Second", "Second", "Second",
			"Third", "Third", "Third", "Third"}
		),
		Set Display Width( 49 )
	),
	New Column( "Grades",
		Character( 13 ),
		"Nominal",
		Set Values(
			{"A", "B", "Total", "A", "B", "C", "Total", "A", "B", "C", "Total"}
		),
		Set Display Width( 48 )
	),
	New Column( "Count",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [2, 2, 0.05, 2, 1, 1, 0.05, 1, 1, 2, 0.05] ),
		Set Display Width( 48 )
	)
);

 

 

 

XanGregg
Staff

Thanks for the additional details, Georgia.

Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!