[]
        
(Showing Draft Content)

GC.Spread.Pivot.PivotTableStyle

Class: PivotTableStyle

Spread.Pivot.PivotTableStyle

Table of contents

Constructors

Properties

Constructors

constructor

new PivotTableStyle(backColor?, foreColor?, font?, borderLeft?, borderTop?, borderRight?, borderBottom?, borderHorizontal?, borderVertical?, textDecoration?, fontStyle?, fontWeight?, fontSize?, fontFamily?)

Represents a PivotTable Style.

Parameters

Name Type Description
backColor? string Indicates the backColor of pivot table style.
foreColor? string Indicates the foreColor of pivot table style.
font? string Indicates the font of pivot table style.
borderLeft? LineBorder Indicates the borderLeft of pivot table style.
borderTop? LineBorder Indicates the borderTop of pivot table style.
borderRight? LineBorder Indicates the borderRight of pivot table style.
borderBottom? LineBorder Indicates the borderBottom of pivot table style.
borderHorizontal? LineBorder Indicates the borderHorizontal of pivot table style.
borderVertical? LineBorder Indicates the borderVertical of pivot table style.
textDecoration? TextDecorationType Indicates the textDecoration of pivot table style.
fontStyle? string The font style.
fontWeight? string The font weight.
fontSize? string The font size.
fontFamily? string The font family.

Properties

backColor

backColor: string

Indicates the background color.


borderBottom

borderBottom: LineBorder

Indicates the bottom border.


borderHorizontal

borderHorizontal: LineBorder

Indicates the horizontal border.


borderLeft

borderLeft: LineBorder

Indicates the left border.


borderRight

borderRight: LineBorder

Indicates the right border.


borderTop

borderTop: LineBorder

Indicates the top border.


borderVertical

borderVertical: LineBorder

Indicates the vertical border.


font

font: string

Indicates the font.


fontFamily

fontFamily: string

Indicates the font family.

example

//This example sets the fontFamily property.
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 wholePivotTableStyle = new GC.Spread.Pivot.PivotTableStyle();
wholePivotTableStyle.fontFamily = "Arial Black";
theme.wholeTableStyle(wholePivotTableStyle);
var pivotTable = sheet.pivotTables.add("pivotTable_1", 'sourceData', 1, 1, layout, theme);

fontSize

fontSize: string

Indicates the font size.

example

//This example sets the fontSize property.
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 wholePivotTableStyle = new GC.Spread.Pivot.PivotTableStyle();
wholePivotTableStyle.fontSize = "16px";
theme.wholeTableStyle(wholePivotTableStyle);
var pivotTable = sheet.pivotTables.add("pivotTable_1", 'sourceData', 1, 1, layout, theme);

fontStyle

fontStyle: string

Indicates the font style.

example

//This example sets the fontStyle property.
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 wholePivotTableStyle = new GC.Spread.Pivot.PivotTableStyle();
wholePivotTableStyle.fontStyle = "italic";
theme.wholeTableStyle(wholePivotTableStyle);
var pivotTable = sheet.pivotTables.add("pivotTable_1", 'sourceData', 1, 1, layout, theme);

fontWeight

fontWeight: string

Indicates the font weight.

example

//This example sets the fontWeight property.
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 wholePivotTableStyle = new GC.Spread.Pivot.PivotTableStyle();
wholePivotTableStyle.fontWeight = "bold";
theme.wholeTableStyle(wholePivotTableStyle);
var pivotTable = sheet.pivotTables.add("pivotTable_1", 'sourceData', 1, 1, layout, theme);

foreColor

foreColor: string

Indicates the fore color.


textDecoration

textDecoration: TextDecorationType

Indicates the text decoration.