[]
        
(Showing Draft Content)

GC.Spread.Slicers.GeneralSlicerData

Class: GeneralSlicerData

Spread.Slicers.GeneralSlicerData

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new GeneralSlicerData(data, columnNames)

Represents general slicer data.

Parameters

Name Type Description
data any[][] The slicer data; it is a matrix array.
columnNames string[] The column names of the slicer data.

Properties

columnNames

columnNames: string[]

Indicates the column names for the general slicer data.


data

data: any[][]

Indicates the data source for general slicer data.

Methods

aggregateData

aggregateData(columnName, aggregateType, range?): number

Aggregates the data by the specified column name.

Parameters

Name Type Description
columnName string The column name.
aggregateType SlicerAggregateType The aggregate type.
range? ISlicerRangeConditional The specific range. range.min: number type, the minimum value. range.max: number type, the maximum value.

Returns

number

The aggregated data.


attachListener

attachListener(listener): void

Attaches the listener.

Parameters

Name Type Description
listener ISlicerListener The listener.

Returns

void


clearPreview

clearPreview(): void

Clears the preview filter state.

Returns

void


detachListener

detachListener(listener): void

Detaches the listener.

Parameters

Name Type Description
listener ISlicerListener The listener.

Returns

void


doFilter

doFilter(columnName, conditional, isPreview?): void

Filters the data that corresponds to the specified column name and exclusive data indexes.

Parameters

Name Type Description
columnName string The column name.
conditional ISlicerConditional The conditional filter. conditional.exclusiveRowIndexes: number array type, visible exclusive row indexes conditional.ranges: {min:number, max:number} array type, visible ranges.
isPreview? boolean Indicates whether preview is set.

Returns

void


doUnfilter

doUnfilter(columnName): void

Unfilters the data that corresponds to the specified column name.

Parameters

Name Type Description
columnName string The column name.

Returns

void


getColumnIndex

getColumnIndex(columnName): number

Gets the column index by the specified column name.

Parameters

Name Type Description
columnName string The column name.

Returns

number

The column index.


getData

getData(columnName, range?): string[]

Gets the data by the specified column name.

Parameters

Name Type Description
columnName string The column name.
range? ISlicerRangeConditional The specific range. range.min: number type, the minimum value. range.max: number type, the maximum value.

Returns

string[]

The data that corresponds to the specified column name.


getExclusiveData

getExclusiveData(columnName): any[]

Gets the exclusive data by the specified column name.

Parameters

Name Type Description
columnName string The column name.

Returns

any[]

The exclusive data that corresponds to the specified column name.


getExclusiveRowIndex

getExclusiveRowIndex(columnName, rowIndex): number

Gets the exclusive data index by the specified column name and data index.

Parameters

Name Type Description
columnName string The column name.
rowIndex number The index of the data.

Returns

number

The exclusive data index that corresponds to the specified column name and data index.


getFilteredIndexes

getFilteredIndexes(columnName): number[]

Gets the filtered exclusive data indexes by the specified column name.

Parameters

Name Type Description
columnName string The column name.

Returns

number[]

The filtered exclusive data indexes that correspond to the specified column name.


getFilteredOutIndexes

getFilteredOutIndexes(columnName, filteredOutDataType): number[]

Gets the filtered out exclusive data indexes by the specified column name.

Parameters

Name Type Description
columnName string The column name.
filteredOutDataType FilteredOutDataType Indicates the kind of filtered out exclusive data index that should be included in the result.

Returns

number[]

The filtered out exclusive data indexes that correspond to the specified column name.


getFilteredOutRanges

getFilteredOutRanges(columnName): ISlicerRangeConditional[]

Gets the filtered out ranges by other columns.

Parameters

Name Type Description
columnName string The column name.

Returns

ISlicerRangeConditional[]

The filtered out ranges by other columns that correspond to the specified column name.


getFilteredOutRowIndexes

getFilteredOutRowIndexes(): number[]

Gets the filtered out row indexes.

Returns

number[]

The filtered out row indexes.


getFilteredRanges

getFilteredRanges(columnName): ISlicerRangeConditional[]

Gets the filtered ranges by the specified column name.

Parameters

Name Type Description
columnName string The column name.

Returns

ISlicerRangeConditional[]

The filtered ranges that correspond to the specified column name.


getFilteredRowIndexes

getFilteredRowIndexes(): number[]

Gets the filtered row indexes.

Returns

number[]

The filtered row indexes.


getRowIndexes

getRowIndexes(columnName, exclusiveRowIndex): number[]

Gets the data indexes by the specified column name and exclusive data index.

Parameters

Name Type Description
columnName string The column name.
exclusiveRowIndex number The index of the exclusive data.

Returns

number[]

The data indexes that correspond to the specified column name and exclusive data index.


inPreview

inPreview(): boolean

Gets whether the slicer is in the preview state.

Returns

boolean


onColumnNameChanged

onColumnNameChanged(oldName, newName): void

Changes a column name for the general slicer data.

Parameters

Name Type Description
oldName string The old name of the column.
newName string The new name of the column.

Returns

void


onColumnsRemoved

onColumnsRemoved(colIndex, colCount): void

Removes columns of the general slicer data.

Parameters

Name Type Description
colIndex number The index of the starting column.
colCount number The number of columns to remove.

Returns

void


onDataChanged

onDataChanged(changedDataItems): void

Changes data items in the data source of the general slicer data.

Parameters

Name Type
changedDataItems ISlicerDataItem

Returns

void


onFiltered

onFiltered(): void

Occurs after the slicer data has been filtered.

Returns

void


onRowsAdded

onRowsAdded(rowIndex, rowCount): void

Adds rows in the data source of the general slicer data.

Parameters

Name Type Description
rowIndex number The index of the starting row.
rowCount number The number of rows to add.

Returns

void


onRowsRemoved

onRowsRemoved(rowIndex, rowCount): void

Removes rows in the data source of the general slicer data.

Parameters

Name Type Description
rowIndex number The index of the starting row.
rowCount number The number of rows to remove.

Returns

void


resumeFilteredEvents

resumeFilteredEvents(): void

Resumes the onFiltered event.

Returns

void


suspendFilteredEvents

suspendFilteredEvents(): void

Suspends the onFiltered event.

Returns

void