BookmarkSubscribe
Choose Language Hide Translation Bar
djhanson
Community Trekker

Graph Builder - bar chart how to show summary table?

Hi, using Graph Builder I'm making a bar chart with a legend.  Each Xvalue bar shows a breakdown by the legend categories (so they add up to a sum for the total bar of course).

Question: is there any way to make a summary data table below it displaying the X value by legend breakdown? 

I'm thinking by using Table Box and its elements.  I've tried various things even with Summarize, but it's not as simple as it looks.  Yet, the Graph Builder displays the breakdown fine, I'd just like to display the values of each of the Legend breakdowns by Xvalue below the chart.  thx... dj

Graph Builder(

    Show Control Panel( 0 ),

    Variables( X( :Xvalue), Y( :Yvalue ), Overlay( :Legend ) ),

    Elements(

    Bar(

         X,

         Y,

         Legend( 6 ),

         Bar Style( "Stacked" ),

         Summary Statistic( "Mean" )

         )

  ),

  SendToReport( Dispatch( {}, "Xvalue", ScaleBox, {Rotated Labels( "Automatic" )} ) )

);

0 Kudos
1 REPLY 1
ms
Super User ms
Super User

Re: Graph Builder - bar chart how to show summary table?

The "Caption Box" option (new in JMP 10 I think) may provide what you want.

Example:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt << Graph Builder(

  Show Control Panel( 0 ),

  Variables( Y( :height ), Group X( :age ), Overlay( :sex ) ),

  Elements(

  Bar( Y, Legend( 6 ), Bar Style( "Stacked" ), Summary Statistic( "Mean" ) ),

  Caption Box(

  Y,

  Legend( 7 ),

  X Position( "Right" ),

  Summary Statistic( "Mean" ),

  Y Position( "Bottom" )

  )

  ),

  SendToReport(

  Dispatch( {}, "", ScaleBox, {Rotated Labels( "Automatic" )} ),

  Dispatch(

  {},

  "height",

  ScaleBox,

  {Min( -20 ), Max( 150 ), Inc( 25 ), Minor Ticks( 0 )}

  )

  )

);

0 Kudos