PropertyEventMethodIndex
WebSquare.uiplugin.pivot - 5.0_2.2916B.20171222.151448

Pivot displays the two-dimensional data as statistics on each axis. Statistical functions include Sum, Avg, Count, Minimum, and Maximum, and a user-defined function can be added. (Supported Browsers: IE10 or higher versions.)

Type

uiplugin

Property Summary

allTotalName
Label of the grand total
autoFit
[lastColumn, allColumn] Automatically fits the table to the browser width. As a result, no horizontal scrolling will be made.<br />allColumn is to evenly distribute the columns, and lastColumn is to use only the last column to fit to the browser width.
autoFitMinWidth
Specify the minimum width of the pivot (in px). Valid when the autoFit is allColumn.
autoPopupInvalidMessage
Automatically pops up the warning message upon a key input not defined in the regExp.
bodyTextAlign
[default:center, left, right] Text alignment of the body not including the header
class
Same as the class property in HTML standard. One or more classes defined in the CSS file or in the style block can be applied (through the use of the space as the separator).
cols
Sets the columns on the column axis for the initial display. Specify the column IDs using the comma as the delimiter.
dataList
DataList ID to bind with the Pivot
decimalSep
Decimal point separator.
defaultAggregator
[default:Sum] Sets the default aggregator (to get the statistical data). The aggregator in the field is of a higher priority. If there is no aggregator defined in the field, the default aggregator will be used.
digitsAfterDecimal
Number of the digits after the decimal point.
excludeHiddenList
Columns to exclude from the hiddenList of the header.
grandTotalName
Label of the header values
headerListOrder
Header sequence.
headerTextAlign
[default:center, left, right] Text alignment of the header
hiddenHeaderList
List of the headers to hide.
id
Component ID
invalidMessage
A message displayed upon failure of the validation API. The displaymessage property must be true.
noColumnMove
Supports dragging of the header column in the pivot data area.
noResultMessage
Message to be displayed when there is no search result in the pivot.
noResultMessageClass
Class of the no-result message in the pivot.
noResultMessageStyle
Style of the no-result message in the pivot.
noResultMessageVisible
Display of the message when there is no search result in the pivot.
prefix
Prefix to be palced before the data.
rows
Define the columns on the row axis for the initial Pivot display. Specify the column IDs using the comma as the delimiter.
scaler
Scaler.
showZero
Shows 0 when there is no data.
sortFunction
Name of the function that sorts the data on rows, cols, and vals axes based on the received column IDs.
suffix
Suffix to be placed after the data.
textAlign
[default:center, left, right] Text alignment
thousandsSep
Separator for every 3 digits.
totalTextAlign
[default:center, left, right] Text alignment of the entire pivot.
useNumberFormat
Uses a user-defined number format.
userData1
User-defined property
userData2
User-defined property
userData3
User-defined property
vals
Define the columns on the value axis for the initial Pivot display. Specify the column IDs using the comma as the delimiter.
valuesAxis
[default:row] Location of the Σ label (to be created when there are multiple columns on the value axis)

Event Summary

oncellclick
Triggered upon the end user's clicking the cell.
onrefresh
Triggered when a Pivot setting is dynamically changed (such as axis moving, aggregator changing, or exclusion changing.)

Method Summary

