こんにちは、みんな、
現在、データフィルタを使用したデータ抽出インターフェースを作成しています。インターフェース自体は構築できるのですが、JMP19でのフィルタ内の列のレイアウトに問題があります。
JMP17では、フィルタの列はLineUpBox()の中にあります。LineUpBoxには、N ColとSpacingという2つの便利な関数があり、これらを使うことで、列間にスペースを入れて複数行にわたって列を配置することができます。
Tree Structure of the Data Filter in JMP17Tree Structure of the Data Filter in JMP17JMP17におけるデータフィルタのツリー構造
しかし、JMP19 ではデータフィルタのツリー構造が変更されました。LineUpBox() が上に移動し、列の親は N Col() および Spacing() 関数を持たない List Box() になりました。関数 << Set Horizontal(1) を実行することはできますが、1 行しか表示できず、表示が見づらいです。
(変更点はJMP18だったのかもしれません。このバージョンでは試していません。)
Tree Structure in JMP19Tree Structure in JMP19JMP19におけるツリー構造
JMP19とJMP17の両方で、フィルターの列をどのように配置すればよいか、何かアイデアはありますか?
LineUpBox() を新しく作成し、Border Boxes を子要素として移動しようとしましたが、フィルタリングが失われ、古いものを簡単に削除できませんでした。フィルタの各列に List Box() を持つ New Window() を自分で作成すれば似たようなことができるかもしれませんが、条件付きプロパティと、さまざまなテーブルや列で簡単に使用できるという点から、データフィルタを使用するのが好みです。
以下は2列の例です(実際にはもっと多くの列を持つことができます)。JMP17では正しく動作しますが(2列が水平に表示されます)、JMP19では動作しません。
Window from JMP17Window from JMP17JMP17のウィンドウ
f_extraction = Function({dt, cols_list, nbColsLine = 2, spacingLine = 30},
my_window = New Window("Extraction with filter",
Border Box(
Left(20), Top(10), Right(20), Bottom(10),
V List Box(
Panel Box("",
Eval(
Eval Expr(
// Creation of the Data Filter, with two columns as an example
df = dt << Data Filter(
Show Counts(0),
Conditional(1),
Show Histograms and Bars(0),
Add Filter(
Columns(Expr(cols_list)),
Display(cols_list, "List Display"),
)
)
)
);
// Here, the columns of the filter are reorderer in two columns with a space of 30 between them
// This is where I have the problem in JMP19 compared to JMP17 because the Tree Structure is different
(df << report)[Lineup Box( 2 )] << N Col( nbColsLine );
(df << report)[Lineup Box( 2 )] << Spacing( spacingLine );
For( i = 1, i <= N Items( cols_list ), i++,
(df << report)[ListBoxBox( i )] << Set Size( 180, 220 )
);
// We delete some buttons and check boxes that we don't need
(df << report)[Button Box( 4 )] << Delete;
(df << report)[Button Box( 3 )] << Delete;
(df << report)[Button Box( 2 )] << Delete;
(df << report)[CheckBoxBox( 4 )] << Delete;
(df << report)[CheckBoxBox( 3 )] << Delete;
(df << report)[CheckBoxBox( 2 )] << Delete;
(df << report)[CheckBoxBox( 1 )] << Delete;
(df << report)[Outline Box( 1 )] << Set Title( "Data Table Filters" );
),
Spacer Box(Size(0, 20)),
Button Box("OK",
// Script where I retrieve the user selection
)
)
)
)
);
// Example
Try(Close(Data Table("Big Class"), No Save));
dt = Open( "$SAMPLE_DATA/Big Class.jmp", Invisible);
f_extraction(dt, {"sex", "name"})
ご協力いただきありがとうございます !
残念ながら、このような構造に頼ると簡単に壊れてしまう可能性があります。https
/www.hyrumslaw.com/ 。
表示ボックスを修正するだけで簡単に解決できる方法はないと思います。データフィルターの構造変更によって、私が職場で管理しているアドインのUIがいくつか壊れてしまいましたが、理由は異なります。そして、フィルターをグリッドに整理しようとするよりも、(うまくいけば)対処しやすいでしょう。
左がJMP18、右がJMP19

はい、変更される可能性のあるこれらの構造に対応するには、これが最善の方法ではないことは承知しています。
とりあえずこのままにしておこうと思います。体験談を共有していただき、ありがとうございました。