gi-nx / getAnalyticsResult
ts
function getAnalyticsResult(): Promise<{
allGroupKeys: Set<GroupKey>;
calcError: string;
grouped: GroupedSolvedCombinedRows;
groupKeys: Set<GroupKey>;
isNoData: boolean;
orphans: Set<string>;
rows: SolvedMeasure[];
siteData: SiteAreaData;
stackedSectionResult: StackedSectionResult;
}>;Get the analytics result for the current project.
Returns
Promise<{ allGroupKeys: Set<GroupKey>; calcError: string; grouped: GroupedSolvedCombinedRows; groupKeys: Set<GroupKey>; isNoData: boolean; orphans: Set<string>; rows: SolvedMeasure[]; siteData: SiteAreaData; stackedSectionResult: StackedSectionResult; }>
Promise resolving to AnalyticsResult object
Example
typescript
const analytics = await rpc.invoke("getAnalyticsResult", []);
console.log("Total area:", analytics.totalArea);