(
tooltipModel: TooltipModel,
ecModel: GlobalModel,
api: ExtensionAPI,
payload: ShowTipPayload
)
| 410 | // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer |
| 411 | // and tooltip. |
| 412 | private _manuallyAxisShowTip( |
| 413 | tooltipModel: TooltipModel, |
| 414 | ecModel: GlobalModel, |
| 415 | api: ExtensionAPI, |
| 416 | payload: ShowTipPayload |
| 417 | ) { |
| 418 | const seriesIndex = payload.seriesIndex; |
| 419 | const dataIndex = payload.dataIndex; |
| 420 | // @ts-ignore |
| 421 | const coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; |
| 422 | |
| 423 | if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) { |
| 424 | return; |
| 425 | } |
| 426 | |
| 427 | const seriesModel = ecModel.getSeriesByIndex(seriesIndex); |
| 428 | if (!seriesModel) { |
| 429 | return; |
| 430 | } |
| 431 | |
| 432 | const data = seriesModel.getData(); |
| 433 | const tooltipCascadedModel = buildTooltipModel([ |
| 434 | data.getItemModel<TooltipableOption>(dataIndex), |
| 435 | seriesModel as Model<TooltipableOption>, |
| 436 | (seriesModel.coordinateSystem || {}).model as Model<TooltipableOption> |
| 437 | ], this._tooltipModel); |
| 438 | |
| 439 | if (tooltipCascadedModel.get('trigger') !== 'axis') { |
| 440 | return; |
| 441 | } |
| 442 | |
| 443 | api.dispatchAction({ |
| 444 | type: 'updateAxisPointer', |
| 445 | seriesIndex: seriesIndex, |
| 446 | dataIndex: dataIndex, |
| 447 | position: payload.position |
| 448 | }); |
| 449 | |
| 450 | return true; |
| 451 | } |
| 452 | |
| 453 | private _tryShow( |
| 454 | e: TryShowParams, |
no test coverage detected