cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

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 XIII

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"} )} )

Recommended Articles