如何将 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直播需要。
干杯,
布雷迪