| 1 |
- {"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport { __extends } from \"tslib\";\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { bind, each, clone, trim, isString, isFunction, isArray, isObject, extend } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport TooltipHTMLContent from './TooltipHTMLContent.js';\nimport TooltipRichContent from './TooltipRichContent.js';\nimport { convertToColorString, encodeHTML, formatTpl } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport { Rect } from '../../util/graphic.js';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport Model from '../../model/Model.js';\nimport * as globalListener from '../axisPointer/globalListener.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper.js';\nimport { getTooltipRenderMode, preParseFinder, queryReferringComponents } from '../../util/model.js';\nimport ComponentView from '../../view/Component.js';\nimport { format as timeFormat } from '../../util/time.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { shouldTooltipConfine } from './helper.js';\nimport { normalizeTooltipFormatResult } from '../../model/mixin/dataFormat.js';\nimport { createTooltipMarkup, buildTooltipMarkup, TooltipMarkupStyleCreator } from './tooltipMarkup.js';\nimport { findEventDispatcher } from '../../util/event.js';\nimport { clear, createOrUpdate } from '../../util/throttle.js';\nvar proxyRect = new Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\nvar TooltipView = /** @class */function (_super) {\n __extends(TooltipView, _super);\n function TooltipView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipView.type;\n return _this;\n }\n TooltipView.prototype.init = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = this._renderMode = getTooltipRenderMode(tooltipModel.get('renderMode'));\n this._tooltipContent = renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api, {\n appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true)\n });\n };\n TooltipView.prototype.render = function (tooltipModel, ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n // Reset\n this.group.removeAll();\n this._tooltipModel = tooltipModel;\n this._ecModel = ecModel;\n this._api = api;\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n this._initGlobalListener();\n this._keepShow();\n // PENDING\n // `mousemove` event will be triggered very frequently when the mouse moves fast,\n // which causes that the `updatePosition` function was also called frequently.\n // In Chrome with devtools open and Firefox, tooltip looks laggy and shakes. See #14695 #16101\n // To avoid frequent triggering,\n // consider throttling it in 50ms when transition is enabled\n if (this._renderMode !== 'richText' && tooltipModel.get('transitionDuration')) {\n createOrUpdate(this, '_updatePosition', 50, 'fixRate');\n } else {\n clear(this, '_updatePosition');\n }\n };\n TooltipView.prototype._initGlobalListener = function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n globalListener.register('itemTooltip', this._api, bind(function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none') {\n if (triggerOn.indexOf(currTrigger) >= 0) {\n this._tryShow(e, dispatchAction);\n } else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this));\n };\n TooltipView.prototype._keepShow = function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api;\n var triggerOn = tooltipModel.get('triggerOn');\n // Try to keep the tooltip show when refreshing\n if (this._lastX != null && this._lastY != null\n // When user is willing to control tooltip totally using API,\n // self.manuallyShowTip({x, y}) might cause tooltip hide,\n // which is not expected.\n && triggerOn !== 'none' && triggerOn !== 'click') {\n var self_1 = this;\n clearTimeout(this._refreshUpdateTimeout);\n this._refreshUpdateTimeout = setTimeout(function () {\n // Show tip next tick after other charts are rendered\n // In case highlight action has wrong result\n // FIXME\n !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, {\n x: self_1._lastX,\n y: self_1._lastY,\n dataByCoordSys: self_1._lastDataByCoordSys\n });\n });\n }\n };\n /**\r\n * Show tip manually by\r\n * dispatchAction({\r\n * type: 'showTip',\r\n * x: 10,\r\n * y: 10\r\n * });\r\n * Or\r\n * dispatchAction({\r\n * type: 'showTip',\r\n * seriesIndex: 0,\r\n * dataIndex or dataIndexInside or name\r\n * });\r\n *\r\n * TODO Batch\r\n */\n TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node || !api.getDom()) {\n return;\n }\n var dispatchAction = makeDispatchAction(payload, api);\n // Reset ticket\n this._ticket = '';\n // When triggered from axisPointer.\n var dataByCoordSys = payload.dataByCoordSys;\n var cmptRef = findComponentReference(payload, ecModel, api);\n if (cmptRef) {\n var rect = cmptRef.el.getBoundingRect().clone();\n rect.applyTransform(cmptRef.el.transform);\n this._tryShow({\n offsetX: rect.x + rect.width / 2,\n offsetY: rect.y + rect.height / 2,\n target: cmptRef.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n } else if (payload.tooltip && payload.x != null && payload.y != null) {\n var el = proxyRect;\n el.x = payload.x;\n el.y = payload.y;\n el.update();\n getECData(el).tooltipConfig = {\n name: null,\n option: payload.tooltip\n };\n // Manually show tooltip while view is not using zrender elements.\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n } else if (dataByCoordSys) {\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n dataByCoordSys: dataByCoordSys,\n tooltipOption: payload.tooltipOption\n }, dispatchAction);\n } else if (payload.seriesIndex != null) {\n if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) {\n return;\n }\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n if (cx != null && cy != null) {\n this._tryShow({\n offsetX: cx,\n offsetY: cy,\n target: pointInfo.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n }\n } else if (payload.x != null && payload.y != null) {\n // FIXME\n // should wrap dispatchAction like `axisPointer/globalListener` ?\n api.dispatchAction({\n type: 'updateAxisPointer',\n x: payload.x,\n y: payload.y\n });\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n target: api.getZr().findHover(payload.x, payload.y).target\n }, dispatchAction);\n }\n };\n TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n if (this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n this._lastX = this._lastY = this._lastDataByCoordSys = null;\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\n }\n };\n // Be compatible with previous design, that is, when tooltip.type is 'axis' and\n // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer\n // and tooltip.\n TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex;\n // @ts-ignore\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n if (!seriesModel) {\n return;\n }\n var data = seriesModel.getData();\n var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel);\n if (tooltipCascadedModel.get('trigger') !== 'axis') {\n return;\n }\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n };\n TooltipView.prototype._tryShow = function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n if (!tooltipModel) {\n return;\n }\n // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } else if (el) {\n var ecData = getECData(el);\n if (ecData.ssrType === 'legend') {\n // Don't trigger tooltip for legend tooltip item\n return;\n }\n this._lastDataByCoordSys = null;\n var seriesDispatcher_1;\n var cmptDispatcher_1;\n findEventDispatcher(el, function (target) {\n // Always show item tooltip if mouse is on the element with dataIndex\n if (getECData(target).dataIndex != null) {\n seriesDispatcher_1 = target;\n return true;\n }\n // Tooltip provided directly. Like legend.\n if (getECData(target).tooltipConfig != null) {\n cmptDispatcher_1 = target;\n return true;\n }\n }, true);\n if (seriesDispatcher_1) {\n this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction);\n } else if (cmptDispatcher_1) {\n this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction);\n } else {\n this._hide(dispatchAction);\n }\n } else {\n this._lastDataByCoordSys = null;\n this._hide(dispatchAction);\n }\n };\n TooltipView.prototype._showOrMove = function (tooltipModel, cb) {\n // showDelay is used in this case: tooltip.enterable is set\n // as true. User intent to move mouse into tooltip and click\n // something. `showDelay` makes it easier to enter the content\n // but tooltip do not move immediately.\n var delay = tooltipModel.get('showDelay');\n cb = bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n };\n TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n var point = [e.offsetX, e.offsetY];\n var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel);\n var renderMode = this._renderMode;\n var cbParamsList = [];\n var articleMarkup = createTooltipMarkup('section', {\n blocks: [],\n noHeader: true\n });\n // Only for legacy: `Serise['formatTooltip']` returns a string.\n var markupTextArrLegacy = [];\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n each(dataByCoordSys, function (itemCoordSys) {\n each(itemCoordSys.dataByAxis, function (axisItem) {\n var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex);\n var axisValue = axisItem.value;\n if (!axisModel || axisValue == null) {\n return;\n }\n var axisValueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt);\n var axisSectionMarkup = createTooltipMarkup('section', {\n header: axisValueLabel,\n noHeader: !trim(axisValueLabel),\n sortBlocks: true,\n blocks: []\n });\n articleMarkup.blocks.push(axisSectionMarkup);\n each(axisItem.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var cbParams = series.getDataParams(dataIndex);\n // Can't find data.\n if (cbParams.dataIndex < 0) {\n return;\n }\n cbParams.axisDim = axisItem.axisDim;\n cbParams.axisIndex = axisItem.axisIndex;\n cbParams.axisType = axisItem.axisType;\n cbParams.axisId = axisItem.axisId;\n cbParams.axisValue = axisHelper.getAxisRawValue(axisModel.axis, {\n value: axisValue\n });\n cbParams.axisValueLabel = axisValueLabel;\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null));\n var frag = seriesTooltipResult.frag;\n if (frag) {\n var valueFormatter = buildTooltipModel([series], globalTooltipModel).get('valueFormatter');\n axisSectionMarkup.blocks.push(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag);\n }\n if (seriesTooltipResult.text) {\n markupTextArrLegacy.push(seriesTooltipResult.text);\n }\n cbParamsList.push(cbParams);\n });\n });\n });\n // In most cases, the second axis is displays upper on the first one.\n // So we reverse it to look better.\n articleMarkup.blocks.reverse();\n markupTextArrLegacy.reverse();\n var positionExpr = e.position;\n var orderMode = singleTooltipModel.get('order');\n var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle'));\n builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText);\n var blockBreak = renderMode === 'richText' ? '\\n\\n' : '<br/>';\n var allMarkupText = markupTextArrLegacy.join(blockBreak);\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys, cbParamsList)) {\n this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList);\n } else {\n this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator);\n }\n });\n // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n };\n TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) {\n var ecModel = this._ecModel;\n var ecData = getECData(dispatcher);\n // Use dataModel in element if possible\n // Used when mouseover on a element like markPoint or edge\n // In which case, the data is not main data in series.\n var seriesIndex = ecData.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n // For example, graph link.\n var dataModel = ecData.dataModel || seriesModel;\n var dataIndex = ecData.dataIndex;\n var dataType = ecData.dataType;\n var data = dataModel.getData(dataType);\n var renderMode = this._renderMode;\n var positionDefault = e.positionDefault;\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var tooltipTrigger = tooltipModel.get('trigger');\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n var params = dataModel.getDataParams(dataIndex, dataType);\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType));\n var orderMode = tooltipModel.get('order');\n var valueFormatter = tooltipModel.get('valueFormatter');\n var frag = seriesTooltipResult.frag;\n var markupText = frag ? buildTooltipMarkup(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.text;\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator);\n });\n // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n };\n TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) {\n var isHTMLRenderMode = this._renderMode === 'html';\n var ecData = getECData(el);\n var tooltipConfig = ecData.tooltipConfig;\n var tooltipOpt = tooltipConfig.option || {};\n var encodeHTMLContent = tooltipOpt.encodeHTMLContent;\n if (isString(tooltipOpt)) {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n // when `tooltipConfig.option` is a string rather than an object,\n // we can't know if the content needs to be encoded\n // for the sake of security, encode it by default.\n encodeHTMLContent = true;\n }\n if (encodeHTMLContent && isHTMLRenderMode && tooltipOpt.content) {\n // clone might be unnecessary?\n tooltipOpt = clone(tooltipOpt);\n tooltipOpt.content = encodeHTML(tooltipOpt.content);\n }\n var tooltipModelCascade = [tooltipOpt];\n var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex);\n if (cmpt) {\n tooltipModelCascade.push(cmpt);\n }\n // In most cases, component tooltip formatter has different params with series tooltip formatter,\n // so that they cannot share the same formatter. Since the global tooltip formatter is used for series\n // by convention, we do not use it as the default formatter for component.\n tooltipModelCascade.push({\n formatter: tooltipOpt.content\n });\n var positionDefault = e.positionDefault;\n var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random() + '';\n // PENDING: this case do not support richText style yet.\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Do not check whether `trigger` is 'none' here, because `trigger`\n // only works on coordinate system. In fact, we have not found case\n // that requires setting `trigger` nothing on component yet.\n this._showOrMove(subTooltipModel, function () {\n // Use formatterParams from element defined in component\n // Avoid users modify it.\n var formatterParams = clone(subTooltipModel.get('formatterParams') || {});\n this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator);\n });\n // If not dispatch showTip, tip may be hide triggered by axis.\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n };\n TooltipView.prototype._showTooltipContent = function (\n // Use Model<TooltipOption> insteadof TooltipModel because this model may be from series or other options.\n // Instead of top level tooltip.\n tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) {\n // Reset ticket\n this._ticket = '';\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n var tooltipContent = this._tooltipContent;\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor'));\n var nearPointColor = nearPoint.color;\n if (formatter) {\n if (isString(formatter)) {\n var useUTC = tooltipModel.ecModel.get('useUTC');\n var params0 = isArray(params) ? params[0] : params;\n var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;\n html = formatter;\n if (isTimeAxis) {\n html = timeFormat(params0.axisValue, html, useUTC);\n }\n html = formatTpl(html, params, true);\n } else if (isFunction(formatter)) {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n } else {\n html = formatter;\n }\n }\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n tooltipContent.show(tooltipModel, nearPointColor);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n };\n TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) {\n if (trigger === 'axis' || isArray(tooltipDataParams)) {\n return {\n color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none')\n };\n }\n if (!isArray(tooltipDataParams)) {\n return {\n color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor\n };\n }\n };\n TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x,\n // Mouse x\n y,\n // Mouse y\n content, params, el) {\n var viewWidth = this._api.getWidth();\n var viewHeight = this._api.getHeight();\n positionExpr = positionExpr || tooltipModel.get('position');\n var contentSize = content.getSize();\n var align = tooltipModel.get('align');\n var vAlign = tooltipModel.get('verticalAlign');\n var rect = el && el.getBoundingRect().clone();\n el && rect.applyTransform(el.transform);\n if (isFunction(positionExpr)) {\n // Callback of position can be an array or a string specify the position\n positionExpr = positionExpr([x, y], params, content.el, rect, {\n viewSize: [viewWidth, viewHeight],\n contentSize: contentSize.slice()\n });\n }\n if (isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (isObject(positionExpr)) {\n var boxLayoutPosition = positionExpr;\n boxLayoutPosition.width = contentSize[0];\n boxLayoutPosition.height = contentSize[1];\n var layoutRect = getLayoutRect(boxLayoutPosition, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null;\n // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n vAlign = null;\n }\n // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (isString(positionExpr) && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize, tooltipModel.get('borderWidth'));\n x = pos[0];\n y = pos[1];\n } else {\n var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20);\n x = pos[0];\n y = pos[1];\n }\n align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0);\n vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0);\n if (shouldTooltipConfine(tooltipModel)) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n content.moveTo(x, y);\n };\n // FIXME\n // Should we remove this but leave this to user?\n TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys, cbParamsList) {\n var lastCoordSys = this._lastDataByCoordSys;\n var lastCbParamsList = this._cbParamsList;\n var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length;\n contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {\n var lastDataByAxis = lastItemCoordSys.dataByAxis || [];\n var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};\n var thisDataByAxis = thisItemCoordSys.dataByAxis || [];\n contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length;\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length;\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n // check is cbParams data value changed\n lastCbParamsList && each(lastItem.seriesDataIndices, function (idxItem) {\n var seriesIdx = idxItem.seriesIndex;\n var cbParams = cbParamsList[seriesIdx];\n var lastCbParams = lastCbParamsList[seriesIdx];\n if (cbParams && lastCbParams && lastCbParams.data !== cbParams.data) {\n contentNotChanged = false;\n }\n });\n });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n this._cbParamsList = cbParamsList;\n return !!contentNotChanged;\n };\n TooltipView.prototype._hide = function (dispatchAction) {\n // Do not directly hideLater here, because this behavior may be prevented\n // in dispatchAction when showTip is dispatched.\n // FIXME\n // duplicated hideTip if manuallyHideTip is called from dispatchAction.\n this._lastDataByCoordSys = null;\n dispatchAction({\n type: 'hideTip',\n from: this.uid\n });\n };\n TooltipView.prototype.dispose = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n clear(this, '_updatePosition');\n this._tooltipContent.dispose();\n globalListener.unregister('itemTooltip', api);\n };\n TooltipView.type = 'tooltip';\n return TooltipView;\n}(ComponentView);\n/**\r\n * From top to bottom. (the last one should be globalTooltipModel);\r\n */\nfunction buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {\n // Last is always tooltip model.\n var ecModel = globalTooltipModel.ecModel;\n var resultModel;\n if (defaultTooltipOption) {\n resultModel = new Model(defaultTooltipOption, ecModel, ecModel);\n resultModel = new Model(globalTooltipModel.option, resultModel, ecModel);\n } else {\n resultModel = globalTooltipModel;\n }\n for (var i = modelCascade.length - 1; i >= 0; i--) {\n var tooltipOpt = modelCascade[i];\n if (tooltipOpt) {\n if (tooltipOpt instanceof Model) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n }\n // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n if (isString(tooltipOpt)) {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n if (tooltipOpt) {\n resultModel = new Model(tooltipOpt, resultModel, ecModel);\n }\n }\n }\n return resultModel;\n}\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || bind(api.dispatchAction, api);\n}\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n if (gapH != null) {\n // Add extra 2 pixels for this case:\n // At present the \"values\" in default tooltip are using CSS `float: right`.\n // When the right edge of the tooltip box is on the right side of the\n // viewport, the `float` layout might push the \"values\" to the second line.\n if (x + width + gapH + 2 > viewWidth) {\n x -= width + gapH;\n } else {\n x += gapH;\n }\n }\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n return [x, y];\n}\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n x = Math.min(x + width, viewWidth) - width;\n y = Math.min(y + height, viewHeight) - height;\n x = Math.max(x, 0);\n y = Math.max(y, 0);\n return [x, y];\n}\nfunction calcTooltipPosition(position, rect, contentSize, borderWidth) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var offset = Math.ceil(Math.SQRT2 * borderWidth) + 8;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - offset;\n break;\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + offset;\n break;\n case 'left':\n x = rect.x - domWidth - offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'right':\n x = rect.x + rectWidth + offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n return [x, y];\n}\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n/**\r\n * Find target component by payload like:\r\n * ```js\r\n * { legendId: 'some_id', name: 'xxx' }\r\n * { toolboxIndex: 1, name: 'xxx' }\r\n * { geoName: 'some_name', name: 'xxx' }\r\n * ```\r\n * PENDING: at present only\r\n *\r\n * If not found, return null/undefined.\r\n */\nfunction findComponentReference(payload, ecModel, api) {\n var queryOptionMap = preParseFinder(payload).queryOptionMap;\n var componentMainType = queryOptionMap.keys()[0];\n if (!componentMainType || componentMainType === 'series') {\n return;\n }\n var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), {\n useDefault: false,\n enableAll: false,\n enableNone: false\n });\n var model = queryResult.models[0];\n if (!model) {\n return;\n }\n var view = api.getViewOfComponentModel(model);\n var el;\n view.group.traverse(function (subEl) {\n var tooltipConfig = getECData(subEl).tooltipConfig;\n if (tooltipConfig && tooltipConfig.name === payload.name) {\n el = subEl;\n return true; // stop\n }\n });\n if (el) {\n return {\n componentMainType: componentMainType,\n componentIndex: model.componentIndex,\n el: el\n };\n }\n}\nexport default TooltipView;","map":{"version":3,"names":["__extends","bind","each","clone","trim","isString","isFunction","isArray","isObject","extend","env","TooltipHTMLContent","TooltipRichContent","convertToColorString","encodeHTML","formatTpl","parsePercent","Rect","findPointFromSeries","getLayoutRect","Model","globalListener","axisHelper","axisPointerViewHelper","getTooltipRenderMode","preParseFinder","queryReferringComponents","ComponentView","format","timeFormat","getECData","shouldTooltipConfine","normalizeTooltipFormatResult","createTooltipMarkup","buildTooltipMarkup","TooltipMarkupStyleCreator","findEventDispatcher","clear","createOrUpdate","proxyRect","shape","x","y","width","height","TooltipView","_super","_this","apply","arguments","type","prototype","init","ecModel","api","node","getDom","tooltipModel","getComponent","renderMode","_renderMode","get","_tooltipContent","appendTo","render","group","removeAll","_tooltipModel","_ecModel","_api","tooltipContent","update","setEnterable","_initGlobalListener","_keepShow","triggerOn","register","currTrigger","e","dispatchAction","indexOf","_tryShow","_hide","_lastX","_lastY","self_1","clearTimeout","_refreshUpdateTimeout","setTimeout","isDisposed","manuallyShowTip","dataByCoordSys","_lastDataByCoordSys","payload","from","uid","makeDispatchAction","_ticket","cmptRef","findComponentReference","rect","el","getBoundingRect","applyTransform","transform","offsetX","offsetY","target","position","positionDefault","tooltip","tooltipConfig","name","option","tooltipOption","seriesIndex","_manuallyAxisShowTip","pointInfo","cx","point","cy","getZr","findHover","manuallyHideTip","hideLater","dataIndex","coordSysAxesInfo","seriesModel","getSeriesByIndex","data","getData","tooltipCascadedModel","buildTooltipModel","getItemModel","coordinateSystem","model","length","_showAxisTooltip","ecData","ssrType","seriesDispatcher_1","cmptDispatcher_1","_showSeriesItemTooltip","_showComponentItemTooltip","_showOrMove","cb","delay","_showTimout","globalTooltipModel","singleTooltipModel","cbParamsList","articleMarkup","blocks","noHeader","markupTextArrLegacy","markupStyleCreator","itemCoordSys","dataByAxis","axisItem","axisModel","axisDim","axisIndex","axisValue","value","axisValueLabel","getValueLabel","axis","seriesDataIndices","valueLabelOpt","axisSectionMarkup","header","sortBlocks","push","idxItem","series","dataIndexInside","cbParams","getDataParams","axisType","axisId","getAxisRawValue","marker","makeTooltipMarker","color","seriesTooltipResult","formatTooltip","frag","valueFormatter","text","reverse","positionExpr","orderMode","builtMarkupText","unshift","blockBreak","allMarkupText","join","_updateContentNotChangedOnAxis","_updatePosition","_showTooltipContent","Math","random","dispatcher","dataModel","dataType","tooltipTrigger","params","markupText","asyncTicket","getRawIndex","isHTMLRenderMode","tooltipOpt","encodeHTMLContent","content","formatter","tooltipModelCascade","cmpt","componentMainType","componentIndex","subTooltipModel","defaultHtml","formatterParams","html","nearPoint","_getNearestPoint","nearPointColor","useUTC","params0","isTimeAxis","callback","cbTicket","setContent","show","tooltipDataParams","trigger","borderColor","viewWidth","getWidth","viewHeight","getHeight","contentSize","getSize","align","vAlign","viewSize","slice","boxLayoutPosition","layoutRect","pos","calcTooltipPosition","refixTooltipPosition","isCenterAlign","confineTooltipPosition","moveTo","lastCoordSys","lastCbParamsList","_cbParamsList","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisItemCoordSys","thisDataByAxis","lastItem","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","j","newIdxItem","seriesIdx","lastCbParams","dispose","unregister","modelCascade","defaultTooltipOption","resultModel","i","gapH","gapV","size","min","max","borderWidth","domWidth","domHeight","offset","ceil","SQRT2","rectWidth","rectHeight","queryOptionMap","keys","queryResult","useDefault","enableAll","enableNone","models","view","getViewOfComponentModel","traverse","subEl"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/component/tooltip/TooltipView.js"],"sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\nimport { __extends } from \"tslib\";\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { bind, each, clone, trim, isString, isFunction, isArray, isObject, extend } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport TooltipHTMLContent from './TooltipHTMLContent.js';\nimport TooltipRichContent from './TooltipRichContent.js';\nimport { convertToColorString, encodeHTML, formatTpl } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport { Rect } from '../../util/graphic.js';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries.js';\nimport { getLayoutRect } from '../../util/layout.js';\nimport Model from '../../model/Model.js';\nimport * as globalListener from '../axisPointer/globalListener.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper.js';\nimport { getTooltipRenderMode, preParseFinder, queryReferringComponents } from '../../util/model.js';\nimport ComponentView from '../../view/Component.js';\nimport { format as timeFormat } from '../../util/time.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { shouldTooltipConfine } from './helper.js';\nimport { normalizeTooltipFormatResult } from '../../model/mixin/dataFormat.js';\nimport { createTooltipMarkup, buildTooltipMarkup, TooltipMarkupStyleCreator } from './tooltipMarkup.js';\nimport { findEventDispatcher } from '../../util/event.js';\nimport { clear, createOrUpdate } from '../../util/throttle.js';\nvar proxyRect = new Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\nvar TooltipView = /** @class */function (_super) {\n __extends(TooltipView, _super);\n function TooltipView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TooltipView.type;\n return _this;\n }\n TooltipView.prototype.init = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = this._renderMode = getTooltipRenderMode(tooltipModel.get('renderMode'));\n this._tooltipContent = renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api, {\n appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true)\n });\n };\n TooltipView.prototype.render = function (tooltipModel, ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n // Reset\n this.group.removeAll();\n this._tooltipModel = tooltipModel;\n this._ecModel = ecModel;\n this._api = api;\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n this._initGlobalListener();\n this._keepShow();\n // PENDING\n // `mousemove` event will be triggered very frequently when the mouse moves fast,\n // which causes that the `updatePosition` function was also called frequently.\n // In Chrome with devtools open and Firefox, tooltip looks laggy and shakes. See #14695 #16101\n // To avoid frequent triggering,\n // consider throttling it in 50ms when transition is enabled\n if (this._renderMode !== 'richText' && tooltipModel.get('transitionDuration')) {\n createOrUpdate(this, '_updatePosition', 50, 'fixRate');\n } else {\n clear(this, '_updatePosition');\n }\n };\n TooltipView.prototype._initGlobalListener = function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n globalListener.register('itemTooltip', this._api, bind(function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none') {\n if (triggerOn.indexOf(currTrigger) >= 0) {\n this._tryShow(e, dispatchAction);\n } else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this));\n };\n TooltipView.prototype._keepShow = function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api;\n var triggerOn = tooltipModel.get('triggerOn');\n // Try to keep the tooltip show when refreshing\n if (this._lastX != null && this._lastY != null\n // When user is willing to control tooltip totally using API,\n // self.manuallyShowTip({x, y}) might cause tooltip hide,\n // which is not expected.\n && triggerOn !== 'none' && triggerOn !== 'click') {\n var self_1 = this;\n clearTimeout(this._refreshUpdateTimeout);\n this._refreshUpdateTimeout = setTimeout(function () {\n // Show tip next tick after other charts are rendered\n // In case highlight action has wrong result\n // FIXME\n !api.isDisposed() && self_1.manuallyShowTip(tooltipModel, ecModel, api, {\n x: self_1._lastX,\n y: self_1._lastY,\n dataByCoordSys: self_1._lastDataByCoordSys\n });\n });\n }\n };\n /**\r\n * Show tip manually by\r\n * dispatchAction({\r\n * type: 'showTip',\r\n * x: 10,\r\n * y: 10\r\n * });\r\n * Or\r\n * dispatchAction({\r\n * type: 'showTip',\r\n * seriesIndex: 0,\r\n * dataIndex or dataIndexInside or name\r\n * });\r\n *\r\n * TODO Batch\r\n */\n TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node || !api.getDom()) {\n return;\n }\n var dispatchAction = makeDispatchAction(payload, api);\n // Reset ticket\n this._ticket = '';\n // When triggered from axisPointer.\n var dataByCoordSys = payload.dataByCoordSys;\n var cmptRef = findComponentReference(payload, ecModel, api);\n if (cmptRef) {\n var rect = cmptRef.el.getBoundingRect().clone();\n rect.applyTransform(cmptRef.el.transform);\n this._tryShow({\n offsetX: rect.x + rect.width / 2,\n offsetY: rect.y + rect.height / 2,\n target: cmptRef.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n } else if (payload.tooltip && payload.x != null && payload.y != null) {\n var el = proxyRect;\n el.x = payload.x;\n el.y = payload.y;\n el.update();\n getECData(el).tooltipConfig = {\n name: null,\n option: payload.tooltip\n };\n // Manually show tooltip while view is not using zrender elements.\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n } else if (dataByCoordSys) {\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n dataByCoordSys: dataByCoordSys,\n tooltipOption: payload.tooltipOption\n }, dispatchAction);\n } else if (payload.seriesIndex != null) {\n if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) {\n return;\n }\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n if (cx != null && cy != null) {\n this._tryShow({\n offsetX: cx,\n offsetY: cy,\n target: pointInfo.el,\n position: payload.position,\n // When manully trigger, the mouse is not on the el, so we'd better to\n // position tooltip on the bottom of the el and display arrow is possible.\n positionDefault: 'bottom'\n }, dispatchAction);\n }\n } else if (payload.x != null && payload.y != null) {\n // FIXME\n // should wrap dispatchAction like `axisPointer/globalListener` ?\n api.dispatchAction({\n type: 'updateAxisPointer',\n x: payload.x,\n y: payload.y\n });\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n target: api.getZr().findHover(payload.x, payload.y).target\n }, dispatchAction);\n }\n };\n TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n if (this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n this._lastX = this._lastY = this._lastDataByCoordSys = null;\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\n }\n };\n // Be compatible with previous design, that is, when tooltip.type is 'axis' and\n // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer\n // and tooltip.\n TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex;\n // @ts-ignore\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n if (!seriesModel) {\n return;\n }\n var data = seriesModel.getData();\n var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel);\n if (tooltipCascadedModel.get('trigger') !== 'axis') {\n return;\n }\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n };\n TooltipView.prototype._tryShow = function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n if (!tooltipModel) {\n return;\n }\n // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } else if (el) {\n var ecData = getECData(el);\n if (ecData.ssrType === 'legend') {\n // Don't trigger tooltip for legend tooltip item\n return;\n }\n this._lastDataByCoordSys = null;\n var seriesDispatcher_1;\n var cmptDispatcher_1;\n findEventDispatcher(el, function (target) {\n // Always show item tooltip if mouse is on the element with dataIndex\n if (getECData(target).dataIndex != null) {\n seriesDispatcher_1 = target;\n return true;\n }\n // Tooltip provided directly. Like legend.\n if (getECData(target).tooltipConfig != null) {\n cmptDispatcher_1 = target;\n return true;\n }\n }, true);\n if (seriesDispatcher_1) {\n this._showSeriesItemTooltip(e, seriesDispatcher_1, dispatchAction);\n } else if (cmptDispatcher_1) {\n this._showComponentItemTooltip(e, cmptDispatcher_1, dispatchAction);\n } else {\n this._hide(dispatchAction);\n }\n } else {\n this._lastDataByCoordSys = null;\n this._hide(dispatchAction);\n }\n };\n TooltipView.prototype._showOrMove = function (tooltipModel, cb) {\n // showDelay is used in this case: tooltip.enterable is set\n // as true. User intent to move mouse into tooltip and click\n // something. `showDelay` makes it easier to enter the content\n // but tooltip do not move immediately.\n var delay = tooltipModel.get('showDelay');\n cb = bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n };\n TooltipView.prototype._showAxisTooltip = function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n var point = [e.offsetX, e.offsetY];\n var singleTooltipModel = buildTooltipModel([e.tooltipOption], globalTooltipModel);\n var renderMode = this._renderMode;\n var cbParamsList = [];\n var articleMarkup = createTooltipMarkup('section', {\n blocks: [],\n noHeader: true\n });\n // Only for legacy: `Serise['formatTooltip']` returns a string.\n var markupTextArrLegacy = [];\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n each(dataByCoordSys, function (itemCoordSys) {\n each(itemCoordSys.dataByAxis, function (axisItem) {\n var axisModel = ecModel.getComponent(axisItem.axisDim + 'Axis', axisItem.axisIndex);\n var axisValue = axisItem.value;\n if (!axisModel || axisValue == null) {\n return;\n }\n var axisValueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt);\n var axisSectionMarkup = createTooltipMarkup('section', {\n header: axisValueLabel,\n noHeader: !trim(axisValueLabel),\n sortBlocks: true,\n blocks: []\n });\n articleMarkup.blocks.push(axisSectionMarkup);\n each(axisItem.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var cbParams = series.getDataParams(dataIndex);\n // Can't find data.\n if (cbParams.dataIndex < 0) {\n return;\n }\n cbParams.axisDim = axisItem.axisDim;\n cbParams.axisIndex = axisItem.axisIndex;\n cbParams.axisType = axisItem.axisType;\n cbParams.axisId = axisItem.axisId;\n cbParams.axisValue = axisHelper.getAxisRawValue(axisModel.axis, {\n value: axisValue\n });\n cbParams.axisValueLabel = axisValueLabel;\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n cbParams.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(cbParams.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null));\n var frag = seriesTooltipResult.frag;\n if (frag) {\n var valueFormatter = buildTooltipModel([series], globalTooltipModel).get('valueFormatter');\n axisSectionMarkup.blocks.push(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag);\n }\n if (seriesTooltipResult.text) {\n markupTextArrLegacy.push(seriesTooltipResult.text);\n }\n cbParamsList.push(cbParams);\n });\n });\n });\n // In most cases, the second axis is displays upper on the first one.\n // So we reverse it to look better.\n articleMarkup.blocks.reverse();\n markupTextArrLegacy.reverse();\n var positionExpr = e.position;\n var orderMode = singleTooltipModel.get('order');\n var builtMarkupText = buildTooltipMarkup(articleMarkup, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), singleTooltipModel.get('textStyle'));\n builtMarkupText && markupTextArrLegacy.unshift(builtMarkupText);\n var blockBreak = renderMode === 'richText' ? '\\n\\n' : '<br/>';\n var allMarkupText = markupTextArrLegacy.join(blockBreak);\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys, cbParamsList)) {\n this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, cbParamsList);\n } else {\n this._showTooltipContent(singleTooltipModel, allMarkupText, cbParamsList, Math.random() + '', point[0], point[1], positionExpr, null, markupStyleCreator);\n }\n });\n // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n };\n TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) {\n var ecModel = this._ecModel;\n var ecData = getECData(dispatcher);\n // Use dataModel in element if possible\n // Used when mouseover on a element like markPoint or edge\n // In which case, the data is not main data in series.\n var seriesIndex = ecData.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n // For example, graph link.\n var dataModel = ecData.dataModel || seriesModel;\n var dataIndex = ecData.dataIndex;\n var dataType = ecData.dataType;\n var data = dataModel.getData(dataType);\n var renderMode = this._renderMode;\n var positionDefault = e.positionDefault;\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model], this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var tooltipTrigger = tooltipModel.get('trigger');\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n var params = dataModel.getDataParams(dataIndex, dataType);\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n params.marker = markupStyleCreator.makeTooltipMarker('item', convertToColorString(params.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType));\n var orderMode = tooltipModel.get('order');\n var valueFormatter = tooltipModel.get('valueFormatter');\n var frag = seriesTooltipResult.frag;\n var markupText = frag ? buildTooltipMarkup(valueFormatter ? extend({\n valueFormatter: valueFormatter\n }, frag) : frag, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.text;\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator);\n });\n // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n };\n TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) {\n var isHTMLRenderMode = this._renderMode === 'html';\n var ecData = getECData(el);\n var tooltipConfig = ecData.tooltipConfig;\n var tooltipOpt = tooltipConfig.option || {};\n var encodeHTMLContent = tooltipOpt.encodeHTMLContent;\n if (isString(tooltipOpt)) {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n // when `tooltipConfig.option` is a string rather than an object,\n // we can't know if the content needs to be encoded\n // for the sake of security, encode it by default.\n encodeHTMLContent = true;\n }\n if (encodeHTMLContent && isHTMLRenderMode && tooltipOpt.content) {\n // clone might be unnecessary?\n tooltipOpt = clone(tooltipOpt);\n tooltipOpt.content = encodeHTML(tooltipOpt.content);\n }\n var tooltipModelCascade = [tooltipOpt];\n var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex);\n if (cmpt) {\n tooltipModelCascade.push(cmpt);\n }\n // In most cases, component tooltip formatter has different params with series tooltip formatter,\n // so that they cannot share the same formatter. Since the global tooltip formatter is used for series\n // by convention, we do not use it as the default formatter for component.\n tooltipModelCascade.push({\n formatter: tooltipOpt.content\n });\n var positionDefault = e.positionDefault;\n var subTooltipModel = buildTooltipModel(tooltipModelCascade, this._tooltipModel, positionDefault ? {\n position: positionDefault\n } : null);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random() + '';\n // PENDING: this case do not support richText style yet.\n var markupStyleCreator = new TooltipMarkupStyleCreator();\n // Do not check whether `trigger` is 'none' here, because `trigger`\n // only works on coordinate system. In fact, we have not found case\n // that requires setting `trigger` nothing on component yet.\n this._showOrMove(subTooltipModel, function () {\n // Use formatterParams from element defined in component\n // Avoid users modify it.\n var formatterParams = clone(subTooltipModel.get('formatterParams') || {});\n this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator);\n });\n // If not dispatch showTip, tip may be hide triggered by axis.\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n };\n TooltipView.prototype._showTooltipContent = function (\n // Use Model<TooltipOption> insteadof TooltipModel because this model may be from series or other options.\n // Instead of top level tooltip.\n tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markupStyleCreator) {\n // Reset ticket\n this._ticket = '';\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n var tooltipContent = this._tooltipContent;\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor'));\n var nearPointColor = nearPoint.color;\n if (formatter) {\n if (isString(formatter)) {\n var useUTC = tooltipModel.ecModel.get('useUTC');\n var params0 = isArray(params) ? params[0] : params;\n var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;\n html = formatter;\n if (isTimeAxis) {\n html = timeFormat(params0.axisValue, html, useUTC);\n }\n html = formatTpl(html, params, true);\n } else if (isFunction(formatter)) {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n } else {\n html = formatter;\n }\n }\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n tooltipContent.show(tooltipModel, nearPointColor);\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n };\n TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) {\n if (trigger === 'axis' || isArray(tooltipDataParams)) {\n return {\n color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none')\n };\n }\n if (!isArray(tooltipDataParams)) {\n return {\n color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor\n };\n }\n };\n TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x,\n // Mouse x\n y,\n // Mouse y\n content, params, el) {\n var viewWidth = this._api.getWidth();\n var viewHeight = this._api.getHeight();\n positionExpr = positionExpr || tooltipModel.get('position');\n var contentSize = content.getSize();\n var align = tooltipModel.get('align');\n var vAlign = tooltipModel.get('verticalAlign');\n var rect = el && el.getBoundingRect().clone();\n el && rect.applyTransform(el.transform);\n if (isFunction(positionExpr)) {\n // Callback of position can be an array or a string specify the position\n positionExpr = positionExpr([x, y], params, content.el, rect, {\n viewSize: [viewWidth, viewHeight],\n contentSize: contentSize.slice()\n });\n }\n if (isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (isObject(positionExpr)) {\n var boxLayoutPosition = positionExpr;\n boxLayoutPosition.width = contentSize[0];\n boxLayoutPosition.height = contentSize[1];\n var layoutRect = getLayoutRect(boxLayoutPosition, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null;\n // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n vAlign = null;\n }\n // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (isString(positionExpr) && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize, tooltipModel.get('borderWidth'));\n x = pos[0];\n y = pos[1];\n } else {\n var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20);\n x = pos[0];\n y = pos[1];\n }\n align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0);\n vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0);\n if (shouldTooltipConfine(tooltipModel)) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n content.moveTo(x, y);\n };\n // FIXME\n // Should we remove this but leave this to user?\n TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys, cbParamsList) {\n var lastCoordSys = this._lastDataByCoordSys;\n var lastCbParamsList = this._cbParamsList;\n var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length;\n contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {\n var lastDataByAxis = lastItemCoordSys.dataByAxis || [];\n var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};\n var thisDataByAxis = thisItemCoordSys.dataByAxis || [];\n contentNotChanged = contentNotChanged && lastDataByAxis.length === thisDataByAxis.length;\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n contentNotChanged = contentNotChanged && lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length;\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged = contentNotChanged && lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n // check is cbParams data value changed\n lastCbParamsList && each(lastItem.seriesDataIndices, function (idxItem) {\n var seriesIdx = idxItem.seriesIndex;\n var cbParams = cbParamsList[seriesIdx];\n var lastCbParams = lastCbParamsList[seriesIdx];\n if (cbParams && lastCbParams && lastCbParams.data !== cbParams.data) {\n contentNotChanged = false;\n }\n });\n });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n this._cbParamsList = cbParamsList;\n return !!contentNotChanged;\n };\n TooltipView.prototype._hide = function (dispatchAction) {\n // Do not directly hideLater here, because this behavior may be prevented\n // in dispatchAction when showTip is dispatched.\n // FIXME\n // duplicated hideTip if manuallyHideTip is called from dispatchAction.\n this._lastDataByCoordSys = null;\n dispatchAction({\n type: 'hideTip',\n from: this.uid\n });\n };\n TooltipView.prototype.dispose = function (ecModel, api) {\n if (env.node || !api.getDom()) {\n return;\n }\n clear(this, '_updatePosition');\n this._tooltipContent.dispose();\n globalListener.unregister('itemTooltip', api);\n };\n TooltipView.type = 'tooltip';\n return TooltipView;\n}(ComponentView);\n/**\r\n * From top to bottom. (the last one should be globalTooltipModel);\r\n */\nfunction buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {\n // Last is always tooltip model.\n var ecModel = globalTooltipModel.ecModel;\n var resultModel;\n if (defaultTooltipOption) {\n resultModel = new Model(defaultTooltipOption, ecModel, ecModel);\n resultModel = new Model(globalTooltipModel.option, resultModel, ecModel);\n } else {\n resultModel = globalTooltipModel;\n }\n for (var i = modelCascade.length - 1; i >= 0; i--) {\n var tooltipOpt = modelCascade[i];\n if (tooltipOpt) {\n if (tooltipOpt instanceof Model) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n }\n // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n if (isString(tooltipOpt)) {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n if (tooltipOpt) {\n resultModel = new Model(tooltipOpt, resultModel, ecModel);\n }\n }\n }\n return resultModel;\n}\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || bind(api.dispatchAction, api);\n}\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n if (gapH != null) {\n // Add extra 2 pixels for this case:\n // At present the \"values\" in default tooltip are using CSS `float: right`.\n // When the right edge of the tooltip box is on the right side of the\n // viewport, the `float` layout might push the \"values\" to the second line.\n if (x + width + gapH + 2 > viewWidth) {\n x -= width + gapH;\n } else {\n x += gapH;\n }\n }\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n return [x, y];\n}\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getSize();\n var width = size[0];\n var height = size[1];\n x = Math.min(x + width, viewWidth) - width;\n y = Math.min(y + height, viewHeight) - height;\n x = Math.max(x, 0);\n y = Math.max(y, 0);\n return [x, y];\n}\nfunction calcTooltipPosition(position, rect, contentSize, borderWidth) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var offset = Math.ceil(Math.SQRT2 * borderWidth) + 8;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - offset;\n break;\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + offset;\n break;\n case 'left':\n x = rect.x - domWidth - offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'right':\n x = rect.x + rectWidth + offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n return [x, y];\n}\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n/**\r\n * Find target component by payload like:\r\n * ```js\r\n * { legendId: 'some_id', name: 'xxx' }\r\n * { toolboxIndex: 1, name: 'xxx' }\r\n * { geoName: 'some_name', name: 'xxx' }\r\n * ```\r\n * PENDING: at present only\r\n *\r\n * If not found, return null/undefined.\r\n */\nfunction findComponentReference(payload, ecModel, api) {\n var queryOptionMap = preParseFinder(payload).queryOptionMap;\n var componentMainType = queryOptionMap.keys()[0];\n if (!componentMainType || componentMainType === 'series') {\n return;\n }\n var queryResult = queryReferringComponents(ecModel, componentMainType, queryOptionMap.get(componentMainType), {\n useDefault: false,\n enableAll: false,\n enableNone: false\n });\n var model = queryResult.models[0];\n if (!model) {\n return;\n }\n var view = api.getViewOfComponentModel(model);\n var el;\n view.group.traverse(function (subEl) {\n var tooltipConfig = getECData(subEl).tooltipConfig;\n if (tooltipConfig && tooltipConfig.name === payload.name) {\n el = subEl;\n return true; // stop\n }\n });\n if (el) {\n return {\n componentMainType: componentMainType,\n componentIndex: model.componentIndex,\n el: el\n };\n }\n}\nexport default TooltipView;"],"mappings":";AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,0BAA0B;AACnH,OAAOC,GAAG,MAAM,yBAAyB;AACzC,OAAOC,kBAAkB,MAAM,yBAAyB;AACxD,OAAOC,kBAAkB,MAAM,yBAAyB;AACxD,SAASC,oBAAoB,EAAEC,UAAU,EAAEC,SAAS,QAAQ,sBAAsB;AAClF,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,OAAOC,mBAAmB,MAAM,uCAAuC;AACvE,SAASC,aAAa,QAAQ,sBAAsB;AACpD,OAAOC,KAAK,MAAM,sBAAsB;AACxC,OAAO,KAAKC,cAAc,MAAM,kCAAkC;AAClE,OAAO,KAAKC,UAAU,MAAM,2BAA2B;AACvD,OAAO,K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