insightBucket()
Home > @gooddata/sdk-model > insightBucket
insightBucket() function
Finds bucket matching the provided predicate in an insight.
Signature:
export declare function insightBucket(insight: IInsightDefinition, idOrFun?: string | BucketPredicate): IBucket | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
insight | IInsightDefinition | insight to work with |
idOrFun | string | BucketPredicate | (Optional) local identifier or bucket predicate |
Returns:
IBucket | undefined
undefined if none match
Remarks
This function also provides convenience to find bucket by its local identifier - if you pass predicate as string the function will automatically create idMatchBucket predicate.