(
showValueMap: ShowValueMap,
axesInfo: Dictionary<CollectedAxisInfo>,
outputPayload: AxisTriggerPayload
)
| 382 | } |
| 383 | |
| 384 | function 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 | |
| 418 | function dispatchTooltipActually( |
| 419 | dataByCoordSys: DataByCoordSysCollection, |
no test coverage detected
searching dependent graphs…