[]
        
(Showing Draft Content)

GC.Spread.Pivot.PivotTable.PivotTableViewManager

Class: PivotTableViewManager

Pivot.PivotTable.PivotTableViewManager

Table of contents

Constructors

Methods

Constructors

constructor

new PivotTableViewManager(applyCallback, saveCallback)

Represents a PivotTableViewManager.

Parameters

Name Type
applyCallback Function
saveCallback Function

Methods

add

add(view): boolean

description Add a view to pivot table views.

example

var viewsManager = pivotTable.views;
viewsManager.add({
     name: 'config1',
     config: pivotTable.serialize()
});
viewsManager.get('config1');

Parameters

Name Type Description
view IPivotTableView Indicates the view to add.

Returns

boolean


all

all(): IPivotTableView[]

description get all views from pivot table views.

example

var viewsManager = pivotTable.views;
viewsManager.save('config1');
console.log(viewsManager.all());

Returns

IPivotTableView[]


apply

apply(name): void

description apply a view to current pivot table.

example

var viewsManager = pivotTable.views;
viewsManager.save('config1');
viewsManager.apply('config1');

Parameters

Name Type Description
name string Indicates the name of view to apply.

Returns

void


get

get(name): IPivotTableView

description get a view from pivot table views.

example

var viewsManager = pivotTable.views;
viewsManager.save('config1');
viewsManager.get('config1');

Parameters

Name Type Description
name string Indicates the name of view to query.

Returns

IPivotTableView


remove

remove(name): void

description remove a view from pivot table views.

example

var viewsManager = pivotTable.views;
viewsManager.remove('config1');
viewsManager.get('config1');

Parameters

Name Type Description
name string Indicates the name of view to remove.

Returns

void


save

save(name): boolean

description Add a view to pivot table views.

example

var viewsManager = pivotTable.views;
viewsManager.save('config1');
viewsManager.get('config1');

Parameters

Name Type Description
name string Indicates the name of view to save.

Returns

boolean