Functions
addCalculatedMeasure
Returns a new MdxSelect corresponding to mdx where the given calculated measure was added. Does not mutate mdx.
addCalculatedMeasure(mdx, {
calculatedMeasureName,
expression,
measureIndex,
properties,
}, cube)
| Argument | Type | Description |
|---|---|---|
| mdx | MdxSelect | |
| { calculatedMeasureName, expression, measureIndex, properties, } | { calculatedMeasureName: string; expression: MdxExpression; measureIndex?: number; properties?: MdxMemberPropertyDefinition[]; } | |
| cube | Cube |
Returns:
addLevel
Returns a new MdxSelect corresponding to mdx where the given level was added.
addLevel(mdx, {
cube,
dimensionName,
hierarchyName,
levelName,
axisName,
indexOnAxis,
shouldCreateNonEmptyAxis,
doesIncludeCalculatedMembers,
})
| Argument | Type | Description |
|---|---|---|
| mdx | MdxSelect | |
| { cube, dimensionName, hierarchyName, levelName, axisName, indexOnAxis, shouldCreateNonEmptyAxis, doesIncludeCalculatedMembers, } | { cube: Cube; dimensionName: DimensionName; hierarchyName: HierarchyName; levelName: LevelName; axisName?: AxisName; indexOnAxis?: number; shouldCreateNonEmptyAxis?: boolean; doesIncludeCalculatedMembers?: boolean; } |
Returns:
addMeasure
Returns a new MdxSelect corresponding to mdx where the given measure was added. Does not mutate mdx.
addMeasure(mdx, {
cube,
measureName,
measureIndex,
shouldCreateNonEmptyAxis,
axisName,
})
| Argument | Type | Description |
|---|---|---|
| mdx | MdxSelect | |
| { cube, measureName, measureIndex, shouldCreateNonEmptyAxis, axisName, } | { cube: Cube; measureName: MeasureName; measureIndex?: number; shouldCreateNonEmptyAxis?: boolean; axisName?: AxisName; } |
Returns:
addPage
Adds a page to a dashboard and returns the updated dashboard state with the new page key. Does not mutate the dashboard state.
addPage(dashboardState, options)
| Argument | Type | Description |
|---|---|---|
| dashboardState | DashboardState | |
| options | { page: DashboardPageState; key?: string; index?: number; } |
Returns:
addWidget
Returns a new dashboard with the given widget added at the specified location. Does not mutate dashboard.
addWidget({
dashboardState,
initialWidgetState,
layoutPath,
pageKey,
side,
})
| Argument | Type | Description |
|---|---|---|
| { dashboardState, initialWidgetState, layoutPath, pageKey, side, } | { dashboardState: DashboardState; initialWidgetState: AWidgetState; layoutPath: number[]; pageKey: string; side: Side; } |
Returns:
areHierarchiesEqual
Returns whether hierarchyCoordinatesA and hierarchyCoordinatesB represent the same hierarchy.
areHierarchiesEqual(hierarchyCoordinatesA, hierarchyCoordinatesB)
| Argument | Type | Description |
|---|---|---|
| hierarchyCoordinatesA | HierarchyCoordinates | undefined | |
| hierarchyCoordinatesB | HierarchyCoordinates | undefined |
Returns:
boolean
areLevelsEqual
Returns whether levelCoordinatesA and levelCoordinatesB represent the same level.
areLevelsEqual(levelCoordinatesA, levelCoordinatesB)
| Argument | Type | Description |
|---|---|---|
| levelCoordinatesA | LevelCoordinates | undefined | |
| levelCoordinatesB | LevelCoordinates | undefined |
Returns:
boolean
areTuplesEqual
Returns whether tupleCoordinatesA and tupleCoordinatesB represent the same tuple
areTuplesEqual(tupleCoordinatesA, tupleCoordinatesB)
| Argument | Type | Description |
|---|---|---|
| tupleCoordinatesA | TupleCoordinates | undefined | |
| tupleCoordinatesB | TupleCoordinates | undefined |
Returns:
boolean
collapse
Returns a new MdxSelect corresponding to mdx where the given tuple was collapsed. Does not mutate mdx.
collapse(mdx, {
cube,
tupleCoordinates,
})
| Argument | Type | Description |
|---|---|---|
| mdx | MdxSelect | |
| { cube, tupleCoordinates, } | { cube: Cube; tupleCoordinates: TupleCoordinates; } |
Returns:
createAtotiClient
Returns a new AtotiClient instance.
createAtotiClient(constructorArgs)
| Argument | Type | Description |
|---|---|---|
| constructorArgs | AtotiClientConstructorArgs |
Returns:
createContentClient
Returns a new ContentClient instance.
createContentClient(constructorArguments)
| Argument | Type | Description |
|---|---|---|
| constructorArguments | ContentClientConstructorArgs<Settings> |
Returns:
ContentClient<Settings>
createFilter
Returns the Filter represented by mdx (assuming that it represents a filter).
createFilter(mdx, {
cube,
nonVisualTotals
})
| Argument | Type | Description |
|---|---|---|
| mdx | MdxExpression | |
| { cube, nonVisualTotals } | { cube: Cube; nonVisualTotals?: boolean; } |
Returns:
createLevelCompoundIdentifier
Returns the MdxLevelCompoundIdentifier corresponding to the given level coordinates.
createLevelCompoundIdentifier({
dimensionName,
hierarchyName,
levelName,
})
| Argument | Type | Description |
|---|---|---|
| { dimensionName, hierarchyName, levelName, } | LevelCoordinates |
Returns:
createMdxForFilter
Returns a new MdxExpression representing filter. Returns undefined for a filter on members where there are no members selected.
createMdxForFilter(filter, cube, options)
| Argument | Type | Description |
|---|---|---|
| filter | Filter | |
| cube | Cube | |
| options | { atotiServerVersion: string; } |
Returns:
MdxExpression | undefined
deserializeDashboardState
Returns a new dashboard state where: - all MDX strings representing queries and filters are parsed and replaced by AST. - all data visualization widget mappings are deserialized. Does not mutate the passed dashboard state.
deserializeDashboardState(dashboardState)
| Argument | Type | Description |
|---|---|---|
| dashboardState | DashboardState<"serialized"> |
Returns:
DashboardState<"deserialized">
deserializeFilter
Deserializes a Filter, making it usable in Atoti UI.
deserializeFilter(filter)
| Argument | Type | Description |
|---|---|---|
| filter | Filter<"serialized"> |
Returns:
Filter<"deserialized">
deserializeWidgetState
Accepts a serialized widgetState, as it is saved on a content server and returns its deserialized version, ready to live in the state of Dashboard.
deserializeWidgetState(widgetState)
| Argument | Type | Description |
|---|---|---|
| widgetState | AWidgetState<"serialized"> |
Returns:
R
expand
Returns a new MdxSelect corresponding to mdx where the given tuple was expanded. Does not mutate mdx.
expand(mdx, {
cube,
tupleCoordinates,
toLevel,
doesIncludeCalculatedMembers,
})
| Argument | Type | Description |
|---|---|---|
| mdx | MdxSelect | |
| { cube, tupleCoordinates, toLevel, doesIncludeCalculatedMembers, } | { cube: Cube; tupleCoordinates: TupleCoordinates; |