cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
hogi
Level XII

Packed Chart

For Graph Builder/Bar/Packed chart, how can I change the way how items are selected as "primary labels"?
By default the highest values of the first framebox are used, right?
Can I change it to: highest values summed over all frameboxes?

e.g.for cars data

dt = Open( "$SAMPLE_DATA/Cars.jmp" );
gb  = Graph Builder(
	Variables( X( :Make ), Group X( :Year ), Color( :Make ) ),
	Elements(
		Bar(
			X,
			Legend( 6 ),
			Bar Style( "Packed" ),
			Packed Primaries( 5 ),
			Packed Primary Labels( "On axis" ),
			Summary Statistic( "Max" )
		)
	)
);

there are many entries with :Make==Toyota, but the first FrameBox (year= 87)  just contains 4 x Toyota - and T comes too late in the alphabet. So Dodge and Hyundai win "the race":

dt << select  where(:Make == "Toyota");
(gb << xpath("//FrameBox"))  << Fill Selection Mode( "Selected Outlined" )

hogi_1-1735405538482.png

1 REPLY 1
hogi
Level XII

Re: Packed Chart

Using Column properties  / value order, I can adjust the order - to manually get Toyota into the primary labels:

:make << Set Property( "Value Order", {Custom Order( {"Toyota"} )} )

hogi_0-1735406909833.png

.. . at position #4.

If I want to apply the same trick for Mitsubishi, it fails  - too few entries in 1987:

hogi_1-1735407120844.png

:make << Delete Property( "Value Order" ) << Set Property( "Value Order", {Custom Order( {"Mitsubishi"} )} )