addClass( className )
Adds a class to the component.
bind( eventType , function )
Dynamically allocates events to the component.
changeClass( oldClassName , newClassName )
Renames the class from oldClassName to newClassName.
focus( )
Moves the focus to the component.
getDisabled( )
Gets the current value of the disabled property.
getGenerator( )
Called by a component under the Generator component. When called, gets the parent Generator object.
getID( )
Gets the ID of the component.
getInitStyle( property )
Gets the initial style of the component.
getOpacity( )
Gets the opacity of the component defined in CSS.
getPluginName( )
Gets the pluginName (or the name) of the component.
getPosition( positionName )
Gets the left or top position of the component.
getReadOnly( )
Gets the current setting of the readOnly property.
getScope( )
Returns the parent WFrame object when the component is a child of the WFrame which uses the scope feature (scope=true).
getScopeWindow( )
Returns the scope object of the parent when the component is a child of the WFrame which uses the scope feature (scope=true).
getSize( sizeName )
Gets the size of the component.
getStyle( propertyName )
Gets the current value of the propertyName of the component defined in CSS.
getStyleValue( style )
[deprecated] Use getStyle instead.
getTitle( )
Gets the title value.
getTotalRow( )
Gets the total number of the rows.
getUdcHome( )
Returns the path of the file which defines the UDC.
getUdcRoot( )
Returns the path of the file which defines the UDC.
getUserData( key )
Returns the user-defined property value set by setUserData as the user data or source (page XML).
hasClass( className )
Checks whether the component has className received as a parameter or not.
hide( )
Hides the component.
pivotCSVDownload( options )
Saves the data as a CSV file.
pivotCSVUpload( options )
Upload CSV data to the pivot.
pivotExcelDownload( options , infoArr )
Downloads the pivot data into an Excel file.
pivotExcelUpload( options )
Uploads the Excel file to the pivot.
removeClass( className )
Removes className from the component.
setDisabled( disabled )
Sets the disabled property.
setEventPause( evList , flag )
Disables or enables the component event.
setFixedColumn( fixedColNum )
Fixes the column.
setFixedRow( fixedRow )
Fixes the column.
setInitStyle( property )
Initializes the component style.
setOpacity( value )
Sets the opacity of the component.
setPivotInit( valsStr )
Sets the vals area for the pivot, and renders the Pivot again.
setPosition( left , top , mode )
Sets the position (left, top) of the component.
setReadOnly( readOnly )
Controls the "readOnly" property.
setSize( width , heigth )
Sets the size (width, height) of the component.
setStyle( propertyName , value )
Sets the style of the specified property.
setUserData( key , value )
Sets the user data in the component.
setvals( valsStr )
Sets the vals area for the pivot, and renders the Pivot again.
show( displayType )
Displays the component.
toggleClass( className )
Removes a class named className, or if there is no such a class, adds a class named className.
trigger( type , array )
Triggers a certain event registered for the component.
unbind( type , function )
Removes an event registered for the component.
visible( flag )
[deprecated] Shows/Hides the component, or sets the visible property using setStyle.

Property Detail

allTotalName
Label of the grand total
autoFit
[lastColumn, allColumn] Automatically fits the table to the browser width. As a result, no horizontal scrolling will be made.<br />allColumn is to evenly distribute the columns, and lastColumn is to use only the last column to fit to the browser width.
allColumn adjusts widths of all columns by evenly distributing blank space to all columns while lastColumn adjusts only the width of the last column.
autoFitMinWidth
Specify the minimum width of the pivot (in px). Valid when the autoFit is allColumn.
autoPopupInvalidMessage
Automatically pops up the warning message upon a key input not defined in the regExp.
bodyTextAlign
[default:center, left, right] Text alignment of the body not including the header.
class
Same as the class property in HTML standard. One or more classes defined in the CSS file or in the style block can be applied (through the use of the space as the separator).
WebSquare5 Engine applies different classes to different components. By defining a common class, the common class can be applied to multiple components.
cols
Sets the columns on the column axis for the initial display. Specify the column IDs using the comma as the delimiter.
The final shape of the table depends on the sequence of the column IDs.
(ex1) cols="col3,col4,col5" (ex2) cols="col5,col3,col4"
dataList
DataList ID to bind with the Pivot
decimalSep
Decimal point separator. Valid when useNumberFormat is true.
defaultAggregator
[default:Sum] Sets the default aggregator (to get the statistical data). The aggregator in the field is of a higher priority. If there is no aggregator defined in the field, the default aggregator will be used.
Aggregators include Sum, Average, Count, Minimum, Maximum, and others to be customized.
digitsAfterDecimal
Number of the digits after the decimal point. Valid when useNumberFormat is true.
excludeHiddenList
Columns to exclude from the hiddenList of the header.
grandTotalName
Label of the header values
headerListOrder
Header sequence.
headerTextAlign
[default:center, left, right] Text alignment of the header.
hiddenHeaderList
List of the headers to hide.
id
Component ID
invalidMessage
A message displayed upon failure of the validation API. The displaymessage property must be true.
Cannot be used with invalidMessageFunc at the same time.
noColumnMove
Supports dragging of the header column in the pivot data area.
noResultMessage
Message to be displayed when there is no search result in the pivot.
noResultMessageClass
Class of the no-result message in the pivot.
noResultMessageStyle
Style of the no-result message in the pivot.
noResultMessageVisible
Display of the message when there is no search result in the pivot.
prefix
Prefix to be palced before the data. Valid when useNumberFormat is true.
rows
Define the columns on the row axis for the initial Pivot display. Specify the column IDs using the comma as the delimiter.
The final shape of the table depends on the sequence of the column IDs.
(ex1) rows="col1,col2" (ex2) rows="col2,col1"
scaler
Scaler. Valid when useNumberFormat is true.
showZero
Shows 0 when there is no data. Valid when useNumberFormat is true.
sortFunction
Name of the function that sorts the data on rows, cols, and vals axes based on the received column IDs.
The developer can also define the data sequence using the sortOrder property of each field.
The sortFunciton is prior to the sortOrder property.
suffix
Suffix to be placed after the data. Valid when useNumberFormat is true.
textAlign
[default:center, left, right] Text alignment.
thousandsSep
Separator for every 3 digits. Valid when useNumberFormat is true.
totalTextAlign
[default:center, left, right] Text alignment of the entire pivot.
useNumberFormat
Uses a user-defined number format. (digitsAfterDecimal, scaler, showZero, decimalSep, thousandsSep, prefix, suffix)
userData1
User-defined property. Use getUserData("userData1") to get the data.
userData2
User-defined property. Use getUserData("userData2") to get the data.
userData3
User-defined property. Use getUserData("userData3") to get the data.
vals
Define the columns on the value axis for the initial Pivot display. Specify the column IDs using the comma as the delimiter.
If multiple columns are set, the Σ label will be created.
The final shape of the table depends on the sequence of the column IDs.
(ex1) vals="col6,col7" (ex2) cols="col5,col3,col4"
valuesAxis
[default:row] Location of the Σ label (to be created when there are multiple columns on the value axis)

