如何將 Tabulate 表添加到交互式 html 中,當本地數據過濾器更新時,它會重新計算?
下面是一個例子:
savePath = Pick Directory( "Where should the report be saved?" );
dt = Open( "$SAMPLE_dATA/Big Class.jmp" );
genders = {};
Insert Into( genders, "F" );
Insert Into( genders, "M" );
webreport = New Web Report();
dtTitle = dt << get window title;
webreport << Index( title( dtTitle ), style( "Smalllist" ) );
windows = {};
For( i = 1, i <= N Items( genders ), i++,
lub1 = Lineup Box( N Col( 2 ) );
lub1 << append(
dt << data filter(
local,
add filter(
columns( :column( dt, "age" ), :column( dt, "height" ), :column( dt, "weight" ) ),
where( :name( "sex" ) == genders[i] )
),
Mode( Include( 0 ) )
)
);
lub2 = Lineup Box( N Col( 2 ) );
lub2 << append(
Tabulate(
Title( "Summary" ),
Show Control Panel( 0 ),
Add Table(
Column Table(
Statistics( Min, Max, Median, Mean, Std Dev ),
Analysis Columns( :column( dt, "height" ) )
),
Row Table( Grouping Columns( :age ) )
)
)
);
lub3 = Lineup Box( N Col( 2 ) );
lub3 << append(
Graph Builder(
Title( "age vs height" ),
Size( 290, 270 ),
Show control Panel( 0 ),
Variables( X( :column( dt, "age" ) ), Y( :column( dt, "height" ) ) ),
Elements( Points( X, Y ) ),
show title( 0 ),
show footer( 0 )
)
);
lub3 << append(
Graph Builder(
Title( "age vs weight" ),
Size( 290, 270 ),
Show control Panel( 0 ),
Variables( X( :column( dt, "age" ) ), Y( :column( dt, "weight" ) ) ),
Elements( Points( X, Y ) ),
show title( 0 ),
show footer( 0 )
)
);
lub3 << horizontalalignment( Left );
lub2 << append( lub3 );
lub2 << verticalalignment( top );
lub1 << append( lub2 );
lub1 << horizontalalignment( Left );
dfcb = Data Filter Context Box( lub1 );
win = New Window( genders[i], dfcb );
//dfcb << report;
webreport << add report( dfcb, Title( genders[i] ) );
Insert Into( windows, win );
);
webreport << save( savePath || "Report for Big Class" );
For( j = 1, j <= N Items( windows ), j++,
windows[j] << close window
);此代碼生成交互式 html。 每個頁面都有一個本地數據過濾器 (LDF)、一個製表表(稱為“摘要”)和兩個圖表。
當 LDF 更改時,圖形會更新其內容。 摘要沒有。 這與 JMP 中的行為相同。
如果我將 LDF 的模式更改為
Mode( Include( 1 ) )
然後摘要隨著 JMP 中 LDF 的更改而更新,但 LDF 在交互式 html 中完全禁用。
Tabulate 還可以選擇包含自己的本地數據過濾器。 此過濾器在交互式 html 中也被禁用。
我正在使用 JMP 16.0.0。
嗨,這是設計使然。
交互式 HTML 允許您使用 LDF 選擇點,但無法使用 LDF 重新運行分析,因為不存在與 JMP 的連接。
要以交互方式更新網頁上顯示的分析, JMP直播需要。
乾杯,
布雷迪