insightModifyItems()
Home > @gooddata/sdk-model > insightModifyItems
insightModifyItems() function
Creates a new insight with modified bucket items (retrieved by applying the modifications function to each bucketItem in the insight).
Signature:
export declare function insightModifyItems<T extends IInsightDefinition>(insight: T, modifications?: BucketItemModifications): T;
Parameters
Parameter | Type | Description |
---|---|---|
insight | T | insight to use as template for the new insight |
modifications | BucketItemModifications | (Optional) modifications to apply to the bucket items |
Returns:
T
always new instance
Remarks
Note: the bucket item modification function SHOULD NOT modify bucket item's localId. The localId MAY be used to reference the item from other places in the insight (for example from sorts). Changing the item localId has potential to break the insight: as-is this function does not concern itself with changing the references.