@univerjs-prosheets-sparklineindexclassesSparklinedatasourcemodel

@univerjs-pro/sheets-sparkline v0.5.4


Class: SparklineDataSourceModel

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:10

Extends

Constructors

new SparklineDataSourceModel()

new SparklineDataSourceModel(_univerInstanceService): SparklineDataSourceModel

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:24

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService

Returns

SparklineDataSourceModel

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
updateConfig$publicObservable<{ config: ISparklineGroup; groupId: string; subUnitId: string; type: "add" | "set" | "remove"; unitId: string; }>undefined-packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:22

Methods

addSparkline()

addSparkline(
   unitId, 
   subUnitId, 
   groupId, 
   config): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:177

Parameters

ParameterType
unitIdstring
subUnitIdstring
groupIdstring
configISparklineGroup

Returns

void


clearSparklineCache()

clearSparklineCache(
   unitId, 
   subUnitId, 
   groupId): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:228

Parameters

ParameterType
unitIdstring
subUnitIdstring
groupIdstring

Returns

void


deleteUnit()

deleteUnit(unitId): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:333

Parameters

ParameterType
unitIdstring

Returns

void


dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


fromJSON()

fromJSON(modelJSON): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:300

Parameters

ParameterType
modelJSONISparklineSnapshotJSON

Returns

void


getSparkline()

getSparkline(
   unitId, 
   subUnitId, 
   row, 
   col): undefined | string

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:248

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

undefined | string


getSparklineById()

getSparklineById(
   unitId, 
   subUnitId, 
   groupId): undefined | ISparklineGroup

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:244

Parameters

ParameterType
unitIdstring
subUnitIdstring
groupIdstring

Returns

undefined | ISparklineGroup


getSparklineCache()

getSparklineCache(): {
  sparklineAnchorMap: ISparklineAnchorMap;
  sparklineModel: ISparklinesModel;
}

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:265

Returns

{
  sparklineAnchorMap: ISparklineAnchorMap;
  sparklineModel: ISparklinesModel;
}
NameTypeDefined in
sparklineAnchorMapISparklineAnchorMappackages/sheets-sparkline/src/models/sparkline-data-source.model.ts:268
sparklineModelISparklinesModelpackages/sheets-sparkline/src/models/sparkline-data-source.model.ts:267

getSubUnitSparkline()

getSubUnitSparkline(unitId, subUnitId): 
  | undefined
| Map<string, ISparklineGroup>

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:240

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

| undefined | Map<string, ISparklineGroup>


reBuildAnchorCache()

reBuildAnchorCache(unitId, subUnitId): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:252

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

void


removePartSparkline()

removePartSparkline(
   unitId, 
   subUnitId, 
   row, 
   col): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:213

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

void


removeSparkline()

removeSparkline(
   unitId, 
   subUnitId, 
   groupId): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:194

Parameters

ParameterType
unitIdstring
subUnitIdstring
groupIdstring

Returns

void


setSparkline()

setSparkline(
   unitId, 
   subUnitId, 
   groupIds, 
   config): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:184

Parameters

ParameterType
unitIdstring
subUnitIdstring
groupIdsstring[]
configISparklineGroup

Returns

void


toJSON()

toJSON(unitId): ISparklineSnapshotJSON

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:272

Parameters

ParameterType
unitIdstring

Returns

ISparklineSnapshotJSON


updateSparklineExtraNum()

updateSparklineExtraNum(
   unitId, 
   subUnitId, 
   groupId, 
   type): void

Defined in: packages/sheets-sparkline/src/models/sparkline-data-source.model.ts:61

Parameters

ParameterTypeDefault value
unitIdstringundefined
subUnitIdstringundefined
groupIdstringundefined
type"add" | "set"'set'

Returns

void