MeasureNodeBuilder

度量节点构建器,用于配置单个度量

属性

方法

constructor

定义:

constructor(yMap: Y.Map<any>)

参数:

参数类型说明
yMapY.Map-

getId

获取节点 ID

定义:

getId(): string

返回: string

getField

获取字段名

定义:

getField(): string

返回: string

getEncoding

获取图表编码位置

定义:

getEncoding(): VBIMeasure['encoding'] | undefined

返回: VBIMeasure['encoding'] \| undefined

getSort

获取排序配置

定义:

getSort(): VBISort | undefined

返回: VBISort \| undefined

setAlias

设置显示名称

定义:

setAlias(alias: string): this

返回: this

参数:

参数类型说明
aliasstring- 显示名称

setEncoding

设置图表编码位置

定义:

setEncoding(encoding: NonNullable<VBIMeasure['encoding']>): this

返回: this

参数:

参数类型说明
encodingNonNullable<VBIMeasure['encoding']>- 指标编码位置

setSort

设置排序配置

定义:

setSort(sort: VBISort): this

返回: this

参数:

参数类型说明
sortVBISort- 排序配置

setAggregate

设置聚合函数

定义:

setAggregate(aggregate: VBIMeasure['aggregate']): this

返回: this

参数:

参数类型说明
aggregateVBIMeasure['aggregate']- 聚合配置

setFormat

设置数值格式

定义:

setFormat(format: VBIMeasureFormat): this

返回: this

参数:

参数类型说明
formatVBIMeasureFormat- 格式配置

getFormat

获取数值格式

定义:

getFormat(): VBIMeasureFormat | undefined

返回: VBIMeasureFormat \| undefined

clearFormat

清除数值格式配置

定义:

clearFormat(): this

返回: this

clearSort

清除排序配置

定义:

clearSort(): this

返回: this

toJSON

导出为 JSON

定义:

toJSON(): VBIMeasure

返回: VBIMeasure