MCPcopy
hub / github.com/apache/echarts / constructor

Method constructor

src/data/helper/dataValueHelper.ts:123–133  ·  view source on GitHub ↗
(op: OrderRelationOperator, rval: unknown)

Source from the content-addressed store, hash-verified

121 private _rvalFloat: number;
122 private _opFn: (lval: unknown, rval: unknown) => boolean;
123 constructor(op: OrderRelationOperator, rval: unknown) {
124 if (!isNumber(rval)) {
125 let errMsg = '';
126 if (__DEV__) {
127 errMsg = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.';
128 }
129 throwError(errMsg);
130 }
131 this._opFn = ORDER_COMPARISON_OP_MAP[op];
132 this._rvalFloat = numericToNumber(rval);
133 }
134 // Performance sensitive.
135 evaluate(lval: unknown): boolean {
136 // Most cases is 'number', and typeof maybe 10 times faseter than parseFloat.

Callers

nothing calls this directly

Calls 3

throwErrorFunction · 0.90
numericToNumberFunction · 0.90
isNumberFunction · 0.85

Tested by

no test coverage detected