嗨,
我在数据过滤器上下文框中有几个过滤器。一个是关于周数。
我希望有一个反向排序(在最后几周看到或首先选择)。
有可能吗?
最好的祝福
我有这样的X轴:(有月,周和日)
我希望用户也可以在3之间做出选择或者将3保持在一起。
可能是,它太复杂了

这是JSL在数据表Big Class中反转年龄的顺序。
Names Default to Here(1);
dt = Open("$sample_data/big class.jmp");
//get the list of unique values
uniq = dt << Summary(Group(:age), Invisible);
reverse_val = Reverse(As List(uniq:age << get values));
Close(uniq, NoSave);
dt:age << Set Property("Value Ordering", Expr(reverse_val) );
我不明白你的X轴问题。您是否希望更改X轴上的时间单位或创建过滤器或??
这是一个简单的脚本,说明如何为数据表中的列构建和实现Value Ordering属性。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Find unique values for the column Age
Summarize( dt, byGroup = by( :age ) );
// By default the list returned from the By operation
// is a list of characters. For numeric columns, this
// can be an issue, so for numeric columns this needs
// the list values to be changed to numeric values
If( :age << get data type == "Numeric",
For( i = 1, i <= N Items( ByGroup ), i++,
ByGroup[i] = Num( ByGroup[i] )
)
);
// Reverse order the list
ByGroup = Sort Descending( ByGroup );
// Set the Column Property for the column
:Age << set property( "Value Ordering", ByGroup );
// Run the Graph Builder Platform to illustrate the effect
// of the new Value Ordering property

有关脚本中使用的函数的文档可以在“脚本指南”中找到
帮助==>图书==>脚本指南
或者在脚本索引中
帮助==>脚本索引
我强烈建议您花点时间阅读“脚本编写指南”。 它会让你在编写如上所述的脚本方面做出巨大贡献。
关于更改X轴值的问题,Column Switcher是解决问题的理想方案
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Aircraft Incidents.jmp" );
// Create new columns to represent Week, Month and Day
dt << New Column( "Week", formula( Week Of Year( :Event Date ) ) );
dt << New Column( "Month", formula( Month( :Event Date ) ) );
dt << New Column( "Day", formula( Day Of Year( :Event Date ) ) );
// Now run the Graph Builder Platform with the Column Switcher to
// illustrate how to use it to swap out the different columns for
// the X axis
Graph Builder(
Size( 534, 454 ),
Show Control Panel( 0 ),
Variables( X( :Week ), Y( :Total Serious Injuries ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
Column Switcher( :Week, {:Week, :Month, :Day} )
);

嗨,
好的,这很好:我修改了专栏的内容。
但是我希望JSL可以拥有它吗?
另一个问题:我希望有一个X轴过滤器。
例如:你有一个图表中的X轴,日期+周+月。您希望在周或月或日之间选择此轴。
可能?
最好的祝福
- 右键单击您的专栏数周。
- 选择“列属性”>“值排序”
- 将出现一个对话框,按下反向按钮
现在所有排序和显示等都将使用该顺序。 这应该在添加过滤器之前完成。 如果您的过滤器已创建,请删除周,然后添加它。