Applies compute ratio rule to all measures in a list.
export declare function applyRatioRule<T extends IAttributeOrMeasure>(items: T, rule?: ComputeRatioRule): T;
|items||T||list of attributes or measures to sanitize; attributes will be lef|
|rule||ComputeRatioRule||(Optional) rule to apply; see ComputeRatioRule|
new list with modified measures; the original list and measures in it are left intact
This MAY be done to sanitize measure definitions so that the computed results make sense when visualized in a chart.
The function will return a new list with updated measures according to the specified rule; see ComputeRatioRule.
For convenience this function can work with list of measures AND attributes; attributes will be ignored in processing and kept in resulting array as-is.