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

Method setRawRange

src/component/dataZoom/DataZoomModel.ts:475–495  ·  view source on GitHub ↗

* If not specified, set to undefined.

(opt: RangeOption)

Source from the content-addressed store, hash-verified

473 * If not specified, set to undefined.
474 */
475 setRawRange(opt: RangeOption): void {
476 const thisOption = this.option;
477 const settledOption = this.settledOption;
478 each([['start', 'startValue'], ['end', 'endValue']] as const, function (names) {
479 // Consider the pair <start, startValue>:
480 // If one has value and the other one is `null/undefined`, we both set them
481 // to `settledOption`. This strategy enables the feature to clear the original
482 // value in `settledOption` to `null/undefined`.
483 // But if both of them are `null/undefined`, we do not set them to `settledOption`
484 // and keep `settledOption` with the original value. This strategy enables users to
485 // only set <end or endValue> but not set <start or startValue> when calling
486 // `dispatchAction`.
487 // The pair <end, endValue> is treated in the same way.
488 if (opt[names[0]] != null || opt[names[1]] != null) {
489 thisOption[names[0]] = settledOption[names[0]] = opt[names[0]];
490 thisOption[names[1]] = settledOption[names[1]] = opt[names[1]];
491 }
492 }, this);
493
494 this._updateRangeUse(opt);
495 }
496
497 setCalculatedRange(opt: RangeOption): void {
498 const option = this.option;

Callers 1

installDataZoomActionFunction · 0.80

Calls 2

_updateRangeUseMethod · 0.95
eachFunction · 0.50

Tested by

no test coverage detected