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; toLevel: LevelCoordinates; doesIncludeCalculatedMembers?: boolean; } |
Returns:
fetchTranslations
Asynchronously returns the Atoti UI translations for locale.
fetchTranslations(locale);
| Argument | Type | Description |
|---|---|---|
| locale | string |
Returns:
Promise<{ [key in string]: string; }>
findContentRecords
Returns the nodes in tree with the given ids, indexed by id.
findContentRecords(tree, ids, pathOrOptions);
| Argument | Type | Description |
|---|---|---|
| tree | ContentRecord<T> | |
| ids | string[] | |
| pathOrOptions | string[] | { includeFolders: boolean; } |
Returns:
{ [id: string]: { node: ContentRecord<T>; pathToParentFolder: string[]; }; }
findMappingFieldForHierarchy
Returns the coordinates of the DataVisualizationMappingField in mapping that corresponds to the given hierarchy. Returns undefined if the hierarchy is not expressed in the mapping.
findMappingFieldForHierarchy(mapping, {
dimensionName,
hierarchyName,
});
| Argument | Type | Description |
|---|---|---|
| mapping | DataVisualizationWidgetMapping | |
| { dimensionName, hierarchyName } | HierarchyCoordinates |
Returns:
{ attributeName: string; fieldIndex: number; type: "hierarchy"; } | { attributeName: string; fieldIndex: number; hierarchyIndex: number; type: "compositeHierarchy"; } | undefined
getActiveToolKey
Redux selector returning the key of the active tool tab. See activeToolKey in State.
getActiveToolKey(state);
| Argument | Type | Description |
|---|---|---|
| state | State |
Returns:
string | undefined
getAntdTheme
Returns the Ant Desgin ThemeConfig based on the provided $Theme.
getAntdTheme(atotiTheme);
| Argument | Type | Description |
|---|---|---|
| atotiTheme | Theme |
Returns:
ThemeConfig
getCalculatedMeasures
Returns the expression of each calculated measure defined in mdx.
getCalculatedMeasures(mdx);
| Argument | Type | Description |
|---|---|---|
| mdx | MdxSelect | MdxDrillthrough |
Returns:
{ [measureName: string]: MdxFormula; }
getContentNodes
Returns the nodes useful to display a ContentTree.
getContentNodes(structure, options);
| Argument | Type | Description |
|---|---|---|
| structure | ContentRecord<T> | |
| options | { areFilesVisible: boolean; getDragItem?: (id: string, metaData: T) => void; } |
Returns:
TreeObject<ContentNode<T>>[]
getContentRecordAtPath
Returns the ContentRecord at path in tree.
getContentRecordAtPath({
tree,
path,
});
| Argument | Type | Description |
|---|---|---|
| { tree, path, } | { tree?: ContentRecord<MetaData, T> | null; path?: string[]; } |
Returns:
ContentRecord<MetaData, T> | undefined
getCube
Returns the cube identified by cubeName in dataModel.
getCube(dataModel, cubeName);
| Argument | Type | Description |
|---|---|---|
| dataModel | DataModel | |
| cubeName | CubeName |
Returns:
getCubeName
Returns the name of the cube used in mdx, if any.
getCubeName(mdx);
| Argument | Type | Description |
|---|---|---|
| mdx | MdxSelect | MdxSubSelect | MdxDrillthrough | MdxFromClause |
Returns:
getDashboardState
Redux selector returning the state of the dashboard. See dashboard in State.
getDashboardState(state);
| Argument | Type | Description |
|---|---|---|
| state | State |
Returns:
DashboardState | undefined