cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Choose Language Hide Translation Bar
pmroz
Super User

Close Local Data Filter Outline Box

Hello all,

I'm trying to create a graph with a local data filter pre-added to it.  To save a bit of time I'm also ordering the filter elements by count.  I want the graph to look like this initially.  As you can see the local data filter is there, and it's outline box is closed.

7391_Local Data Filter Closed.png

When you open the local data filter this is what you should see.  Notice that the items are ordered by count

7392_Local Data Filter Open.png

When I save the script from the first graph this is the code:

dt = open("$sample_data\Bands Data.jmp");

dt << Graph Builder(

    Show Control Panel( 0 ),

    Variables( X( :timestamp ), Y( :viscosity ), Overlay( :customer ) ),

    Elements( Points( X, Y, Legend( 1 ), Jitter( 1 ) ) ),

    Local Data Filter(

        Location( {399, 178} ),

        Mode( Select( 0 ), Show( 1 ), Include( 1 ) ),

        Add Filter(

            columns( :customer ),

            Display( :customer, Size( 204, 194 ), List Display ),

            Order By Count( :customer )

        )

    )

);

However when I run the script the local data filter outline box is open, and the items are not ordered by count:

7393_Local Data Filter from Script.png

So my questions are these:

1. Is there a way to close the outline box holding the local data filter upon first display of the graph?

2. Why isn't order by count working?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Close Local Data Filter Outline Box

Order by count appears to work if creating the objects separately. See last line for one way to close the outline box:

dt = Open( "$sample_data\Bands Data.jmp" );

gb = dt << Graph Builder(

  Show Control Panel( 0 ),

  Variables( X( :timestamp ), Y( :viscosity ), Overlay( :customer ) ),

  Elements( Points( X, Y, Legend( 1 ), Jitter( 1 ) ) ),

);

ldf = gb << Local Data Filter( Add Filter( columns( :customer ), Display( :customer, Size( 208, 202 ), List Display ), ) );

ldf << (Filter Column( :customer ) << Order by Count( 1 ));

(gb << top report)[Outline Box( "Local Data Filter" )] << Close( 1 );

View solution in original post

2 REPLIES 2
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Close Local Data Filter Outline Box

Order by count appears to work if creating the objects separately. See last line for one way to close the outline box:

dt = Open( "$sample_data\Bands Data.jmp" );

gb = dt << Graph Builder(

  Show Control Panel( 0 ),

  Variables( X( :timestamp ), Y( :viscosity ), Overlay( :customer ) ),

  Elements( Points( X, Y, Legend( 1 ), Jitter( 1 ) ) ),

);

ldf = gb << Local Data Filter( Add Filter( columns( :customer ), Display( :customer, Size( 208, 202 ), List Display ), ) );

ldf << (Filter Column( :customer ) << Order by Count( 1 ));

(gb << top report)[Outline Box( "Local Data Filter" )] << Close( 1 );

pmroz
Super User

Re: Close Local Data Filter Outline Box

Thanks MS! - I figured you'd need to use the display tree to close the outline box but I'm not familiar with how to do that.