SpreadJS製品ヘルプ
valueFilter メソッド
GC.Spread.Pivot 名前空間 > PivotTable タイプ : valueFilter メソッド
ピボットテーブルの対象のフィールド名を示します。
設定時の値フィルタ情報を示します。
フィールドの値フィルタ情報を取得または設定します。
シンタックス
var instance = new GC.Spread.Pivot.PivotTable(name, sheet, row, col, layout, style);
var value; // Type: IPivotConditionFilterInfo
value = instance.valueFilter(fieldName, filterInfo);
function valueFilter( 
   fieldName : string,
   (optional) filterInfo : undefined
) : IPivotConditionFilterInfo;

パラメータ

fieldName
ピボットテーブルの対象のフィールド名を示します。
filterInfo
設定時の値フィルタ情報を示します。

戻り値の型

ピボットテーブルの値情報を返します。
使用例
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
var sourceSheet = spread.getSheet(0);
var sheet = spread.getSheet(1);
var sourceData = [["Date","Buyer","Type","Amount"],
                  ["01-Jan","Mom","Fuel",74],
                  ["15-Jan","Mom","Food",235],
                  ["17-Jan","Dad","Sports",20],
                  ["21-Jan","Kelly","Books",125]];
sourceSheet.setArray(0, 0, sourceData );
sourceSheet.tables.add('sourceData', 0, 0, 5, 4);
var layout = GC.Spread.Pivot.PivotTableLayoutType.compact;
var theme = GC.Spread.Pivot.PivotTableThemes.medium2;
var options = {showRowHeader: true, showColumnHeader: true};
var pivotTable = sheet.pivotTables.add("pivotTable_1", 'sourceData', 1, 1, layout, theme, options);
pivotTable.suspendLayout();
pivotTable.options.showRowHeader = true;
pivotTable.options.showColumnHeader = true;
pivotTable.add("Buyer", "Buyer", GC.Spread.Pivot.PivotTableFieldType.columnField);
pivotTable.add("Type", "Type", GC.Spread.Pivot.PivotTableFieldType.rowField);
pivotTable.add("Amount", "Sum of Amount", GC.Spread.Pivot.PivotTableFieldType.valueField, GC.Pivot.SubtotalType.sum);
let condition = { conType: GC.Pivot.PivotConditionType.value, operator: GC.Pivot.PivotValueFilterOperator.between, val: [0, 100] };
let filterInfo = { condition: condition, conditionByName: "Sum of Amount" };
pivotTable.valueFilter("Buyer", filterInfo);
pivotTable.resumeLayout();
関連トピック

参照

PivotTable タイプ