嗨,
我在數據過濾器上下文框中有幾個過濾器。一個是關於週數。
我希望有一個反向排序(在最後幾週看到或首先選擇)。
有可能嗎?
最好的祝福
我有這樣的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軸,日期+週+月。您希望在周或月或日之間選擇此軸。
可能?
最好的祝福
- 右鍵單擊您的專欄數週。
- 選擇“列屬性”>“值排序”
- 將出現一個對話框,按下反向按鈕
現在所有排序和顯示等都將使用該順序。 這應該在添加過濾器之前完成。 如果您的過濾器已創建,請刪除週,然後添加它。