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

Method setStop

src/component/visualMap/PiecewiseModel.ts:365–385  ·  view source on GitHub ↗
(interval: [number, number], valueState?: VisualState)

Source from the content-addressed store, hash-verified

363 const visualMapModel = this;
364
365 function setStop(interval: [number, number], valueState?: VisualState) {
366 const representValue = visualMapModel.getRepresentValue({
367 interval: interval
368 }) as number;// Not category
369 if (!valueState) {
370 valueState = visualMapModel.getValueState(representValue);
371 }
372 const color = getColorVisual(representValue, valueState);
373 if (interval[0] === -Infinity) {
374 outerColors[0] = color;
375 }
376 else if (interval[1] === Infinity) {
377 outerColors[1] = color;
378 }
379 else {
380 stops.push(
381 {value: interval[0], color: color},
382 {value: interval[1], color: color}
383 );
384 }
385 }
386
387 // Suplement
388 const pieceList = this._pieceList.slice();

Callers

nothing calls this directly

Calls 3

getColorVisualFunction · 0.85
getRepresentValueMethod · 0.80
getValueStateMethod · 0.45

Tested by

no test coverage detected