MCPcopy Index your code
hub / github.com/apache/echarts / updateModelActually

Function updateModelActually

src/component/axisPointer/axisTrigger.ts:384–416  ·  view source on GitHub ↗
(
    showValueMap: ShowValueMap,
    axesInfo: Dictionary<CollectedAxisInfo>,
    outputPayload: AxisTriggerPayload
)

Source from the content-addressed store, hash-verified

382}
383
384function updateModelActually(
385 showValueMap: ShowValueMap,
386 axesInfo: Dictionary<CollectedAxisInfo>,
387 outputPayload: AxisTriggerPayload
388) {
389 const outputAxesInfo: AxisTriggerPayload['axesInfo'] = outputPayload.axesInfo = [];
390 // Basic logic: If no 'show' required, 'hide' this axisPointer.
391 each(axesInfo, function (axisInfo, key) {
392 const option = axisInfo.axisPointerModel.option;
393 const valItem = showValueMap[key];
394
395 if (valItem) {
396 !axisInfo.useHandle && (option.status = 'show');
397 option.value = valItem.value;
398 // For label formatter param and highlight.
399 option.seriesDataIndices = (valItem.payloadBatch || []).slice();
400 }
401 // When always show (e.g., handle used), remain
402 // original value and status.
403 else {
404 // If hide, value still need to be set, consider
405 // click legend to toggle axis blank.
406 !axisInfo.useHandle && (option.status = 'hide');
407 }
408
409 // If status is 'hide', should be no info in payload.
410 option.status === 'show' && outputAxesInfo.push({
411 axisDim: axisInfo.axis.dim,
412 axisIndex: axisInfo.axis.model.componentIndex,
413 value: option.value
414 });
415 });
416}
417
418function dispatchTooltipActually(
419 dataByCoordSys: DataByCoordSysCollection,

Callers 1

axisTriggerFunction · 0.85

Calls 1

eachFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…