Event Detail

oncellclick
Triggered upon the end user's clicking the cell.
Parameter
nametypedescription
infoObjectReturns an obejct including rowIndex, colIndex, and rowData. <Number> info.rowIndex : Row index of the event-triggered cell <Number> info.colIndex : Column index of the event-triggered cell <String> info.rowData : Cell data array for the row index of the event-triggered cell
onrefresh
Triggered when a Pivot setting is dynamically changed (such as axis moving, aggregator changing, or exclusion changing.)
Parameter
nametypedescription
optionsJSONoptions (rows, cols, vals, etc.) object of the Pivot

Method Detail

addClass( className )
Adds a class to the component.
Parameter
nametyperequireddescription
classNameStringYName of the class to add
Sample
// Add oddClass to component input1. input1.addClass("oddClass");
bind( eventType , function )
Dynamically allocates events to the component.
Parameter
nametyperequireddescription
eventTypeStringYName of the event to allocate.
functionFunctionYHandler function of the event to allocate.
Sample
// Define the event handler function for the onclick event in the input component, and bind the function. input1.bind("onclick", function(e){ alert(input1.getValue();})); // Bind commObj.ev_click function for the onclick event with component input1. var commObj = {}; commObj.ev_click = function(e){ alert("click :: "+this.id); }; input1.bind("onclick", commObj.ev_click );
changeClass( oldClassName , newClassName )
Renames the class from oldClassName to newClassName.
In the default setting, only the classes added by addClass will be applied. In order to directly remove the class defined in the "class" property of the component, add the following setting in config.xml file.
<style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
oldClassNameStringYName of the class to remove
newClassNameStringYName of the class to add
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following to config.xml. <style> <removeDefaultClass value="true" /> </style> // Change tmpInputClass class to tmpInputWarninClass. input1.changeClass("tmpInputClass","tmpInputWarninClass");
focus( )
Moves the focus to the component.
getDisabled( )
Gets the current value of the disabled property.
Return
typedescription
BooleanThe value of the disabled property.
Sample
var returnValue = componentId.getDisabled(); (Return example) false
getGenerator( )
Called by a component under the Generator component. When called, gets the parent Generator object.
Return
typedescription
ObjectParent Generator object
Sample
<w2:generator id="generator1"> <w2:trigger id="trigger1" ev:onclick="scwin.trigger1_onclick"></w2:trigger></w2:generator> scwin.trigger1.onclick = function(){ console.log(this.getGenerator());} // Click trigger1 to display the generator1 object on the console. // See https://inswave.com/jira/browse/WPF-1425.
getID( )
Gets the ID of the component.
Return
typedescription
StringID of the WebSquare5 component
Sample
// The WebSquare5 component dynamically received as a parameter can be used as shown in the following. function fn_validCheck(tmpObj){ // tmpObj has an ID of "input1". var compID = tmpObj.getID(); // (Return Example) "input1" }
getInitStyle( property )
Gets the initial style of the component.
Parameter
nametyperequireddescription
propertyStringNName of the attribute (If not specified, all information will be ouputted.)
getOpacity( )
Gets the opacity of the component defined in CSS.
Return
typedescription
IntegerOpacity
Sample
// Apply opacity CSS to the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;opacity:0.2;"></xf:input> var returnValue = input1.getOpacity(); // "returnValue" is a real number between 0 and 1. // (Return Value) "0.2"
getPluginName( )
Gets the pluginName (or the name) of the component.
Return
typedescription
StringpluginName of the WebSquare5 component
Sample
// For a WebSquare5 object dynamically received by a common function, conditional statements can be used as shown below. var commObj = {}; commObj.fn_makeReqData = function(tmpObj){ var tmpID = tmpObj.getID(); // Component ID var tmpCompType = tmpObj.getPluginName(); // Component Type if(tmpCompType == "input"){ //..Logic.. }else if(tmpCompType == "gridView"){ //..Logic .. }else{ //..Logic.. } };
getPosition( positionName )
Gets the left or top position of the component. If set by %, the corresponding pixel value will be returned.
Parameter
nametyperequireddescription
positionNameStringY[left,top] Type of the position
Return
typedescription
NumberPosition of the component
Sample
// Apply margin CSS to the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;margin:10px;"></xf:input> var returnValue = input1.getPosition("top"); // The returnValue will be a position in pixels. // (Return Example) 10
getReadOnly( )
Gets the current setting of the readOnly property.
Return
typedescription
BooleanThe current setting of the readOnly property
Sample
var returnValue = componentId.getReadOnly(); // (Return Example) false
getScope( )
Returns the parent WFrame object when the component is a child of the WFrame which uses the scope feature (scope=true).
Returns null when the component is not a child of the WFrame using the scope feature (scope=true).
Return
typedescription
Objectwframe object or null
Sample
// The main page contains wframe1, and wframe1 contains wframe11 which contains textbox1. textbox1.getScope(); // Returns wframe11 object.
getScopeWindow( )
Returns the scope object of the parent when the component is a child of the WFrame which uses the scope feature (scope=true).
Returns a global window object when the component is not a child of the WFrame using the scope feature (scope=true.
Return
typedescription
ObjectScope object of the wframe object, or a global window object
Sample
// The main page contains wframe1, and wframe1 contains wframe11 which contains textbox1. var scope = textbox1.getScopeWindow(); scope.wframe11 === textbox1.getScope(); // true
getSize( sizeName )
Gets the size of the component. If set by "%", the corresponding pixel value will be returned.
Parameter
nametyperequireddescription
sizeNameStringY[height, innerHeight, outerHeight, outerMarginHeight, width, innerWidth, outerWidth, outerMarginWidth] Type of the size. For the calculation of each size type, see below.
height : element.clientHeight innerHeight : element.clientHeight + padding outerHeight : element.clientHeight + padding + border outerMarginHeight : element.clientHeight + padding + border + margin width : element.clientWidth innerWidth : element.clientWidth + padding outerWidth : element.clientWidth + padding + border outerMarginWidth : element.clientWidth + padding + border + margin
Return
typedescription
NumberSize of the component
Sample
var returnValue = componentId.getSize("width"); // "returnValue" will be a size in pixels. If set by "%", the corresponding pixel value will be returned. // (Return Example) 100
getStyle( propertyName )
Gets the current value of the propertyName of the component defined in CSS.
Parameter
nametyperequireddescription
propertyNameStringYName of the property in the style
Return
typedescription
StringStyle value
Sample
// Define an Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;"></xf:input> var returnValue = input1.getStyle("width"); // (Return Example) "144px"
getStyleValue( style )
[deprecated] Use getStyle instead.
Gets the current value of the propertyName of the component defined in CSS.
Parameter
nametyperequireddescription
styleStringYName of the property defined in the style
Return
typedescription
StringValue defined in the style property. (In case of a color, the hexcode of the color will be returned.)
getTitle( )
Gets the title value.
Return
typedescription
StringTitle value
Sample
// Define the "title" for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" title="이름 입력"></xf:input> var tmpTitle = input1.getTitle(); // (Return Example ) "Input Name"
getTotalRow( )
Gets the total number of the rows.
Return
typedescription
NumberTotal number of the rows
getUdcHome( )
Returns the path of the file which defines the UDC. Includes the file extension of .xml. For a path without .xml, use getUdcRoot. When called by a component, not a UDC object, undefined will be returned.
Return
typedescription
StringWhen called by a component, not a UDC object, undefined will be returned.
Sample
The udc file is /a/b/udc.xml, the XML file is /a/c/main.xml, and the UDC object ID is udc1. udc1.getUdcHome(); // The execution result is /a/b/udc.xml.
getUdcRoot( )
Returns the path of the file which defines the UDC. udc1.getUdcHome(); // The execution result is /a/b/udc.xml. For a path including .xml, use getUdcHome. When called by a component, not a UDC object, undefined will be returned.
Return
typedescription
StringWhen called by a component, not a UDC object, undefined will be returned.
Sample
The udc file is /a/b/udc.xml, the XML file is /a/c/main.xml, and the UDC object ID is udc1. udc1.getUdcHome(); // The execution result is /a/b/udc.xml.
getUserData( key )
Returns the user-defined property value set by setUserData as the user data or source (page XML).
Parameter
nametyperequireddescription
keyStringYRandom data key
Return
typedescription
StringData of the corresponding key
Sample
// Apply the customized property (eduTest) to the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" eduTest="Hello"></xf:input> input1.getUserData("eduTest"); // (Return Example) "Hello" // Use setUserData. input1.setUserData("eduTest","WebSquare"); input1.getUserData("WebSquare"); // (Return Example) "Hello"
hasClass( className )
Checks whether the component has className received as a parameter or not.
Parameter
nametyperequireddescription
classNameStringYclassName to check
Return
typedescription
BooleanWhether the component has the class or not
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> var returnValue = input1.hasClass("tmpInputClass"); // (Return Example) true
hide( )
Hides the component.
he CSS setting will be "display:none;" and "visibility:hidden;".
Sample
componentId.hide();
pivotCSVDownload( options )
Saves the data as a CSV file. (Supported for JDK 1.5 or higher.)
Parameter
nametyperequireddescription
optionsJSONYCSV download options in JSON format
<String:N> options.fileName [default: csvfile.csv] Default file name upon displaying of the file selection dialog <String:N> options.delim [default: ';'] Data delimiter <String:N> options.useHeaderX [default: false] Saving of the headerX including the axis (true is to save, and false is not to save.) <String:N> options.useHeaderY [default: false] Saving of the headerY including the axis (true is to save, and false is not to save.) <String:N> options.useTotal [default: false] Saving of the total (true is to save, and false is not to save.)
Sample
// Specify columns to save. var colArr = []; colArr[0] = "name"; colArr[1] = "corp"; // Download options var options = { fileName: "saveCSV.csv", delim: ";" }; pivotTable.pivotCSVDownload(options); // In case of no option, an empty object must be given as a parameter. pivotTable.pivotCSVDownload({});
pivotCSVUpload( options )
Upload CSV data to the pivot. (Supported for JDK 1.5 or higher.)
Parameter
nametyperequireddescription
optionsJSONYCSV uploading option in JSON format
<String:N> options.delim [default: ','] Data delimiter in the CSV file <String:N> options.escapeChar Characters to remove from the CSV data ( ex) '\'' <Number:N> options.startRowIndex [default: 0] Row index from which the data starts for the pivot. Once the startRowIndex is specified, the header setting will be ignored. <String:N> options.skipSpace [default: 0, 1] Space skipping (1 is to skip, and 0 is to include.) <String:N> options.append [default: 0, 1] Appending of the CSV file data to the pivot (1 is to append, and 0 is to delete the existing pivot data and insert.) <String:N> options.popupUrl URL of the popup to be called upon uploading
Sample
var options = { delim: ",", escapeChar: "'", startRowIndex: 1 }; pivotTable.pivotCSVUpload(options); // In case of no option, an empty object must be given as a parameter. pivotTable.pivotCSVUpload({});
pivotExcelDownload( options , infoArr )
Downloads the pivot data into an Excel file. (Supported for JDK 1.5 or higher.)
Parameter
nametyperequireddescription
optionsObjectYExcel download options
<String:Y> options.fileName : [default: excel.xls] Name of the file to download. Required. <String:N> options.sheetName : [default: sheet] Name of the sheet <Number:N> options.startRowIndex : [default: 0] Row index from which the pivot data starts (including the header) <Number:N> options.startColumnIndex : [default: 0] Column index from which the pivot data starts (including the header) <String:N> options.axisLColor : [default: #FFFFFF] Color of the upper-left axis area <String:N> options.axisLFontName : [default: N/A] Font in the upper-left axis area <String:N> options.axisLFontSize : [default: 10] Font size in the upper-left axis area <String:N> options.axisLFontColor : [default: N/A] Font color in the upper-left axis area <String:N> options.axisLFontWeight : [default: N/A] Font weight of the upper-left axis in the Excel file (Example: "bold") <String:N> options.axisLTextAlign : [default: N/A] Alignment in the upper-left axis ("center", "right", "left") <String:N> options.axisRColor : [default: #FFFFFF] Color of the upper-right axis <String:N> options.axisRFontName : [default: N/A] Font of the upper-right axis <String:N> options.axisRFontSize : [default: 10] Font size of the upper-right axis <String:N> options.axisRFontColor : [default: N/A] Font color of the upper-right axis <String:N> options.axisRFontWeight : [default: N/A] Weight of the upper-right axis (Example: "bold"); <String:N> options.axisRTextAlign : [default: N/A] Alignment of the upper-right axis ("center", "right", "left") <String:N> options.axisBColor : [default: #FFFFFF] Color of lower and upper axes <String:N> options.axisBFontName : [default: N/A] Font name of lower and upper axes <String:N> options.axisBFontSize : [default: 10] Font size of lower and upper axes <String:N> options.axisBFontColor : [default: N/A] Font color of lower and upper axes <String:N> options.axisBFontWeight : [default: N/A] Weight of lower and upper axes (Example: "bold"); <String:N> options.axisBTextAlign : [default: N/A] Alignment of lower and upper axes ("center", "right", "left") <String:N> options.headerXColor : [default: #FFFFFF] Color of the upper header <String:N> options.headerXFontName : [default: N/A] Font name of the upper header <String:N> options.headerXFontSize : [default: 10] Font size of the upper header <String:N> options.headerXFontColor : [default: N/A] Font color of the upper header <String:N> options.headerXFontWeight : [default: N/A] Weight of the upper header (Example: "bold"); <String:N> options.headerXTextAlign : [default: N/A] Alignment of the upper header ("center", "right", "left") <String:N> options.headerXWidth : [default: N/A] Width of the upper header column <String:N> options.headerYColor : [default: #FFFFFF] Color of the left axis <String:N> options.headerYFontName : [default: N/A] Font name of the left axis <String:N> options.headerYFontSize : [default: 10] Font size of the left axis <String:N> options.headerYFontColor : [default: N/A] Font color of the left axis <String:N> options.headerYFontWeight : [default: N/A] Weight of the left axis (Example: "bold") <String:N> options.headerYTextAlign : [default: N/A] Alignment of the left axis ("center", "right", "left") <String:N> options.headerYWidth : [default: N/A] Width of the left-axis column <String:N> options.totalXColor : [default: #FFFFFF] Color of the Total section in the upper header <String:N> options.totalXFontName : [default: N/A] Font name of the Total section in the upper header <String:N> options.totalXFontSize : [default: 10] Font size of the Total section in the upper header <String:N> options.totalXFontColor : [default: N/A] Font color of the Total section in the upper header <String:N> options.totalXFontWeight : [default: N/A] Weight of the Total section in the upper header (Example: "bold") <String:N> options.totalXTextAlign : [default: N/A] Alignment of the Total section in the upper header ("center", "right", "left") <String:N> options.totalXWidth : [default: N/A] Width of the Total section in the upper header <String:N> options.totalYColor : [default: #FFFFFF] Color of the Total section on the left axis <String:N> options.totalYFontName : [default: N/A] Font name of the Total section on the left axis <String:N> options.totalYFontSize : [default: 10] Font size of the Total section on the left axis <String:N> options.totalYFontColor : [default: N/A] Font color of the Total section on the left axis <String:N> options.totalYFontWeight : [default: N/A] Weight of the Total section on the left axis (Example: "bold") <String:N> options.totalYTextAlign : [default: N/A] Alignment of the Total section on the left axis ("center", "right", "left") <String:N> options.totalYFormat : [default: N/A] Format of the Total section on the left axis (Example: #,###) <String:N> options.totalYWidth : [default: N/A] Width of the Total section on the left axis <String:N> options.bodyColor : [default: #FFFFFF] Color of the body area <String:N> options.bodyFontName : [default: N/A] Font name of the body area <String:N> options.bodyFontSize : [default: 10] Font size of the body area <String:N> options.bodyFontColor : [default: N/A] Font color of the body area <String:N> options.bodyFontWeight : [default: N/A] Weight of the body area (Example: "bold") <String:N> options.bodyTextAlign : [default: N/A] Alignment of the body area ("center", "right", "left") <String:N> options.bodyFormat : [default: N/A] Format of the body area (Example: #,###) <String:N> options.bodyWidth : [default: N/A] Width of the column in the body area <String:N> options.bodyDefaultValue : [default: N/A] Default value for the body columns <String:N> options.sumColor : [default: #FFFFFF] Color of the Total section in the body area <String:N> options.sumFontName : [default: N/A] Font name of the Total section in the body area <String:N> options.sumFontSize : [default: 10] Font size of the Total section in the body area <String:N> options.sumFontColor : [default: N/A] Font color of the Total section in the body area <String:N> options.sumFontWeight : [default: N/A] Weight of the Total section in the body area (Example: "bold") <String:N> options.sumTextAlign : [default: N/A] Alignment of the Total section in the body area ("center", "right", "left") <String:N> options.sumFormat : [default: N/A] Format of the Total section in the body area (Example: #,###) <String:N> options.sumWidth : [default: N/A] Width of the column in the body area <Boolean:N> options.showProcess : [default: true] Display of the process window during download <Boolean:N> options.bodyWordwrap : [default: false] Line change in the body upon download <String:N> options.useHeaderX : [default: true] Display of the upper header upon download ("true" is to display, and "false" is not to display.) <String:N> options.useHeaderY : [default: true] Display of the left header upon download ("true" is to display, and "false" is not to display) <String:N> options.useTotal : [default: true] Display of the Total ("true" is to display, and "false" is not to display.) <String:N> options.separator : [default: ,] Data separator to be used for data transmission to the server. The default is comma(,). <String:N> options.freezePane : [default: ""] Coordinate to fix the rows and columns. ( Example) freezePane="3,4" Fix at (3,4). freezePane="0,1,0,5" Fix from (0,1) to (0,5).) <String:N> options.autoSizeColumn : [default: false] Auto sizing of the width <String:N> options.displayGridlines : [default: false] Display of the guide lines on the entire Excel cells. <String:N> options.useDataFormat : [default: N/A] Display of 'text' when the Pivot dataType is text ("true" is use the data format, and "false" is not to use.) <Object:N> options.printSet Printer setting in JSON format <String:N> options.printSet.fitToPage : [default: false] Page fitting setting <String:N> options.printSet.landScape : [default: false] Printing in landscape direction <String:N> options.printSet.fitWidth : [default: 1] Page width <String:N> options.printSet.fitHeight : [default: 1] Page height <String:N> options.printSet.scale : [default: 100] Scaling ratio for printing. fitToPage must be false. <String:N> options.printSet.pageSize : [default: A4] Printing options for Excel ( ex) "A3", "A4", "A5", "B4" )
infoArrObjectNArray of pivot data for another cell
<Number:N> infoArr.rowIndex : Row index to display text <Number:N> infoArr.colIndex : Column index to display contents <Number:N> infoArr.rowSpan : Number of the rows to merge <Number:N> infoArr.colSpan : Number of the columns to merge <String:N> infoArr.text : Text to display <String:N> infoArr.textAlign : Alignment (left, center, right) <String:N> infoArr.fontSize : font size (Example) "20px" <String:N> infoArr.fontName : font name <String:N> infoArr.color : font color (Example) "red" <String:N> infoArr.fontWeight : font weight (Example) "bold" <String:N> infoArr.drawBorder : cell border (Example) true <String:N> infoArr.wordWrap : Line change in the cell (Example) "true" <String:N> infoArr.bgColor : Background color of the cell (Example) "red"
Sample
// Download as an Excel without options specified options. var excelOpt = {}; // Downloading options for the Excel file excelOpt.fileName = "excelData.xls"; // The extension "xlsx" can be also used. pivotTable.pivotExcelDownload( excelOpt );
pivotExcelUpload( options )
Uploads the Excel file to the pivot. (Supported for JDK 1.5 or higher.)
Parameter
nametyperequireddescription
optionsObjectYExcel uploading options in JSON format
<Number:N> options.sheetNo : [default: 0] Excel sheet number to upload to Pivot <String:N> options.delim : Data delimiter for uploading (default: , ) <Number:N> options.startRowIndex : [default: 0] Row index from which the pivot data starts (including the header) <Number:N> options.startColumnIndex: [default: 0] Column index from which the data for the Pivot starts <Number:N> options.endColumnIndex : [default: 0] Column index where the data for the Pivot ends (If the pivot column index is higher than the Excel column index, the pivot column index will be used.) <String:N> options.skipSpace [default: 0, 1] Space skipping (1 is to skip, and 0 is to include.) <String:N> options.append : [default: 0] Appending of the Excel file data to the pivot (1 is to append, and 0 is to delete the existing pivot data and insert.) <String:N> options.popupUrl : URL of the popup to be called upon uploading
Sample
// Upload an Excel file without options specified. pivotTable.pivotExcelUpload( {} ); // Unless specified, an empty object must be returned not to cause errors.
removeClass( className )
Removes className from the component.
In the default setting, only the classes added by addClass will be applied. In order to directly remove the class defined in the "class" property of the component, add the following setting in config.xml file.
<style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
classNameStringYName of the class to remove
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following to config.xml. <style> <removeDefaultClass value="true" /> </style> // Remove tmpInputClass class. input1.removeClass("tmpInputClass");
setDisabled( disabled )
Sets the disabled property. True to disable, or false not to disable.
Parameter
nametyperequireddescription
disabledBooleanYTrue to disable, or false not to disable.
Sample
// Disable the component. componentId.setDisabled(true);
setEventPause( evList , flag )
Disables or enables the component event.
Parameter
nametyperequireddescription
evListStringNList of the events. If not specified, all user events of the component will be listed. (Enter null data.)
flagBooleanYtrue is to pause, or false is to cancel pausing.
Sample
input1.setEventPause("onclick", true); // Dynamically pauses the onclick event. input1.setEventPause("onfocus,onblur", false); // Restarts the onfocus and the onblur events. input1.setEventPause(null, true); // Pauses all user events registered for the Input component.
setFixedColumn( fixedColNum )
Fixes the column.
Parameter
nametyperequireddescription
fixedColNumNumberYThe number of the columns to fix from the far left.
Sample
// Fix the first two columns. pivot1.setFixedColumn(1);
setFixedRow( fixedRow )
Fixes the column.
Parameter
nametyperequireddescription
fixedRowNumberYThe number of the columns to fix from the far left.
Sample
// Fix first two rows. pivot1.setFixedRow(1);
setInitStyle( property )
Initializes the component style.
Parameter
nametyperequireddescription
propertyStringNName of the property (If not specified, all properties will be returned.)
Sample
group1.getInitStyle();
setOpacity( value )
Sets the opacity of the component.
Parameter
nametyperequireddescription
valueNumberYOpacity value (A real number between 0 and 1)
Sample
componentId.setOpacity(0.45);
setPivotInit( valsStr )
Sets the vals area for the pivot, and renders the Pivot again. To change multiple areas, use setOption API instead.
Parameter
nametyperequireddescription
valsStrStringYUse the comma as the field delimiter. The final shape depends on the field sequence.
Sample
pivotTable.setPivotInit( );
setPosition( left , top , mode )
Sets the position (left, top) of the component.
Parameter
nametyperequireddescription
leftNumberYLeft position or null.
topNumberYTop position or null.
modeStringN[defulat:absolute, delta] absolute sets the current positions as x and y, and delta adds x and y to the current positions.
Sample
// Set the top position of the component as 100 pixels. componentId.setPosition(null, 100);
setReadOnly( readOnly )
Controls the "readOnly" property. True to enable, or false to disable.
Parameter
nametyperequireddescription
readOnlyBooleanYTrue to enable, or false to disable.
Sample
// Enable the read-only. componentId.setReadOnly(true);
setSize( width , heigth )
Sets the size (width, height) of the component.
Parameter
nametyperequireddescription
widthNumberYComponent width or null
heigthNumberYComponent height or null
Sample
// Set the component height as 100 pixels. componentId.setSize(null,100);
setStyle( propertyName , value )
Sets the style of the specified property.
Parameter
nametyperequireddescription
propertyNameStringYName of the style
valueStringYValue of the style
Sample
// Set the component width as 200px. componentId.setStyle("width", "200px"); // Change the background color to olive. componentId.setStyle("background-color","olive");
setUserData( key , value )
Sets the user data in the component. If the key cannot be set for the component, corresponding logs will be displayed.
Parameter
nametyperequireddescription
keyStringYRandom data key
valueStringYRandom data key
Sample
// Setting a (key, value) pair of ("data", "WebSquare5") in the component. componentId.setUserData("data", "WebSquare"); // Some keys cannot be set for the component. componentId.setUserData("title", "WebSquare"); // (Log Example) !!!WARNING - [title] can't define as UserData
setvals( valsStr )
Sets the vals area for the pivot, and renders the Pivot again. To change multiple areas, use setOption API instead.
Parameter
nametyperequireddescription
valsStrStringYUse the comma as the field delimiter. The final shape depends on the field sequence.
Sample
pivotTable.setvals( "field5, field5" ); // Locate field 5 and 6 in the vals area. pivotTable.setvals( "field6, field5" ); // Locate field 6 and 5 in the vals area. Different from the above example.
show( displayType )
Displays the component.
The related CSS properties are display and visibility:show;.
Parameter
nametyperequireddescription
displayTypeStringN[default:block ,inline ,none ,""] Value of the Display property.
Sample
// Block the "display" property. componentId.show(); // Enable the "display" property in the class. componentId.show("");
toggleClass( className )
Removes a class named className, or if there is no such a class, adds a class named className.
In the default setting, only the classes added by addClass can be removed. To remove other classes, add the following setting in config.xml.
<style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
classNameStringYclassName to set
Sample
// Define a class for the Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following to config.xml. <style> <removeDefaultClass value="true" /> </style> // Remove tmpInputClass class. input1.toggleClass("tmpInputClass"); // Add tmpInputClass class again. input1.toggleClass("tmpInputClass");
trigger( type , array )
Triggers a certain event registered for the component.
Parameter
nametyperequireddescription
typeStringYName of the event to trigger
arrayArrayNArray of parameters to send to the event handler
Sample
// Trigger the onclick event in the input1 component. input1.trigger("onclick"); // Trigger the onviewchange event in the input component and call the event handler function by sending arguments of (1, 2). input1.trigger("onviewchange", [1,2]);
unbind( type , function )
Removes an event registered for the component.
Parameter
nametyperequireddescription
typeStringNName of the event to remove. If not specified, all events of the components will be removed.
functionFunctionNHandler function of the event to remove. If not specified, all handler functions of the event will be removed.
Sample
// Remove all events registered in the input component. input1.unbind(); // Remove all handler functions of onviewchange event registered in the input component. input1.unbind("onviewchange"); // Remove the func1 event handler of onviewchange event registered for component input1. input1.unbind("onviewchange", func1);
visible( flag )
[deprecated] Shows/Hides the component, or sets the visible property using setStyle.
Sets the visibility of the component style. In case of true, set visible. In case of false, set hidden.
Parameter
nametyperequireddescription
flagBooleanYVisibility (In case of true, set visible. In case of false, set hidden.)