{"version":3,"sources":["webpack:///./node_modules/echarts/lib/component/tooltip/seriesFormatTooltip.js","webpack:///./node_modules/echarts/lib/component/helper/roamHelper.js","webpack:///./node_modules/echarts/lib/component/helper/cursorHelper.js","webpack:///./node_modules/echarts/lib/component/helper/interactionMutex.js","webpack:///./node_modules/echarts/lib/component/helper/RoamController.js","webpack:///./node_modules/echarts/lib/component/tooltip/tooltipMarkup.js","webpack:///./node_modules/echarts/lib/component/title/install.js","webpack:///./node_modules/echarts/lib/component/legend/LegendModel.js","webpack:///./node_modules/echarts/lib/component/legend/LegendView.js","webpack:///./node_modules/echarts/lib/component/helper/listComponent.js","webpack:///./node_modules/echarts/lib/component/legend/legendFilter.js","webpack:///./node_modules/echarts/lib/component/legend/legendAction.js","webpack:///./node_modules/echarts/lib/component/legend/installLegendPlain.js","webpack:///./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","webpack:///./node_modules/echarts/lib/component/legend/ScrollableLegendView.js","webpack:///./node_modules/echarts/lib/component/legend/installLegendScroll.js","webpack:///./node_modules/echarts/lib/component/legend/scrollableLegendAction.js","webpack:///./node_modules/echarts/lib/component/legend/install.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipModel.js","webpack:///./node_modules/echarts/lib/component/tooltip/helper.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipHTMLContent.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipRichContent.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipView.js","webpack:///./node_modules/echarts/lib/component/tooltip/install.js","webpack:///./node_modules/echarts/lib/component/grid/installSimple.js","webpack:///./node_modules/echarts/lib/component/grid/install.js"],"names":["defaultSeriesFormatTooltip","opt","inlineValue","inlineValueType","subBlocks","sortParam","series","dataIndex","multipleSeries","data","getData","tooltipDims","mapDimensionsAll","tooltipDimLen","length","value","getRawValue","isValueArr","markerColor","formatArrResult","colorStr","isValueMultipleLine","val","idx","dimItem","getDimensionInfo","tooltip","displayName","inlineValues","inlineValueTypes","blocks","setEachItem","dim","dimInfo","otherDims","push","markerType","name","valueType","type","formatTooltipArrayValue","seriesNameSpecified","seriesName","itemName","getName","inlineName","header","noHeader","noName","concat","updateViewOnPan","controllerHost","dx","dy","target","x","y","dirty","updateViewOnZoom","zoomDelta","zoomX","zoomY","zoomLimit","newZoom","zoom","zoomMin","min","zoomMax","max","Infinity","Math","zoomScale","scaleX","scaleY","IRRELEVANT_EXCLUDES","onIrrelevantElement","e","api","targetCoordSysModel","model","getComponentByElement","topTarget","coordSys","coordinateSystem","hasOwnProperty","mainType","ATTR","isTaken","zr","resourceKey","getStore","echarts","event","update","_super","RoamController","_this","call","this","_zr","mousedownHandler","_mousedownHandler","mousemoveHandler","_mousemoveHandler","mouseupHandler","_mouseupHandler","mousewheelHandler","_mousewheelHandler","pinchHandler","_pinchHandler","enable","controlType","disable","_opt","zoomOnMouseWheel","moveOnMouseMove","moveOnMouseWheel","preventDefaultMouseMove","on","off","prototype","isDragging","_dragging","isPinching","_pinching","setPointerChecker","pointerChecker","dispose","draggable","offsetX","offsetY","_x","_y","isAvailableBehavior","gestureEvent","oldX","oldY","trigger","newX","newY","shouldZoom","shouldMove","wheelDelta","absWheelDeltaDelta","abs","originX","originY","factor","checkPointerAndTrigger","scale","absDelta","scrollDelta","pinchScale","pinchX","pinchY","Eventful","controller","eventName","behaviorToCheck","contollerEvent","settings","setting","TOOLTIP_LINE_HEIGHT_CSS","getTooltipTextStyle","textStyle","renderMode","nameFontColor","color","nameFontSize","fontSize","nameFontWeight","fontWeight","valueFontColor","valueFontSize","valueFontWeight","nameStyle","valueStyle","fill","HTML_GAPS","RICH_TEXT_GAPS","createTooltipMarkup","option","getBuilder","fragment","builderMap","section","planLayout","subBlockLen","thisBlockHasInnerGap","thisGapLevelBetweenSubBlocks","subBlock","subGapLevel","__gapLevelBetweenSubBlocks","build","ctx","topMarginForOuterGap","toolTipTextStyle","gaps","getGap","subMarkupText","tooltipTextStyle","subMarkupTextList","orderMode","sortBlocks","slice","orderMap","valueAsc","valueDesc","comparator_1","sort","a","b","evaluate","reverse","html","join","richText","wrapBlockHTML","buildSubBlocks","displayableHeader","useUTC","wrapInlineNameRichText","nameValue","noValue","noMarker","markerStr","markupStyleCreator","makeTooltipMarker","readableName","valueTypeOption","readableValueList","valueAlignRight","valueCloseToMarker","_a","valueList","alignRight","style","styles","paddingLeft","padding","align","wrapRichTextStyle","wrapInlineValueRichText","leftHasMarker","wrapInlineNameHTML","paddingStr","wrapInlineValueHTML","buildTooltipMarkup","builder","gapLevelBetweenSubBlocks","encodedContent","topGap","retrieveVisualColorForTooltipMarker","getItemVisual","visualDrawType","getPaddingFromTooltipModel","get","TooltipMarkupStyleCreator","richTextStyles","_nextStyleNameId","_generateStyleName","markerId","marker","content","text","finalStl","stl","styleName","TitleModel","apply","arguments","layoutMode","ignoreSize","defaultOption","zlevel","z","show","subtext","subtarget","left","top","backgroundColor","borderColor","borderWidth","itemGap","subtextStyle","TitleView","render","titleModel","ecModel","group","removeAll","textStyleModel","getModel","subtextStyleModel","textAlign","textVerticalAlign","textEl","getTextColor","disableBox","z2","textRect","getBoundingRect","subText","subTextEl","height","verticalAlign","link","sublink","triggerEvent","silent","eventData","componentType","componentIndex","add","groupRect","layoutOption","getBoxLayoutParams","width","layoutRect","getWidth","getHeight","markRedraw","alignStyle","setStyle","margin","getItemStyle","rect","shape","r","subPixelOptimize","install","registers","registerComponentModel","registerComponentView","LegendModel","init","parentModel","mergeDefaultAndTheme","selected","_updateSelector","mergeOption","selector","item","index","title","getLocale","getDefaultSelectorOptions","optionUpdated","_updateData","legendData","_data","hasSelected","i","name_1","isSelected","select","potentialData","availableNames","eachRawSeries","seriesModel","isPotential","legendVisualProvider","names","getAllNames","isSeriesFiltered","_availableNames","rawData","dataItem","Model","unSelect","toggleSelected","allSelect","inverseSelect","getOrient","dependencies","orient","borderRadius","itemWidth","itemHeight","symbolSize","inactiveColor","inactiveBorderColor","inactiveBorderWidth","itemStyle","opacity","decal","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","borderCap","borderJoin","borderDashOffset","borderMiterLimit","lineStyle","inactiveWidth","cap","dashOffset","miterLimit","selectedMode","selectorLabel","fontFamily","emphasis","selectorPosition","selectorItemGap","selectorButtonGap","Component","curry","each","dispatchSelectAction","dataName","excludeSeriesId","dispatchDownplayAction","dispatchAction","dispatchHighlightAction","isUseHoverLayer","emphasisState","list","getZr","storage","getDisplayList","len","states","hoverLayer","LegendView","newlineDisabled","_contentGroup","_selectorGroup","_isFirstRender","getContentGroup","getSelectorGroup","legendModel","isFirstRender","resetInner","itemAlign","renderInner","positionInfo","viewportSize","maxSize","layout","mainRect","layoutInner","_backgroundEl","componentModel","format","makeBackground","remove","contentGroup","legendDrawnMap","selectMode","id","legendItemModel","g","newline","getSeriesByName","lineVisualStyle","getVisual","symbolType","_createItem","set","provider","containName","indexOfName","colorArr","_createSelector","selectorGroup","selectorItem","labelText","onclick","labelModel","emphasisLabelModel","normal","defaultText","itemModel","itemVisualStyle","drawType","symbolKeepAspect","legendIconType","legendLineStyle","itemProperties","propName","visualName","getShallow","stroke","startsWith","lineWidth","legendLineModel","lineProperties","visualHasBorder","indexOf","getLegendStyle","itemGroup","getLegendIcon","symboType","symbol","getDefaultLegendIcon","textX","formatter","replace","hitRect","invisible","tooltipModel","graphic","el","itemTooltipOption","eachChild","child","__legendDataIndex","contentRect","contentPos","selectorRect","selectorPos","orientIdx","wh","hw","yx","legendFilter","legendModels","findComponents","filterSeries","legendSelectActionHandler","methodName","payload","selectedMap","isToggleSelect","eachComponent","isItemSelected","registerProcessor","PRIORITY","PROCESSOR","SERIES_FILTER","registerSubTypeDefaulter","registerAction","installLegendAction","mergeAndNormalizeLayoutParams","raw","ScrollableLegendModel","setScrollDataIndex","scrollDataIndex","inputPositionParams","pageButtonItemGap","pageButtonGap","pageButtonPosition","pageFormatter","pageIcons","horizontal","vertical","pageIconColor","pageIconInactiveColor","pageIconSize","pageTextStyle","animationDurationUpdate","WH","XY","ScrollableLegendView","_currentIndex","_containerGroup","_controllerGroup","removeClipPath","__rectSize","self","controllerGroup","pageIconSizeArr","createPageButton","pageTextStyleModel","iconIdx","pageDataIndexName","icon","_pageGo","font","getFont","xy","processMaxSize","_layoutContentAndController","offset","containerGroup","controllerRect","showController","_showController","containerPos","controllerPos","setPosition","clipShape","setClipPath","attr","pageInfo","_getPageInfo","pageIndex","contentPosition","_updatePageInfoView","to","legendId","canJump","childOfName","cursor","pageText","current","total","pageCount","containerRectSize","targetItemIndex","_findTargetItemIndex","children","targetItem","itemCount","pCount","result","pagePrevDataIndex","pageNextDataIndex","targetItemInfo","getItemInfo","s","winStartItemInfo","winEndItemInfo","currItemInfo","intersect","itemRect","start","itemInfo","winStart","targetDataIndex","legendDataIdx","defaultIndex","subType","query","installScrollableLegendAction","TooltipModel","showContent","triggerOn","alwaysShowContent","displayMode","confine","showDelay","hideDelay","transitionDuration","enterable","extraCssText","axisPointer","axis","animation","animationEasingUpdate","crossStyle","shouldTooltipConfine","confineOption","testStyle","styleProps","env","domSupported","document","documentElement","TRANSFORM_VENDOR","TRANSITION_VENDOR","toCSSVendorPrefix","styleVendor","styleProp","toLowerCase","getComputedStyle","currentStyle","defaultView","CSS_TRANSITION_VENDOR","CSS_TRANSFORM_VENDOR","gCssText","transform3dSupported","assembleTransform","toString","x0","toFixed","y0","transformSupported","is3d","translate","assembleCssText","enableTransition","onlyFade","cssText","boxShadow","duration","transitionOption","transitionText","assembleTransition","canvasSupported","borderName","camelCase","round","assembleFont","makeStyleCoord","out","appendToBody","zrX","zrY","zrPainter","painter","zrViewportRoot","getViewportRoot","body","viewportRootOffset","getViewportRootOffset","offsetLeft","offsetTop","TooltipHTMLContent","container","_show","_styleCoord","_enterable","_firstShow","_longHide","wxa","createElement","domBelongToZr","_appendToBody","appendChild","_container","onmouseenter","clearTimeout","_hideTimeout","_inContent","onmousemove","window","handler","dispatch","onmouseleave","hideLater","_hideDelay","position","domStyle","_moveIfResized","className","nearPointColor","_longHideTimeout","styleCoord","innerHTML","display","setContent","markers","arrowPosition","pos","arrowPos","positionStyle","transformStyle","borderStyle","assembleArrow","parentNode","setEnterable","getSize","clientWidth","clientHeight","moveTo","style_1","transforms","transform","ratioX","ratioY","hide","visibility","willChange","setTimeout","time","isShow","removeChild","getOuterSize","parseInt","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","mathMaxWith0","calcShadowOuterSize","right","bottom","TooltipRichContent","rich","lineHeight","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","bounding","shadowOuterSize","size","bind","parsePercent","number","proxyRect","buildTooltipModel","modelCascade","globalTooltipModel","defaultTooltipOption","resultModel","tooltipOpt","makeDispatchAction","isCenterAlign","TooltipView","node","getComponent","_renderMode","_tooltipContent","getDom","_tooltipModel","_ecModel","_api","_alwaysShowContent","tooltipContent","_initGlobalListener","_keepShow","globalListener","currTrigger","_tryShow","_hide","_lastX","_lastY","self_1","_refreshUpdateTimeout","isDisposed","manuallyShowTip","dataByCoordSys","_lastDataByCoordSys","from","uid","_ticket","cmptRef","queryOptionMap","componentMainType","keys","useDefault","enableAll","enableNone","models","getViewOfComponentModel","traverse","subEl","tooltipConfig","findComponentReference","clone","applyTransform","positionDefault","tooltipOption","seriesIndex","_manuallyAxisShowTip","pointInfo","findPointFromSeries","cx","point","cy","findHover","manuallyHideTip","coordSysAxesInfo","getSeriesByIndex","getItemModel","_showAxisTooltip","seriesDispatcher_1","cmptDispatcher_1","_showSeriesItemTooltip","_showComponentItemTooltip","_showOrMove","cb","delay","_showTimout","singleTooltipModel","cbParamsList","articleMarkup","markupTextArrLegacy","itemCoordSys","dataByAxis","axisItem","axisModel","axisDim","axisIndex","axisValue","axisValueLabel","seriesDataIndices","valueLabelOpt","axisSectionMarkup","idxItem","dataIndexInside","cbParams","getDataParams","axisType","axisId","axisHelper","seriesTooltipResult","formatTooltip","markupFragment","markupText","positionExpr","builtMarkupText","unshift","blockBreak","allMarkupText","_updateContentNotChangedOnAxis","_updatePosition","_showTooltipContent","random","dispatcher","ecData","dataModel","dataType","tooltipTrigger","params","asyncTicket","getRawIndex","tooltipModelCascade","cmpt","subTooltipModel","defaultHtml","formatterParams","_getNearestPoint","params0","callback","cbTicket","tooltipDataParams","viewWidth","viewHeight","contentSize","vAlign","viewSize","boxLayoutPosition","domWidth","domHeight","rectWidth","rectHeight","calcTooltipPosition","gapH","gapV","refixTooltipPosition","confineTooltipPosition","lastCoordSys","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisDataByAxis","lastItem","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","j","newIdxItem","GridView","gridModel","Rect","getRect","extraOption","GridModel","registerCoordinateSystem","Grid","axisModelCreator","registerPreprocessor","xAxis","yAxis","grid"],"mappings":"gKA+CO,SAASA,EAA2BC,GACzC,IAUIC,EACAC,EACAC,EACAC,EAbAC,EAASL,EAAIK,OACbC,EAAYN,EAAIM,UAChBC,EAAiBP,EAAIO,eACrBC,KAAOH,EAAOI,UACdC,EAAcF,KAAKG,iBAAiB,oBACpCC,EAAgBF,EAAYG,OAC5BC,EAAQT,EAAOU,YAAYT,GAC3BU,EAAa,YAAQF,GACrBG,EAAc,YAAoCZ,EAAQC,GAO9D,GAAIM,EAAgB,GAAKI,IAAeJ,EAAe,CACrD,IAAIM,EAwCR,SAAiCJ,EAAOT,EAAQC,EAAWI,EAAaS,GAEtE,IAAIX,KAAOH,EAAOI,UACdW,EAAsB,YAAON,GAAO,SAAUM,EAAqBC,EAAKC,GAC1E,IAAIC,EAAUf,KAAKgB,iBAAiBF,GACpC,OAA6BF,GAAuBG,IAA+B,IAApBA,EAAQE,SAA4C,MAAvBF,EAAQG,eACnG,GACCC,EAAe,GACfC,EAAmB,GACnBC,EAAS,GAMb,SAASC,EAAYT,EAAKU,GACxB,IAAIC,EAAUxB,KAAKgB,iBAAiBO,GAE/BC,IAAyC,IAA9BA,EAAQC,UAAUR,UAI9BL,EACFS,EAAOK,KAAK,YAAoB,YAAa,CAC3CC,WAAY,UACZl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sB,KAChCF,EAAUymB,sBAAqB,SAAUhwB,QAEnCA,OAAOiwB,OAASjwB,OAAOkwB,QAAUlwB,OAAOmwB,OAC1CnwB,OAAOmwB,KAAO,O,sBCtDb,SAAS,EAAQ5mB,GACtB,YAAID,GACJ,YAAI,K","file":"vendors~app~788458c0.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\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*/\nimport { trim, isArray, each, reduce } from 'zrender/lib/core/util';\nimport { retrieveVisualColorForTooltipMarker, createTooltipMarkup } from './tooltipMarkup';\nimport { retrieveRawValue } from '../../data/helper/dataProvider';\nimport { isNameSpecified } from '../../util/model';\nexport function defaultSeriesFormatTooltip(opt) {\n var series = opt.series;\n var dataIndex = opt.dataIndex;\n var multipleSeries = opt.multipleSeries;\n var data = series.getData();\n var tooltipDims = data.mapDimensionsAll('defaultedTooltip');\n var tooltipDimLen = tooltipDims.length;\n var value = series.getRawValue(dataIndex);\n var isValueArr = isArray(value);\n var markerColor = retrieveVisualColorForTooltipMarker(series, dataIndex); // Complicated rule for pretty tooltip.\n\n var inlineValue;\n var inlineValueType;\n var subBlocks;\n var sortParam;\n\n if (tooltipDimLen > 1 || isValueArr && !tooltipDimLen) {\n var formatArrResult = formatTooltipArrayValue(value, series, dataIndex, tooltipDims, markerColor);\n inlineValue = formatArrResult.inlineValues;\n inlineValueType = formatArrResult.inlineValueTypes;\n subBlocks = formatArrResult.blocks; // Only support tooltip sort by the first inline value. It's enough in most cases.\n\n sortParam = formatArrResult.inlineValues[0];\n } else if (tooltipDimLen) {\n var dimInfo = data.getDimensionInfo(tooltipDims[0]);\n sortParam = inlineValue = retrieveRawValue(data, dataIndex, tooltipDims[0]);\n inlineValueType = dimInfo.type;\n } else {\n sortParam = inlineValue = isValueArr ? value[0] : value;\n } // Do not show generated series name. It might not be readable.\n\n\n var seriesNameSpecified = isNameSpecified(series);\n var seriesName = seriesNameSpecified && series.name || '';\n var itemName = data.getName(dataIndex);\n var inlineName = multipleSeries ? seriesName : itemName;\n return createTooltipMarkup('section', {\n header: seriesName,\n // When series name not specified, do not show a header line with only '-'.\n // This case alway happen in tooltip.trigger: 'item'.\n noHeader: multipleSeries || !seriesNameSpecified,\n sortParam: sortParam,\n blocks: [createTooltipMarkup('nameValue', {\n markerType: 'item',\n markerColor: markerColor,\n // Do not mix display seriesName and itemName in one tooltip,\n // which might confuses users.\n name: inlineName,\n // name dimension might be auto assigned, where the name might\n // be not readable. So we check trim here.\n noName: !trim(inlineName),\n value: inlineValue,\n valueType: inlineValueType\n })].concat(subBlocks || [])\n });\n}\n\nfunction formatTooltipArrayValue(value, series, dataIndex, tooltipDims, colorStr) {\n // check: category-no-encode-has-axis-data in dataset.html\n var data = series.getData();\n var isValueMultipleLine = reduce(value, function (isValueMultipleLine, val, idx) {\n var dimItem = data.getDimensionInfo(idx);\n return isValueMultipleLine = isValueMultipleLine || dimItem && dimItem.tooltip !== false && dimItem.displayName != null;\n }, false);\n var inlineValues = [];\n var inlineValueTypes = [];\n var blocks = [];\n tooltipDims.length ? each(tooltipDims, function (dim) {\n setEachItem(retrieveRawValue(data, dataIndex, dim), dim);\n }) // By default, all dims is used on tooltip.\n : each(value, setEachItem);\n\n function setEachItem(val, dim) {\n var dimInfo = data.getDimensionInfo(dim); // If `dimInfo.tooltip` is not set, show tooltip.\n\n if (!dimInfo || dimInfo.otherDims.tooltip === false) {\n return;\n }\n\n if (isValueMultipleLine) {\n blocks.push(createTooltipMarkup('nameValue', {\n markerType: 'subItem',\n markerColor: colorStr,\n name: dimInfo.displayName,\n value: val,\n valueType: dimInfo.type\n }));\n } else {\n inlineValues.push(val);\n inlineValueTypes.push(dimInfo.type);\n }\n }\n\n return {\n inlineValues: inlineValues,\n inlineValueTypes: inlineValueTypes,\n blocks: blocks\n };\n}","\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\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 * For geo and graph.\n */\nexport function updateViewOnPan(controllerHost, dx, dy) {\n var target = controllerHost.target;\n target.x += dx;\n target.y += dy;\n target.dirty();\n}\n/**\n * For geo and graph.\n */\n\nexport function updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {\n var target = controllerHost.target;\n var zoomLimit = controllerHost.zoomLimit;\n var newZoom = controllerHost.zoom = controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n\n var zoomScale = newZoom / controllerHost.zoom;\n controllerHost.zoom = newZoom; // Keep the mouse center when scaling\n\n target.x -= (zoomX - target.x) * (zoomScale - 1);\n target.y -= (zoomY - target.y) * (zoomScale - 1);\n target.scaleX *= zoomScale;\n target.scaleY *= zoomScale;\n target.dirty();\n}","\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\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*/\nvar IRRELEVANT_EXCLUDES = {\n 'axisPointer': 1,\n 'tooltip': 1,\n 'brush': 1\n};\n/**\n * Avoid that: mouse click on a elements that is over geo or graph,\n * but roam is triggered.\n */\n\nexport function onIrrelevantElement(e, api, targetCoordSysModel) {\n var model = api.getComponentByElement(e.topTarget); // If model is axisModel, it works only if it is injected with coordinateSystem.\n\n var coordSys = model && model.coordinateSystem;\n return model && model !== targetCoordSysModel && !IRRELEVANT_EXCLUDES.hasOwnProperty(model.mainType) && coordSys && coordSys.model !== targetCoordSysModel;\n}","\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\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// @ts-nocheck\nimport * as echarts from '../../core/echarts';\nvar ATTR = '\\0_ec_interaction_mutex';\nexport function take(zr, resourceKey, userKey) {\n var store = getStore(zr);\n store[resourceKey] = userKey;\n}\nexport function release(zr, resourceKey, userKey) {\n var store = getStore(zr);\n var uKey = store[resourceKey];\n\n if (uKey === userKey) {\n store[resourceKey] = null;\n }\n}\nexport function isTaken(zr, resourceKey) {\n return !!getStore(zr)[resourceKey];\n}\n\nfunction getStore(zr) {\n return zr[ATTR] || (zr[ATTR] = {});\n}\n/**\n * payload: {\n * type: 'takeGlobalCursor',\n * key: 'dataZoomSelect', or 'brush', or ...,\n * If no userKey, release global cursor.\n * }\n */\n// TODO: SELF REGISTERED.\n\n\necharts.registerAction({\n type: 'takeGlobalCursor',\n event: 'globalCursorTaken',\n update: 'update'\n}, function () {});","\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\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*/\nimport { __extends } from \"tslib\";\nimport Eventful from 'zrender/lib/core/Eventful';\nimport * as eventTool from 'zrender/lib/core/event';\nimport * as interactionMutex from './interactionMutex';\nimport { isString, bind, defaults, clone } from 'zrender/lib/core/util';\n\nvar RoamController =\n/** @class */\nfunction (_super) {\n __extends(RoamController, _super);\n\n function RoamController(zr) {\n var _this = _super.call(this) || this;\n\n _this._zr = zr; // Avoid two roamController bind the same handler\n\n var mousedownHandler = bind(_this._mousedownHandler, _this);\n var mousemoveHandler = bind(_this._mousemoveHandler, _this);\n var mouseupHandler = bind(_this._mouseupHandler, _this);\n var mousewheelHandler = bind(_this._mousewheelHandler, _this);\n var pinchHandler = bind(_this._pinchHandler, _this);\n /**\n * Notice: only enable needed types. For example, if 'zoom'\n * is not needed, 'zoom' should not be enabled, otherwise\n * default mousewheel behaviour (scroll page) will be disabled.\n */\n\n _this.enable = function (controlType, opt) {\n // Disable previous first\n this.disable();\n this._opt = defaults(clone(opt) || {}, {\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n // By default, wheel do not trigger move.\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true\n });\n\n if (controlType == null) {\n controlType = true;\n }\n\n if (controlType === true || controlType === 'move' || controlType === 'pan') {\n zr.on('mousedown', mousedownHandler);\n zr.on('mousemove', mousemoveHandler);\n zr.on('mouseup', mouseupHandler);\n }\n\n if (controlType === true || controlType === 'scale' || controlType === 'zoom') {\n zr.on('mousewheel', mousewheelHandler);\n zr.on('pinch', pinchHandler);\n }\n };\n\n _this.disable = function () {\n zr.off('mousedown', mousedownHandler);\n zr.off('mousemove', mousemoveHandler);\n zr.off('mouseup', mouseupHandler);\n zr.off('mousewheel', mousewheelHandler);\n zr.off('pinch', pinchHandler);\n };\n\n return _this;\n }\n\n RoamController.prototype.isDragging = function () {\n return this._dragging;\n };\n\n RoamController.prototype.isPinching = function () {\n return this._pinching;\n };\n\n RoamController.prototype.setPointerChecker = function (pointerChecker) {\n this.pointerChecker = pointerChecker;\n };\n\n RoamController.prototype.dispose = function () {\n this.disable();\n };\n\n RoamController.prototype._mousedownHandler = function (e) {\n if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e) || e.target && e.target.draggable) {\n return;\n }\n\n var x = e.offsetX;\n var y = e.offsetY; // Only check on mosedown, but not mousemove.\n // Mouse can be out of target when mouse moving.\n\n if (this.pointerChecker && this.pointerChecker(e, x, y)) {\n this._x = x;\n this._y = y;\n this._dragging = true;\n }\n };\n\n RoamController.prototype._mousemoveHandler = function (e) {\n if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt) || e.gestureEvent === 'pinch' || interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n\n var x = e.offsetX;\n var y = e.offsetY;\n var oldX = this._x;\n var oldY = this._y;\n var dx = x - oldX;\n var dy = y - oldY;\n this._x = x;\n this._y = y;\n this._opt.preventDefaultMouseMove && eventTool.stop(e.event);\n trigger(this, 'pan', 'moveOnMouseMove', e, {\n dx: dx,\n dy: dy,\n oldX: oldX,\n oldY: oldY,\n newX: x,\n newY: y,\n isAvailableBehavior: null\n });\n };\n\n RoamController.prototype._mouseupHandler = function (e) {\n if (!eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n this._dragging = false;\n }\n };\n\n RoamController.prototype._mousewheelHandler = function (e) {\n var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt);\n var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt);\n var wheelDelta = e.wheelDelta;\n var absWheelDeltaDelta = Math.abs(wheelDelta);\n var originX = e.offsetX;\n var originY = e.offsetY; // wheelDelta maybe -0 in chrome mac.\n\n if (wheelDelta === 0 || !shouldZoom && !shouldMove) {\n return;\n } // If both `shouldZoom` and `shouldMove` is true, trigger\n // their event both, and the final behavior is determined\n // by event listener themselves.\n\n\n if (shouldZoom) {\n // Convenience:\n // Mac and VM Windows on Mac: scroll up: zoom out.\n // Windows: scroll up: zoom in.\n // FIXME: Should do more test in different environment.\n // wheelDelta is too complicated in difference nvironment\n // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel),\n // although it has been normallized by zrender.\n // wheelDelta of mouse wheel is bigger than touch pad.\n var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1;\n var scale = wheelDelta > 0 ? factor : 1 / factor;\n checkPointerAndTrigger(this, 'zoom', 'zoomOnMouseWheel', e, {\n scale: scale,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n\n if (shouldMove) {\n // FIXME: Should do more test in different environment.\n var absDelta = Math.abs(wheelDelta); // wheelDelta of mouse wheel is bigger than touch pad.\n\n var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05);\n checkPointerAndTrigger(this, 'scrollMove', 'moveOnMouseWheel', e, {\n scrollDelta: scrollDelta,\n originX: originX,\n originY: originY,\n isAvailableBehavior: null\n });\n }\n };\n\n RoamController.prototype._pinchHandler = function (e) {\n if (interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n\n var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1;\n checkPointerAndTrigger(this, 'zoom', null, e, {\n scale: scale,\n originX: e.pinchX,\n originY: e.pinchY,\n isAvailableBehavior: null\n });\n };\n\n return RoamController;\n}(Eventful);\n\nfunction checkPointerAndTrigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n if (controller.pointerChecker && controller.pointerChecker(e, contollerEvent.originX, contollerEvent.originY)) {\n // When mouse is out of roamController rect,\n // default befavoius should not be be disabled, otherwise\n // page sliding is disabled, contrary to expectation.\n eventTool.stop(e.event);\n trigger(controller, eventName, behaviorToCheck, e, contollerEvent);\n }\n}\n\nfunction trigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n // Also provide behavior checker for event listener, for some case that\n // multiple components share one listener.\n contollerEvent.isAvailableBehavior = bind(isAvailableBehavior, null, behaviorToCheck, e);\n controller.trigger(eventName, contollerEvent);\n} // settings: {\n// zoomOnMouseWheel\n// moveOnMouseMove\n// moveOnMouseWheel\n// }\n// The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\n\n\nfunction isAvailableBehavior(behaviorToCheck, e, settings) {\n var setting = settings[behaviorToCheck];\n return !behaviorToCheck || setting && (!isString(setting) || e.event[setting + 'Key']);\n}\n\nexport default RoamController;","\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\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*/\nimport { getTooltipMarker, encodeHTML, makeValueReadable, convertToColorString } from '../../util/format';\nimport { isString, each, hasOwn, isArray, map, assert, extend } from 'zrender/lib/core/util';\nimport { SortOrderComparator } from '../../data/helper/dataValueHelper';\nimport { getRandomIdBase } from '../../util/number';\nvar TOOLTIP_LINE_HEIGHT_CSS = 'line-height:1'; // TODO: more textStyle option\n\nfunction getTooltipTextStyle(textStyle, renderMode) {\n var nameFontColor = textStyle.color || '#6e7079';\n var nameFontSize = textStyle.fontSize || 12;\n var nameFontWeight = textStyle.fontWeight || '400';\n var valueFontColor = textStyle.color || '#464646';\n var valueFontSize = textStyle.fontSize || 14;\n var valueFontWeight = textStyle.fontWeight || '900';\n\n if (renderMode === 'html') {\n // `textStyle` is probably from user input, should be encoded to reduce security risk.\n return {\n // eslint-disable-next-line max-len\n nameStyle: \"font-size:\" + encodeHTML(nameFontSize + '') + \"px;color:\" + encodeHTML(nameFontColor) + \";font-weight:\" + encodeHTML(nameFontWeight + ''),\n // eslint-disable-next-line max-len\n valueStyle: \"font-size:\" + encodeHTML(valueFontSize + '') + \"px;color:\" + encodeHTML(valueFontColor) + \";font-weight:\" + encodeHTML(valueFontWeight + '')\n };\n } else {\n return {\n nameStyle: {\n fontSize: nameFontSize,\n fill: nameFontColor,\n fontWeight: nameFontWeight\n },\n valueStyle: {\n fontSize: valueFontSize,\n fill: valueFontColor,\n fontWeight: valueFontWeight\n }\n };\n }\n} // See `TooltipMarkupLayoutIntent['innerGapLevel']`.\n// (value from UI design)\n\n\nvar HTML_GAPS = [0, 10, 20, 30];\nvar RICH_TEXT_GAPS = ['', '\\n', '\\n\\n', '\\n\\n\\n']; // eslint-disable-next-line max-len\n\nexport function createTooltipMarkup(type, option) {\n option.type = type;\n return option;\n}\n\nfunction getBuilder(fragment) {\n return hasOwn(builderMap, fragment.type) && builderMap[fragment.type];\n}\n\nvar builderMap = {\n /**\n * A `section` block is like:\n * ```\n * header\n * subBlock\n * subBlock\n * ...\n * ```\n */\n section: {\n planLayout: function (fragment) {\n var subBlockLen = fragment.blocks.length;\n var thisBlockHasInnerGap = subBlockLen > 1 || subBlockLen > 0 && !fragment.noHeader;\n var thisGapLevelBetweenSubBlocks = 0;\n each(fragment.blocks, function (subBlock) {\n getBuilder(subBlock).planLayout(subBlock);\n var subGapLevel = subBlock.__gapLevelBetweenSubBlocks; // If the some of the sub-blocks have some gaps (like 10px) inside, this block\n // should use a larger gap (like 20px) to distinguish those sub-blocks.\n\n if (subGapLevel >= thisGapLevelBetweenSubBlocks) {\n thisGapLevelBetweenSubBlocks = subGapLevel + (thisBlockHasInnerGap && ( // 0 always can not be readable gap level.\n !subGapLevel // If no header, always keep the sub gap level. Otherwise\n // look weird in case `multipleSeries`.\n || subBlock.type === 'section' && !subBlock.noHeader) ? 1 : 0);\n }\n });\n fragment.__gapLevelBetweenSubBlocks = thisGapLevelBetweenSubBlocks;\n },\n build: function (ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {\n var noHeader = fragment.noHeader;\n var gaps = getGap(fragment);\n var subMarkupText = buildSubBlocks(ctx, fragment, noHeader ? topMarginForOuterGap : gaps.html, toolTipTextStyle);\n\n if (noHeader) {\n return subMarkupText;\n }\n\n var displayableHeader = makeValueReadable(fragment.header, 'ordinal', ctx.useUTC);\n var nameStyle = getTooltipTextStyle(toolTipTextStyle, ctx.renderMode).nameStyle;\n\n if (ctx.renderMode === 'richText') {\n return wrapInlineNameRichText(ctx, displayableHeader, nameStyle) + gaps.richText + subMarkupText;\n } else {\n return wrapBlockHTML(\"
\" + encodeHTML(displayableHeader) + '
' + subMarkupText, topMarginForOuterGap);\n }\n }\n },\n\n /**\n * A `nameValue` block is like:\n * ```\n * marker name value\n * ```\n */\n nameValue: {\n planLayout: function (fragment) {\n fragment.__gapLevelBetweenSubBlocks = 0;\n },\n build: function (ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {\n var renderMode = ctx.renderMode;\n var noName = fragment.noName;\n var noValue = fragment.noValue;\n var noMarker = !fragment.markerType;\n var name = fragment.name;\n var value = fragment.value;\n var useUTC = ctx.useUTC;\n\n if (noName && noValue) {\n return;\n }\n\n var markerStr = noMarker ? '' : ctx.markupStyleCreator.makeTooltipMarker(fragment.markerType, fragment.markerColor || '#333', renderMode);\n var readableName = noName ? '' : makeValueReadable(name, 'ordinal', useUTC);\n var valueTypeOption = fragment.valueType;\n var readableValueList = noValue ? [] : isArray(value) ? map(value, function (val, idx) {\n return makeValueReadable(val, isArray(valueTypeOption) ? valueTypeOption[idx] : valueTypeOption, useUTC);\n }) : [makeValueReadable(value, isArray(valueTypeOption) ? valueTypeOption[0] : valueTypeOption, useUTC)];\n var valueAlignRight = !noMarker || !noName; // It little weird if only value next to marker but far from marker.\n\n var valueCloseToMarker = !noMarker && noName;\n\n var _a = getTooltipTextStyle(toolTipTextStyle, renderMode),\n nameStyle = _a.nameStyle,\n valueStyle = _a.valueStyle;\n\n return renderMode === 'richText' ? (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameRichText(ctx, readableName, nameStyle)) // Value has commas inside, so use ' ' as delimiter for multiple values.\n + (noValue ? '' : wrapInlineValueRichText(ctx, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML((noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? '' : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap);\n }\n }\n};\n\nfunction buildSubBlocks(ctx, fragment, topMarginForOuterGap, tooltipTextStyle) {\n var subMarkupTextList = [];\n var subBlocks = fragment.blocks || [];\n assert(!subBlocks || isArray(subBlocks));\n subBlocks = subBlocks || [];\n var orderMode = ctx.orderMode;\n\n if (fragment.sortBlocks && orderMode) {\n subBlocks = subBlocks.slice();\n var orderMap = {\n valueAsc: 'asc',\n valueDesc: 'desc'\n };\n\n if (hasOwn(orderMap, orderMode)) {\n var comparator_1 = new SortOrderComparator(orderMap[orderMode], null);\n subBlocks.sort(function (a, b) {\n return comparator_1.evaluate(a.sortParam, b.sortParam);\n });\n } // FIXME 'seriesDesc' necessary?\n else if (orderMode === 'seriesDesc') {\n subBlocks.reverse();\n }\n }\n\n var gaps = getGap(fragment);\n each(subBlocks, function (subBlock, idx) {\n var subMarkupText = getBuilder(subBlock).build(ctx, subBlock, idx > 0 ? gaps.html : 0, tooltipTextStyle);\n subMarkupText != null && subMarkupTextList.push(subMarkupText);\n });\n\n if (!subMarkupTextList.length) {\n return;\n }\n\n return ctx.renderMode === 'richText' ? subMarkupTextList.join(gaps.richText) : wrapBlockHTML(subMarkupTextList.join(''), topMarginForOuterGap);\n}\n/**\n * @return markupText. null/undefined means no content.\n */\n\n\nexport function buildTooltipMarkup(fragment, markupStyleCreator, renderMode, orderMode, useUTC, toolTipTextStyle) {\n if (!fragment) {\n return;\n }\n\n var builder = getBuilder(fragment);\n builder.planLayout(fragment);\n var ctx = {\n useUTC: useUTC,\n renderMode: renderMode,\n orderMode: orderMode,\n markupStyleCreator: markupStyleCreator\n };\n return builder.build(ctx, fragment, 0, toolTipTextStyle);\n}\n\nfunction getGap(fragment) {\n var gapLevelBetweenSubBlocks = fragment.__gapLevelBetweenSubBlocks;\n return {\n html: HTML_GAPS[gapLevelBetweenSubBlocks],\n richText: RICH_TEXT_GAPS[gapLevelBetweenSubBlocks]\n };\n}\n\nfunction wrapBlockHTML(encodedContent, topGap) {\n var clearfix = '
';\n var marginCSS = \"margin: \" + topGap + \"px 0 0\";\n return \"
\" + encodedContent + clearfix + '
';\n}\n\nfunction wrapInlineNameHTML(name, leftHasMarker, style) {\n var marginCss = leftHasMarker ? 'margin-left:2px' : '';\n return \"\" + encodeHTML(name) + '';\n}\n\nfunction wrapInlineValueHTML(valueList, alignRight, valueCloseToMarker, style) {\n // Do not too close to marker, considering there are multiple values separated by spaces.\n var paddingStr = valueCloseToMarker ? '10px' : '20px';\n var alignCSS = alignRight ? \"float:right;margin-left:\" + paddingStr : '';\n return \"\" // Value has commas inside, so use ' ' as delimiter for multiple values.\n + map(valueList, function (value) {\n return encodeHTML(value);\n }).join('  ') + '';\n}\n\nfunction wrapInlineNameRichText(ctx, name, style) {\n return ctx.markupStyleCreator.wrapRichTextStyle(name, style);\n}\n\nfunction wrapInlineValueRichText(ctx, valueList, alignRight, valueCloseToMarker, style) {\n var styles = [style];\n var paddingLeft = valueCloseToMarker ? 10 : 20;\n alignRight && styles.push({\n padding: [0, 0, 0, paddingLeft],\n align: 'right'\n }); // Value has commas inside, so use ' ' as delimiter for multiple values.\n\n return ctx.markupStyleCreator.wrapRichTextStyle(valueList.join(' '), styles);\n}\n\nexport function retrieveVisualColorForTooltipMarker(series, dataIndex) {\n var style = series.getData().getItemVisual(dataIndex, 'style');\n var color = style[series.visualDrawType];\n return convertToColorString(color);\n}\nexport function getPaddingFromTooltipModel(model, renderMode) {\n var padding = model.get('padding');\n return padding != null ? padding // We give slightly different to look pretty.\n : renderMode === 'richText' ? [8, 10] : 10;\n}\n/**\n * The major feature is generate styles for `renderMode: 'richText'`.\n * But it also serves `renderMode: 'html'` to provide\n * \"renderMode-independent\" API.\n */\n\nvar TooltipMarkupStyleCreator =\n/** @class */\nfunction () {\n function TooltipMarkupStyleCreator() {\n this.richTextStyles = {}; // Notice that \"generate a style name\" usuall happens repeatly when mouse moving and\n // displaying a tooltip. So we put the `_nextStyleNameId` as a member of each creator\n // rather than static shared by all creators (which will cause it increase to fast).\n\n this._nextStyleNameId = getRandomIdBase();\n }\n\n TooltipMarkupStyleCreator.prototype._generateStyleName = function () {\n return '__EC_aUTo_' + this._nextStyleNameId++;\n };\n\n TooltipMarkupStyleCreator.prototype.makeTooltipMarker = function (markerType, colorStr, renderMode) {\n var markerId = renderMode === 'richText' ? this._generateStyleName() : null;\n var marker = getTooltipMarker({\n color: colorStr,\n type: markerType,\n renderMode: renderMode,\n markerId: markerId\n });\n\n if (isString(marker)) {\n return marker;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n assert(markerId);\n }\n\n this.richTextStyles[markerId] = marker.style;\n return marker.content;\n }\n };\n /**\n * @usage\n * ```ts\n * const styledText = markupStyleCreator.wrapRichTextStyle([\n * // The styles will be auto merged.\n * {\n * fontSize: 12,\n * color: 'blue'\n * },\n * {\n * padding: 20\n * }\n * ]);\n * ```\n */\n\n\n TooltipMarkupStyleCreator.prototype.wrapRichTextStyle = function (text, styles) {\n var finalStl = {};\n\n if (isArray(styles)) {\n each(styles, function (stl) {\n return extend(finalStl, stl);\n });\n } else {\n extend(finalStl, styles);\n }\n\n var styleName = this._generateStyleName();\n\n this.richTextStyles[styleName] = finalStl;\n return \"{\" + styleName + \"|\" + text + \"}\";\n };\n\n return TooltipMarkupStyleCreator;\n}();\n\nexport { TooltipMarkupStyleCreator };","\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\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*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util';\nimport * as graphic from '../../util/graphic';\nimport { getECData } from '../../util/innerStore';\nimport { createTextStyle } from '../../label/labelStyle';\nimport { getLayoutRect } from '../../util/layout';\nimport ComponentModel from '../../model/Component';\nimport ComponentView from '../../view/Component';\nimport { windowOpen } from '../../util/format';\n\nvar TitleModel =\n/** @class */\nfunction (_super) {\n __extends(TitleModel, _super);\n\n function TitleModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = TitleModel.type;\n _this.layoutMode = {\n type: 'box',\n ignoreSize: true\n };\n return _this;\n }\n\n TitleModel.type = 'title';\n TitleModel.defaultOption = {\n zlevel: 0,\n z: 6,\n show: true,\n text: '',\n target: 'blank',\n subtext: '',\n subtarget: 'blank',\n left: 0,\n top: 0,\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n textStyle: {\n fontSize: 18,\n fontWeight: 'bold',\n color: '#464646'\n },\n subtextStyle: {\n fontSize: 12,\n color: '#6E7079'\n }\n };\n return TitleModel;\n}(ComponentModel); // View\n\n\nvar TitleView =\n/** @class */\nfunction (_super) {\n __extends(TitleView, _super);\n\n function TitleView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = TitleView.type;\n return _this;\n }\n\n TitleView.prototype.render = function (titleModel, ecModel, api) {\n this.group.removeAll();\n\n if (!titleModel.get('show')) {\n return;\n }\n\n var group = this.group;\n var textStyleModel = titleModel.getModel('textStyle');\n var subtextStyleModel = titleModel.getModel('subtextStyle');\n var textAlign = titleModel.get('textAlign');\n var textVerticalAlign = zrUtil.retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));\n var textEl = new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: titleModel.get('text'),\n fill: textStyleModel.getTextColor()\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var textRect = textEl.getBoundingRect();\n var subText = titleModel.get('subtext');\n var subTextEl = new graphic.Text({\n style: createTextStyle(subtextStyleModel, {\n text: subText,\n fill: subtextStyleModel.getTextColor(),\n y: textRect.height + titleModel.get('itemGap'),\n verticalAlign: 'top'\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var link = titleModel.get('link');\n var sublink = titleModel.get('sublink');\n var triggerEvent = titleModel.get('triggerEvent', true);\n textEl.silent = !link && !triggerEvent;\n subTextEl.silent = !sublink && !triggerEvent;\n\n if (link) {\n textEl.on('click', function () {\n windowOpen(link, '_' + titleModel.get('target'));\n });\n }\n\n if (sublink) {\n subTextEl.on('click', function () {\n windowOpen(sublink, '_' + titleModel.get('subtarget'));\n });\n }\n\n getECData(textEl).eventData = getECData(subTextEl).eventData = triggerEvent ? {\n componentType: 'title',\n componentIndex: titleModel.componentIndex\n } : null;\n group.add(textEl);\n subText && group.add(subTextEl); // If no subText, but add subTextEl, there will be an empty line.\n\n var groupRect = group.getBoundingRect();\n var layoutOption = titleModel.getBoxLayoutParams();\n layoutOption.width = groupRect.width;\n layoutOption.height = groupRect.height;\n var layoutRect = getLayoutRect(layoutOption, {\n width: api.getWidth(),\n height: api.getHeight()\n }, titleModel.get('padding')); // Adjust text align based on position\n\n if (!textAlign) {\n // Align left if title is on the left. center and right is same\n textAlign = titleModel.get('left') || titleModel.get('right'); // @ts-ignore\n\n if (textAlign === 'middle') {\n textAlign = 'center';\n } // Adjust layout by text align\n\n\n if (textAlign === 'right') {\n layoutRect.x += layoutRect.width;\n } else if (textAlign === 'center') {\n layoutRect.x += layoutRect.width / 2;\n }\n }\n\n if (!textVerticalAlign) {\n textVerticalAlign = titleModel.get('top') || titleModel.get('bottom'); // @ts-ignore\n\n if (textVerticalAlign === 'center') {\n textVerticalAlign = 'middle';\n }\n\n if (textVerticalAlign === 'bottom') {\n layoutRect.y += layoutRect.height;\n } else if (textVerticalAlign === 'middle') {\n layoutRect.y += layoutRect.height / 2;\n }\n\n textVerticalAlign = textVerticalAlign || 'top';\n }\n\n group.x = layoutRect.x;\n group.y = layoutRect.y;\n group.markRedraw();\n var alignStyle = {\n align: textAlign,\n verticalAlign: textVerticalAlign\n };\n textEl.setStyle(alignStyle);\n subTextEl.setStyle(alignStyle); // Render background\n // Get groupRect again because textAlign has been changed\n\n groupRect = group.getBoundingRect();\n var padding = layoutRect.margin;\n var style = titleModel.getItemStyle(['color', 'opacity']);\n style.fill = titleModel.get('backgroundColor');\n var rect = new graphic.Rect({\n shape: {\n x: groupRect.x - padding[3],\n y: groupRect.y - padding[0],\n width: groupRect.width + padding[1] + padding[3],\n height: groupRect.height + padding[0] + padding[2],\n r: titleModel.get('borderRadius')\n },\n style: style,\n subPixelOptimize: true,\n silent: true\n });\n group.add(rect);\n };\n\n TitleView.type = 'title';\n return TitleView;\n}(ComponentView);\n\nexport function install(registers) {\n registers.registerComponentModel(TitleModel);\n registers.registerComponentView(TitleView);\n}","\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\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*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util';\nimport Model from '../../model/Model';\nimport { isNameSpecified } from '../../util/model';\nimport ComponentModel from '../../model/Component';\n\nvar getDefaultSelectorOptions = function (ecModel, type) {\n if (type === 'all') {\n return {\n type: 'all',\n title: ecModel.getLocale(['legend', 'selector', 'all'])\n };\n } else if (type === 'inverse') {\n return {\n type: 'inverse',\n title: ecModel.getLocale(['legend', 'selector', 'inverse'])\n };\n }\n};\n\nvar LegendModel =\n/** @class */\nfunction (_super) {\n __extends(LegendModel, _super);\n\n function LegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = LegendModel.type;\n _this.layoutMode = {\n type: 'box',\n // legend.width/height are maxWidth/maxHeight actually,\n // whereas realy width/height is calculated by its content.\n // (Setting {left: 10, right: 10} does not make sense).\n // So consider the case:\n // `setOption({legend: {left: 10});`\n // then `setOption({legend: {right: 10});`\n // The previous `left` should be cleared by setting `ignoreSize`.\n ignoreSize: true\n };\n return _this;\n }\n\n LegendModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n option.selected = option.selected || {};\n\n this._updateSelector(option);\n };\n\n LegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n\n this._updateSelector(option);\n };\n\n LegendModel.prototype._updateSelector = function (option) {\n var selector = option.selector;\n var ecModel = this.ecModel;\n\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {\n type: item\n });\n selector[index] = zrUtil.merge(item, getDefaultSelectorOptions(ecModel, item.type));\n });\n }\n };\n\n LegendModel.prototype.optionUpdated = function () {\n this._updateData(this.ecModel);\n\n var legendData = this._data; // If selectedMode is single, try to select one\n\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false; // If has any selected in option.selected\n\n for (var i = 0; i < legendData.length; i++) {\n var name_1 = legendData[i].get('name');\n\n if (this.isSelected(name_1)) {\n // Force to unselect others\n this.select(name_1);\n hasSelected = true;\n break;\n }\n } // Try select the first if selectedMode is single\n\n\n !hasSelected && this.select(legendData[0].get('name'));\n }\n };\n\n LegendModel.prototype._updateData = function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var seriesName = seriesModel.name;\n availableNames.push(seriesName);\n var isPotential;\n\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n var names = provider.getAllNames();\n\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n availableNames = availableNames.concat(names);\n }\n\n if (names.length) {\n potentialData = potentialData.concat(names);\n } else {\n isPotential = true;\n }\n } else {\n isPotential = true;\n }\n\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n /**\n * @type {Array.}\n * @private\n */\n\n this._availableNames = availableNames; // If legend.data not specified in option, use availableNames as data,\n // which is convinient for user preparing option.\n\n var rawData = this.get('data') || potentialData;\n var legendData = zrUtil.map(rawData, function (dataItem) {\n // Can be string or number\n if (typeof dataItem === 'string' || typeof dataItem === 'number') {\n dataItem = {\n name: dataItem\n };\n }\n\n return new Model(dataItem, this, this.ecModel);\n }, this);\n /**\n * @type {Array.}\n * @private\n */\n\n this._data = legendData;\n };\n\n LegendModel.prototype.getData = function () {\n return this._data;\n };\n\n LegendModel.prototype.select = function (name) {\n var selected = this.option.selected;\n var selectedMode = this.get('selectedMode');\n\n if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\n });\n }\n\n selected[name] = true;\n };\n\n LegendModel.prototype.unSelect = function (name) {\n if (this.get('selectedMode') !== 'single') {\n this.option.selected[name] = false;\n }\n };\n\n LegendModel.prototype.toggleSelected = function (name) {\n var selected = this.option.selected; // Default is true\n\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n\n this[selected[name] ? 'unSelect' : 'select'](name);\n };\n\n LegendModel.prototype.allSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name', true)] = true;\n });\n };\n\n LegendModel.prototype.inverseSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n var name = dataItem.get('name', true); // Initially, default value is true\n\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n\n selected[name] = !selected[name];\n });\n };\n\n LegendModel.prototype.isSelected = function (name) {\n var selected = this.option.selected;\n return !(selected.hasOwnProperty(name) && !selected[name]) && zrUtil.indexOf(this._availableNames, name) >= 0;\n };\n\n LegendModel.prototype.getOrient = function () {\n return this.get('orient') === 'vertical' ? {\n index: 1,\n name: 'vertical'\n } : {\n index: 0,\n name: 'horizontal'\n };\n };\n\n LegendModel.type = 'legend.plain';\n LegendModel.dependencies = ['series'];\n LegendModel.defaultOption = {\n zlevel: 0,\n z: 4,\n show: true,\n orient: 'horizontal',\n left: 'center',\n // right: 'center',\n top: 0,\n // bottom: null,\n align: 'auto',\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n itemWidth: 25,\n itemHeight: 14,\n symbolSize: 'auto',\n inactiveColor: '#ccc',\n inactiveBorderColor: '#ccc',\n inactiveBorderWidth: 'auto',\n itemStyle: {\n color: 'inherit',\n opacity: 'inherit',\n decal: 'inherit',\n shadowBlur: 0,\n shadowColor: null,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n borderColor: 'inherit',\n borderWidth: 'auto',\n borderCap: 'inherit',\n borderJoin: 'inherit',\n borderDashOffset: 'inherit',\n borderMiterLimit: 'inherit'\n },\n lineStyle: {\n width: 'auto',\n color: 'inherit',\n inactiveColor: '#ccc',\n inactiveWidth: 2,\n opacity: 'inherit',\n type: 'inherit',\n cap: 'inherit',\n join: 'inherit',\n dashOffset: 'inherit',\n miterLimit: 'inherit',\n shadowBlur: 0,\n shadowColor: null,\n shadowOffsetX: 0,\n shadowOffsetY: 0\n },\n textStyle: {\n color: '#333'\n },\n selectedMode: true,\n selector: false,\n selectorLabel: {\n show: true,\n borderRadius: 10,\n padding: [3, 5, 3, 5],\n fontSize: 12,\n fontFamily: ' sans-serif',\n color: '#666',\n borderWidth: 1,\n borderColor: '#666'\n },\n emphasis: {\n selectorLabel: {\n show: true,\n color: '#eee',\n backgroundColor: '#666'\n }\n },\n selectorPosition: 'auto',\n selectorItemGap: 7,\n selectorButtonGap: 10,\n tooltip: {\n show: false\n }\n };\n return LegendModel;\n}(ComponentModel);\n\nexport default LegendModel;","\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\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*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util';\nimport { parse, stringify } from 'zrender/lib/tool/color';\nimport * as graphic from '../../util/graphic';\nimport { enableHoverEmphasis } from '../../util/states';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle';\nimport { makeBackground } from '../helper/listComponent';\nimport * as layoutUtil from '../../util/layout';\nimport ComponentView from '../../view/Component';\nimport { LINE_STYLE_KEY_MAP } from '../../model/mixin/lineStyle';\nimport { ITEM_STYLE_KEY_MAP } from '../../model/mixin/itemStyle';\nimport { createSymbol } from '../../util/symbol';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\n\nvar LegendView =\n/** @class */\nfunction (_super) {\n __extends(LegendView, _super);\n\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\n * @protected\n */\n\n\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\n * @protected\n */\n\n\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\n * @override\n */\n\n\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n\n if (!legendModel.get('show', true)) {\n return;\n }\n\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n } // selector has been normalized to an array in model\n\n\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); // Perform layout.\n\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition); // Place mainGroup, based on the calculated `mainRect`.\n\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw(); // Render background after group is layout.\n\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n };\n\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var name = legendItemModel.get('name'); // Use empty string or \\n as a newline string\n\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group(); // @ts-ignore\n\n g.newline = true;\n contentGroup.add(g);\n return;\n } // Representitive series.\n\n\n var seriesModel = ecModel.getSeriesByName(name)[0];\n\n if (legendDrawnMap.get(name)) {\n // Have been drawed\n return;\n } // Legend to control series.\n\n\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var symbolType = data.getVisual('legendSymbol');\n /**\n * `data.getVisual('style')` may be the color from the register\n * in series. For example, for line series,\n */\n\n var style = data.getVisual('style');\n data.getVisual('symbolSize');\n\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, symbolType, selectMode);\n\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n\n if (!provider.containName(name)) {\n return;\n }\n\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var symbolType = provider.getItemVisual(idx, 'legendSymbol');\n var colorArr = parse(style.fill); // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2; // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n\n style.fill = stringify(colorArr, 'rgba');\n }\n\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, symbolType, selectMode); // FIXME: consider different series has items with the same name.\n\n\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId)) // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect'\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, itemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, symbolType, selectMode) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var symbolKeepAspect = itemModel.get('symbolKeepAspect');\n var legendIconType = itemModel.get('icon');\n symbolType = legendIconType || symbolType || 'roundRect';\n var legendLineStyle = legendModel.getModel('lineStyle');\n var style = getLegendStyle(symbolType, itemModel, legendLineStyle, lineVisualStyle, itemVisualStyle, drawType, isSelected);\n var itemGroup = new Group();\n var textStyleModel = itemModel.getModel('textStyle');\n\n if (typeof seriesModel.getLegendIcon === 'function' && !legendIconType) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n symbolType: symbolType,\n symbolKeepAspect: symbolKeepAspect,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle\n }));\n } else {\n // Use default legend icon policy for most series\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n symbolType: symbolType,\n symbolKeepAspect: symbolKeepAspect,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle\n }));\n }\n\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n\n if (typeof formatter === 'string' && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (typeof formatter === 'function') {\n content = formatter(name);\n }\n\n var inactiveColor = itemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: isSelected ? textStyleModel.getTextColor() : inactiveColor,\n align: textAlign,\n verticalAlign: 'middle'\n })\n })); // Add a invisible rect to increase the area of mouse hover\n\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n invisible: true\n });\n var tooltipModel = itemModel.getModel('tooltip');\n\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup); // @ts-ignore\n\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup(); // Place items in contentGroup.\n\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box( // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n } //Always align selector to content as 'middle'\n\n\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\n * @protected\n */\n\n\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\n\nfunction getLegendStyle(symbolType, legendModel, legendLineStyle, lineVisualStyle, itemVisualStyle, drawType, isSelected) {\n /**\n * Use series style if is inherit;\n * elsewise, use legend style\n */\n // itemStyle\n var legendItemModel = legendModel.getModel('itemStyle');\n var itemProperties = ITEM_STYLE_KEY_MAP.concat([['decal']]);\n var itemStyle = {};\n\n for (var i = 0; i < itemProperties.length; ++i) {\n var propName = itemProperties[i][itemProperties[i].length - 1];\n var visualName = itemProperties[i][0];\n var value = legendItemModel.getShallow(propName);\n\n if (value === 'inherit') {\n switch (visualName) {\n case 'fill':\n /**\n * Series with visualDrawType as 'stroke' should have\n * series stroke as legend fill\n */\n itemStyle.fill = itemVisualStyle[drawType];\n break;\n\n case 'stroke':\n /**\n * symbol type with \"emptyXXX\" should use fill color\n * in visual style\n */\n itemStyle.stroke = itemVisualStyle[symbolType.startsWith('empty') ? 'fill' : 'stroke'];\n break;\n\n case 'opacity':\n /**\n * Use lineStyle.opacity if drawType is stroke\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n break;\n\n default:\n itemStyle[visualName] = itemVisualStyle[visualName];\n }\n } else if (value === 'auto' && visualName === 'lineWidth') {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n itemStyle.lineWidth = itemVisualStyle.lineWidth > 0 ? 2 : 0;\n } else {\n itemStyle[visualName] = value;\n }\n } // lineStyle\n\n\n var legendLineModel = legendModel.getModel('lineStyle');\n var lineProperties = LINE_STYLE_KEY_MAP.concat([['inactiveColor'], ['inactiveWidth']]);\n var lineStyle = {};\n\n for (var i = 0; i < lineProperties.length; ++i) {\n var propName = lineProperties[i][1];\n var visualName = lineProperties[i][0];\n var value = legendLineModel.getShallow(propName);\n\n if (value === 'inherit') {\n lineStyle[visualName] = lineVisualStyle[visualName];\n } else if (value === 'auto' && visualName === 'lineWidth') {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n lineStyle.lineWidth = lineVisualStyle.lineWidth > 0 ? 2 : 0;\n } else {\n lineStyle[visualName] = value;\n }\n } // Fix auto color to real color\n\n\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n\n if (!isSelected) {\n var borderWidth = legendModel.get('inactiveBorderWidth');\n /**\n * Since stroke is set to be inactiveBorderColor, it may occur that\n * there is no border in series but border in legend, so we need to\n * use border only when series has border if is set to be auto\n */\n\n var visualHasBorder = itemStyle[symbolType.indexOf('empty') > -1 ? 'fill' : 'stroke'];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendModel.get('inactiveColor');\n itemStyle.stroke = legendModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineStyle.get('inactiveColor');\n lineStyle.lineWidth = legendLineStyle.get('inactiveWidth');\n }\n\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\n\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.symbolType || 'roundRect';\n var symbol = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n symbol.setStyle(opt.itemStyle);\n\n if (symboType.indexOf('empty') > -1) {\n symbol.style.stroke = symbol.style.fill;\n symbol.style.fill = '#fff';\n symbol.style.lineWidth = 2;\n }\n\n return symbol;\n}\n\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n }); // highlight after select\n // TODO higlight immediately may cause animation loss.\n\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\n\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n\n return emphasisState && emphasisState.hoverLayer;\n}\n\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\n\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\n\nexport default LegendView;","\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\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// @ts-nocheck\nimport { getLayoutRect, box as layoutBox, positionElement } from '../../util/layout';\nimport * as formatUtil from '../../util/format';\nimport * as graphic from '../../util/graphic';\n/**\n * Layout list like component.\n * It will box layout each items in group of component and then position the whole group in the viewport\n * @param {module:zrender/group/Group} group\n * @param {module:echarts/model/Component} componentModel\n * @param {module:echarts/ExtensionAPI}\n */\n\nexport function layout(group, componentModel, api) {\n var boxLayoutParams = componentModel.getBoxLayoutParams();\n var padding = componentModel.get('padding');\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var rect = getLayoutRect(boxLayoutParams, viewportSize, padding);\n layoutBox(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height);\n positionElement(group, boxLayoutParams, viewportSize, padding);\n}\nexport function makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(componentModel.get('padding'));\n var style = componentModel.getItemStyle(['color', 'opacity']);\n style.fill = componentModel.get('backgroundColor');\n rect = new graphic.Rect({\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[1] + padding[3],\n height: rect.height + padding[0] + padding[2],\n r: componentModel.get('borderRadius')\n },\n style: style,\n silent: true,\n z2: -1\n }); // FIXME\n // `subPixelOptimizeRect` may bring some gap between edge of viewpart\n // and background rect when setting like `left: 0`, `top: 0`.\n // graphic.subPixelOptimizeRect(rect);\n\n return rect;\n}","\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\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*/\nexport default function legendFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (legendModels && legendModels.length) {\n ecModel.filterSeries(function (series) {\n // If in any legend component the status is not selected.\n // Because in legend series is assumed selected when it is not in the legend data.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(series.name)) {\n return false;\n }\n }\n\n return true;\n });\n }\n}","\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\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// @ts-nocheck\nimport { curry, each } from 'zrender/lib/core/util';\n\nfunction legendSelectActionHandler(methodName, payload, ecModel) {\n var selectedMap = {};\n var isToggleSelect = methodName === 'toggleSelected';\n var isSelected; // Update all legend components\n\n ecModel.eachComponent('legend', function (legendModel) {\n if (isToggleSelect && isSelected != null) {\n // Force other legend has same selected status\n // Or the first is toggled to true and other are toggled to false\n // In the case one legend has some item unSelected in option. And if other legend\n // doesn't has the item, they will assume it is selected.\n legendModel[isSelected ? 'select' : 'unSelect'](payload.name);\n } else if (methodName === 'allSelect' || methodName === 'inverseSelect') {\n legendModel[methodName]();\n } else {\n legendModel[methodName](payload.name);\n isSelected = legendModel.isSelected(payload.name);\n }\n\n var legendData = legendModel.getData();\n each(legendData, function (model) {\n var name = model.get('name'); // Wrap element\n\n if (name === '\\n' || name === '') {\n return;\n }\n\n var isItemSelected = legendModel.isSelected(name);\n\n if (selectedMap.hasOwnProperty(name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n } else {\n selectedMap[name] = isItemSelected;\n }\n });\n }); // Return the event explicitly\n\n return methodName === 'allSelect' || methodName === 'inverseSelect' ? {\n selected: selectedMap\n } : {\n name: payload.name,\n selected: selectedMap\n };\n}\n\nexport function installLegendAction(registers) {\n /**\n * @event legendToggleSelect\n * @type {Object}\n * @property {string} type 'legendToggleSelect'\n * @property {string} [from]\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected'));\n registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect'));\n registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect'));\n /**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\n\n registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select'));\n /**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\n\n registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect'));\n}","\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\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*/\nimport LegendModel from './LegendModel';\nimport LegendView from './LegendView';\nimport legendFilter from './legendFilter';\nimport { installLegendAction } from './legendAction';\nexport function install(registers) {\n registers.registerComponentModel(LegendModel);\n registers.registerComponentView(LegendView);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\n registers.registerSubTypeDefaulter('legend', function () {\n return 'plain';\n });\n installLegendAction(registers);\n}","\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\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*/\nimport { __extends } from \"tslib\";\nimport LegendModel from './LegendModel';\nimport { mergeLayoutParam, getLayoutParams } from '../../util/layout';\nimport { inheritDefaultOption } from '../../util/component';\n\nvar ScrollableLegendModel =\n/** @class */\nfunction (_super) {\n __extends(ScrollableLegendModel, _super);\n\n function ScrollableLegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = ScrollableLegendModel.type;\n return _this;\n }\n /**\n * @param {number} scrollDataIndex\n */\n\n\n ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n };\n\n ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n\n _super.prototype.init.call(this, option, parentModel, ecModel);\n\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n };\n /**\n * @override\n */\n\n\n ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n\n mergeAndNormalizeLayoutParams(this, this.option, option);\n };\n\n ScrollableLegendModel.type = 'legend.scroll';\n ScrollableLegendModel.defaultOption = inheritDefaultOption(LegendModel.defaultOption, {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end',\n pageFormatter: '{current}/{total}',\n pageIcons: {\n horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'],\n vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']\n },\n pageIconColor: '#2f4554',\n pageIconInactiveColor: '#aaa',\n pageIconSize: 15,\n pageTextStyle: {\n color: '#333'\n },\n animationDurationUpdate: 800\n });\n return ScrollableLegendModel;\n}(LegendModel);\n\n; // Do not `ignoreSize` to enable setting {left: 10, right: 10}.\n\nfunction mergeAndNormalizeLayoutParams(legendModel, target, raw) {\n var orient = legendModel.getOrient();\n var ignoreSize = [1, 1];\n ignoreSize[orient.index] = 0;\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: !!ignoreSize\n });\n}\n\nexport default ScrollableLegendModel;","\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\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*/\nimport { __extends } from \"tslib\";\n/**\n * Separate legend and scrollable legend to reduce package size.\n */\n\nimport * as zrUtil from 'zrender/lib/core/util';\nimport * as graphic from '../../util/graphic';\nimport * as layoutUtil from '../../util/layout';\nimport LegendView from './LegendView';\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\n\nvar ScrollableLegendView =\n/** @class */\nfunction (_super) {\n __extends(ScrollableLegendView, _super);\n\n function ScrollableLegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = ScrollableLegendView.type;\n _this.newlineDisabled = true;\n _this._currentIndex = 0;\n return _this;\n }\n\n ScrollableLegendView.prototype.init = function () {\n _super.prototype.init.call(this);\n\n this.group.add(this._containerGroup = new Group());\n\n this._containerGroup.add(this.getContentGroup());\n\n this.group.add(this._controllerGroup = new Group());\n };\n /**\n * @override\n */\n\n\n ScrollableLegendView.prototype.resetInner = function () {\n _super.prototype.resetInner.call(this);\n\n this._controllerGroup.removeAll();\n\n this._containerGroup.removeClipPath();\n\n this._containerGroup.__rectSize = null;\n };\n /**\n * @override\n */\n\n\n ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var self = this; // Render content items.\n\n _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n\n var controllerGroup = this._controllerGroup; // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n\n var pageIconSize = legendModel.get('pageIconSize', true);\n var pageIconSizeArr = zrUtil.isArray(pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize];\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n // Placeholder to calculate a proper layout.\n text: 'xx/xx',\n fill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n verticalAlign: 'middle',\n align: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(self._pageGo, self, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSizeArr[0] / 2,\n y: -pageIconSizeArr[1] / 2,\n width: pageIconSizeArr[0],\n height: pageIconSizeArr[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n };\n /**\n * @override\n */\n\n\n ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box( // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy);\n\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n selectorGroup.markRedraw();\n }\n\n return mainRect;\n };\n\n ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup; // Place items in contentGroup.\n\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box( // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh]; // In case that the inner elements of contentGroup layout do not based on [0, 0]\n\n var contentPos = [-contentRect.x, -contentRect.y]; // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup[xy];\n } // Layout container group based on 0.\n\n\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)); // Place containerGroup and controllerGroup and contentGroup.\n\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true); // controller is on the right / bottom.\n\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n } // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n } // Always align controller to content as 'middle'.\n\n\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.setPosition(contentPos);\n containerGroup.setPosition(containerPos);\n controllerGroup.setPosition(controllerPos); // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n\n var mainRect = {\n x: 0,\n y: 0\n }; // Consider content may be overflow (should be clipped).\n\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]); // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n })); // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n } // Content translate animation.\n\n\n var pageInfo = this._getPageInfo(legendModel);\n\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n x: pageInfo.contentPosition[0],\n y: pageInfo.contentPosition[1]\n }, // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : null);\n\n this._updatePageInfoView(legendModel, pageInfo);\n\n return mainRect;\n };\n\n ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n };\n\n ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var key = name + 'DataIndex';\n var canJump = pageInfo[key] != null;\n var icon = controllerGroup.childOfName(name);\n\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({\n current: current,\n total: total\n }));\n };\n /**\n * contentPosition: Array., null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n\n\n ScrollableLegendView.prototype._getPageInfo = function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: [contentGroup.x, contentGroup.y],\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n\n if (!targetItem) {\n return result;\n }\n\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s; // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n\n if ( // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize || // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n\n ++result.pageCount;\n }\n }\n\n winEndItemInfo = currItemInfo;\n }\n\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n\n if ( // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)) && // e.g., when page size is smaller than item size.\n winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n\n ++result.pageCount;\n ++result.pageIndex;\n }\n\n winStartItemInfo = currItemInfo;\n }\n\n return result;\n\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el[xy];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n };\n\n ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex; // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defaultIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n };\n\n ScrollableLegendView.type = 'legend.scroll';\n return ScrollableLegendView;\n}(LegendView);\n\nexport default ScrollableLegendView;","\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\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*/\nimport { use } from '../../extension';\nimport { install as installLegendPlain } from './installLegendPlain';\nimport ScrollableLegendModel from './ScrollableLegendModel';\nimport ScrollableLegendView from './ScrollableLegendView';\nimport installScrollableLegendAction from './scrollableLegendAction';\nexport function install(registers) {\n use(installLegendPlain);\n registers.registerComponentModel(ScrollableLegendModel);\n registers.registerComponentView(ScrollableLegendView);\n installScrollableLegendAction(registers);\n}","\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\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*/\nexport default function installScrollableLegendAction(registers) {\n /**\n * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\n registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n scrollDataIndex != null && ecModel.eachComponent({\n mainType: 'legend',\n subType: 'scroll',\n query: payload\n }, function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n });\n });\n}","\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\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*/\nimport { use } from '../../extension';\nimport { install as installLegendPlain } from './installLegendPlain';\nimport { install as installLegendScroll } from './installLegendScroll';\nexport function install(registers) {\n use(installLegendPlain);\n use(installLegendScroll);\n}","\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\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*/\nimport { __extends } from \"tslib\";\nimport ComponentModel from '../../model/Component';\n\nvar TooltipModel =\n/** @class */\nfunction (_super) {\n __extends(TooltipModel, _super);\n\n function TooltipModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = TooltipModel.type;\n return _this;\n }\n\n TooltipModel.type = 'tooltip';\n TooltipModel.dependencies = ['axisPointer'];\n TooltipModel.defaultOption = {\n zlevel: 0,\n z: 60,\n show: true,\n // tooltip main content\n showContent: true,\n // 'trigger' only works on coordinate system.\n // 'item' | 'axis' | 'none'\n trigger: 'item',\n // 'click' | 'mousemove' | 'none'\n triggerOn: 'mousemove|click',\n alwaysShowContent: false,\n displayMode: 'single',\n renderMode: 'auto',\n // whether restraint content inside viewRect.\n // If renderMode: 'richText', default true.\n // If renderMode: 'html', defaut false (for backward compat).\n confine: null,\n showDelay: 0,\n hideDelay: 100,\n // Animation transition time, unit is second\n transitionDuration: 0.4,\n enterable: false,\n backgroundColor: '#fff',\n // box shadow\n shadowBlur: 10,\n shadowColor: 'rgba(0, 0, 0, .2)',\n shadowOffsetX: 1,\n shadowOffsetY: 2,\n // tooltip border radius, unit is px, default is 4\n borderRadius: 4,\n // tooltip border width, unit is px, default is 0 (no border)\n borderWidth: 1,\n // Tooltip inside padding, default is 5 for all direction\n // Array is allowed to set up, right, bottom, left, same with css\n // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.\n padding: null,\n // Extra css text\n extraCssText: '',\n // axis indicator, trigger by axis\n axisPointer: {\n // default is line\n // legal values: 'line' | 'shadow' | 'cross'\n type: 'line',\n // Valid when type is line, appoint tooltip line locate on which line. Optional\n // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'\n // default is 'auto', chose the axis which type is category.\n // for multiply y axis, cartesian coord chose x axis, polar chose angle axis\n axis: 'auto',\n animation: 'auto',\n animationDurationUpdate: 200,\n animationEasingUpdate: 'exponentialOut',\n crossStyle: {\n color: '#999',\n width: 1,\n type: 'dashed',\n // TODO formatter\n textStyle: {}\n } // lineStyle and shadowStyle should not be specified here,\n // otherwise it will always override those styles on option.axisPointer.\n\n },\n textStyle: {\n color: '#666',\n fontSize: 14\n }\n };\n return TooltipModel;\n}(ComponentModel);\n\nexport default TooltipModel;","\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\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*/\nimport { toCamelCase } from '../../util/format';\nimport env from 'zrender/lib/core/env';\n/* global document */\n\nexport function shouldTooltipConfine(tooltipModel) {\n var confineOption = tooltipModel.get('confine');\n return confineOption != null ? !!confineOption // In richText mode, the outside part can not be visible.\n : tooltipModel.get('renderMode') === 'richText';\n}\n\nfunction testStyle(styleProps) {\n if (!env.domSupported) {\n return;\n }\n\n var style = document.documentElement.style;\n\n for (var i = 0, len = styleProps.length; i < len; i++) {\n if (styleProps[i] in style) {\n return styleProps[i];\n }\n }\n}\n\nexport var TRANSFORM_VENDOR = testStyle(['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\nexport var TRANSITION_VENDOR = testStyle(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\nexport function toCSSVendorPrefix(styleVendor, styleProp) {\n if (!styleVendor) {\n return styleProp;\n }\n\n styleProp = toCamelCase(styleProp, true);\n var idx = styleVendor.indexOf(styleProp);\n styleVendor = idx === -1 ? styleProp : \"-\" + styleVendor.slice(0, idx) + \"-\" + styleProp;\n return styleVendor.toLowerCase();\n}\nexport function getComputedStyle(el, style) {\n var stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el);\n return stl ? style ? stl[style] : stl : null;\n}","\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\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*/\nimport { isString, indexOf, each, bind, isArray, isDom } from 'zrender/lib/core/util';\nimport { toHex } from 'zrender/lib/tool/color';\nimport { normalizeEvent } from 'zrender/lib/core/event';\nimport { transformLocalCoord } from 'zrender/lib/core/dom';\nimport env from 'zrender/lib/core/env';\nimport { convertToColorString, toCamelCase, normalizeCssArray } from '../../util/format';\nimport { shouldTooltipConfine, toCSSVendorPrefix, getComputedStyle, TRANSFORM_VENDOR, TRANSITION_VENDOR } from './helper';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup';\n/* global document, window */\n\nvar CSS_TRANSITION_VENDOR = toCSSVendorPrefix(TRANSITION_VENDOR, 'transition');\nvar CSS_TRANSFORM_VENDOR = toCSSVendorPrefix(TRANSFORM_VENDOR, 'transform'); // eslint-disable-next-line\n\nvar gCssText = \"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;\" + (env.transform3dSupported ? 'will-change:transform;' : '');\n\nfunction mirrorPos(pos) {\n pos = pos === 'left' ? 'right' : pos === 'right' ? 'left' : pos === 'top' ? 'bottom' : 'top';\n return pos;\n}\n\nfunction assembleArrow(backgroundColor, borderColor, arrowPosition) {\n if (!isString(arrowPosition) || arrowPosition === 'inside') {\n return '';\n }\n\n borderColor = convertToColorString(borderColor);\n var arrowPos = mirrorPos(arrowPosition);\n var positionStyle = arrowPos + \":-6px;\";\n var transformStyle = CSS_TRANSFORM_VENDOR + ':';\n\n if (indexOf(['left', 'right'], arrowPos) > -1) {\n positionStyle += 'top:50%';\n transformStyle += \"translateY(-50%) rotate(\" + (arrowPos === 'left' ? -225 : -45) + \"deg)\";\n } else {\n positionStyle += 'left:50%';\n transformStyle += \"translateX(-50%) rotate(\" + (arrowPos === 'top' ? 225 : 45) + \"deg)\";\n }\n\n var borderStyle = borderColor + \" solid 1px;\";\n var styleCss = ['position:absolute;width:10px;height:10px;', positionStyle + \";\" + transformStyle + \";\", \"border-bottom:\" + borderStyle, \"border-right:\" + borderStyle, \"background-color:\" + backgroundColor + \";\", 'box-shadow:8px 8px 16px -3px #000;'];\n return \"
\";\n}\n\nfunction assembleTransition(duration, onlyFade) {\n var transitionCurve = 'cubic-bezier(0.23,1,0.32,1)';\n var transitionOption = \" \" + duration / 2 + \"s \" + transitionCurve;\n var transitionText = \"opacity\" + transitionOption + \",visibility\" + transitionOption;\n\n if (!onlyFade) {\n transitionOption = \" \" + duration + \"s \" + transitionCurve;\n transitionText += env.transformSupported ? \",\" + TRANSFORM_VENDOR + transitionOption : \",left\" + transitionOption + \",top\" + transitionOption;\n }\n\n return CSS_TRANSITION_VENDOR + ':' + transitionText;\n}\n\nfunction assembleTransform(x, y, toString) {\n // If using float on style, the final width of the dom might\n // keep changing slightly while mouse move. So `toFixed(0)` them.\n var x0 = x.toFixed(0) + 'px';\n var y0 = y.toFixed(0) + 'px'; // not support transform, use `left` and `top` instead.\n\n if (!env.transformSupported) {\n return toString ? \"top:\" + y0 + \";left:\" + x0 + \";\" : [['top', y0], ['left', x0]];\n } // support transform\n\n\n var is3d = env.transform3dSupported;\n var translate = \"translate\" + (is3d ? '3d' : '') + \"(\" + x0 + \",\" + y0 + (is3d ? ',0' : '') + \")\";\n return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];\n}\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\n\n\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n color && cssText.push('color:' + color);\n cssText.push('font:' + textStyleModel.getFont());\n fontSize // @ts-ignore, leave it to the tooltip refactor.\n && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');\n var shadowColor = textStyleModel.get('textShadowColor');\n var shadowBlur = textStyleModel.get('textShadowBlur') || 0;\n var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0;\n var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0;\n shadowColor && shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor);\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n return cssText.join(';');\n}\n\nfunction assembleCssText(tooltipModel, enableTransition, onlyFade) {\n var cssText = [];\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var shadowBlur = tooltipModel.get('shadowBlur');\n var shadowColor = tooltipModel.get('shadowColor');\n var shadowOffsetX = tooltipModel.get('shadowOffsetX');\n var shadowOffsetY = tooltipModel.get('shadowOffsetY');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = getPaddingFromTooltipModel(tooltipModel, 'html');\n var boxShadow = shadowOffsetX + \"px \" + shadowOffsetY + \"px \" + shadowBlur + \"px \" + shadowColor;\n cssText.push('box-shadow:' + boxShadow); // Animation transition. Do not animate when transitionDuration is 0.\n\n enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade));\n\n if (backgroundColor) {\n if (env.canvasSupported) {\n cssText.push('background-color:' + backgroundColor);\n } else {\n // for ie\n cssText.push('background-color:#' + toHex(backgroundColor));\n cssText.push('filter:alpha(opacity=70)');\n }\n } // Border style\n\n\n each(['width', 'color', 'radius'], function (name) {\n var borderName = 'border-' + name;\n var camelCase = toCamelCase(borderName);\n var val = tooltipModel.get(camelCase);\n val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n }); // Text style\n\n cssText.push(assembleFont(textStyleModel)); // Padding\n\n if (padding != null) {\n cssText.push('padding:' + normalizeCssArray(padding).join('px ') + 'px');\n }\n\n return cssText.join(';') + ';';\n} // If not able to make, do not modify the input `out`.\n\n\nfunction makeStyleCoord(out, zr, appendToBody, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n\n if (appendToBody) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\n\n if (zrViewportRoot) {\n // Some APPs might use scale on body, so we support CSS transform here.\n transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY);\n }\n } else {\n out[0] = zrX;\n out[1] = zrY; // xy should be based on canvas root. But tooltipContent is\n // the sibling of canvas root. So padding of ec container\n // should be considered here.\n\n var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\n\nvar TooltipHTMLContent =\n/** @class */\nfunction () {\n function TooltipHTMLContent(container, api, opt) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._enterable = true;\n this._firstShow = true;\n this._longHide = true;\n\n if (env.wxa) {\n return null;\n }\n\n var el = document.createElement('div'); // TODO: TYPE\n\n el.domBelongToZr = true;\n this.el = el;\n var zr = this._zr = api.getZr();\n var appendToBody = this._appendToBody = opt && opt.appendToBody;\n makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2);\n\n if (appendToBody) {\n document.body.appendChild(el);\n } else {\n container.appendChild(el);\n }\n\n this._container = container; // FIXME\n // Is it needed to trigger zr event manually if\n // the browser do not support `pointer-events: none`.\n\n var self = this;\n\n el.onmouseenter = function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n\n self._inContent = true;\n };\n\n el.onmousemove = function (e) {\n e = e || window.event;\n\n if (!self._enterable) {\n // `pointer-events: none` is set to tooltip content div\n // if `enterable` is set as `false`, and `el.onmousemove`\n // can not be triggered. But in browser that do not\n // support `pointer-events`, we need to do this:\n // Try trigger zrender event to avoid mouse\n // in and out shape too frequently\n var handler = zr.handler;\n var zrViewportRoot = zr.painter.getViewportRoot();\n normalizeEvent(zrViewportRoot, e, true);\n handler.dispatch('mousemove', e);\n }\n };\n\n el.onmouseleave = function () {\n // set `_inContent` to `false` before `hideLater`\n self._inContent = false;\n\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n };\n }\n /**\n * Update when tooltip is rendered\n */\n\n\n TooltipHTMLContent.prototype.update = function (tooltipModel) {\n // FIXME\n // Move this logic to ec main?\n var container = this._container;\n var position = getComputedStyle(container, 'position');\n var domStyle = container.style;\n\n if (domStyle.position !== 'absolute' && position !== 'absolute') {\n domStyle.position = 'relative';\n } // move tooltip if chart resized\n\n\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized(); // update className\n\n this.el.className = tooltipModel.get('className') || ''; // Hide the tooltip\n // PENDING\n // this.hide();\n };\n\n TooltipHTMLContent.prototype.show = function (tooltipModel, nearPointColor) {\n clearTimeout(this._hideTimeout);\n clearTimeout(this._longHideTimeout);\n var el = this.el;\n var style = el.style;\n var styleCoord = this._styleCoord;\n\n if (!el.innerHTML) {\n style.display = 'none';\n } else {\n style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide) // initial transform\n + assembleTransform(styleCoord[0], styleCoord[1], true) + (\"border-color:\" + convertToColorString(nearPointColor) + \";\") + (tooltipModel.get('extraCssText') || '') // If mouse occasionally move over the tooltip, a mouseout event will be\n // triggered by canvas, and cause some unexpectable result like dragging\n // stop, \"unfocusAdjacency\". Here `pointer-events: none` is used to solve\n // it. Although it is not supported by IE8~IE10, fortunately it is a rare\n // scenario.\n + (\";pointer-event:\" + (this._enterable ? 'auto' : 'none'));\n }\n\n this._show = true;\n this._firstShow = false;\n this._longHide = false;\n };\n\n TooltipHTMLContent.prototype.setContent = function (content, markers, tooltipModel, borderColor, arrowPosition) {\n if (content == null) {\n return;\n }\n\n var el = this.el;\n\n if (isString(arrowPosition) && tooltipModel.get('trigger') === 'item' && !shouldTooltipConfine(tooltipModel)) {\n content += assembleArrow(tooltipModel.get('backgroundColor'), borderColor, arrowPosition);\n }\n\n if (isString(content)) {\n el.innerHTML = content;\n } else if (content) {\n // Clear previous\n el.innerHTML = '';\n\n if (!isArray(content)) {\n content = [content];\n }\n\n for (var i = 0; i < content.length; i++) {\n if (isDom(content[i]) && content[i].parentNode !== el) {\n el.appendChild(content[i]);\n }\n }\n }\n };\n\n TooltipHTMLContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n\n TooltipHTMLContent.prototype.getSize = function () {\n var el = this.el;\n return [el.clientWidth, el.clientHeight];\n };\n\n TooltipHTMLContent.prototype.moveTo = function (zrX, zrY) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY);\n\n if (styleCoord[0] != null && styleCoord[1] != null) {\n var style_1 = this.el.style;\n var transforms = assembleTransform(styleCoord[0], styleCoord[1]);\n each(transforms, function (transform) {\n style_1[transform[0]] = transform[1];\n });\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n\n\n TooltipHTMLContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2]; // The ratio of top to height\n\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n\n TooltipHTMLContent.prototype.hide = function () {\n var _this = this;\n\n var style = this.el.style;\n style.visibility = 'hidden';\n style.opacity = '0';\n env.transform3dSupported && (style.willChange = '');\n this._show = false;\n this._longHideTimeout = setTimeout(function () {\n return _this._longHide = true;\n }, 500);\n };\n\n TooltipHTMLContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable)) {\n if (time) {\n this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times\n\n this._show = false;\n this._hideTimeout = setTimeout(bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n\n TooltipHTMLContent.prototype.isShow = function () {\n return this._show;\n };\n\n TooltipHTMLContent.prototype.dispose = function () {\n this.el.parentNode.removeChild(this.el);\n };\n\n TooltipHTMLContent.prototype.getOuterSize = function () {\n var width = this.el.clientWidth;\n var height = this.el.clientHeight; // Consider browser compatibility.\n // IE8 does not support getComputedStyle.\n\n var stl = getComputedStyle(this.el);\n\n if (stl) {\n width += parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10);\n height += parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10);\n }\n\n return {\n width: width,\n height: height\n };\n };\n\n return TooltipHTMLContent;\n}();\n\nexport default TooltipHTMLContent;","\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\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*/\nimport * as zrUtil from 'zrender/lib/core/util';\nimport ZRText from 'zrender/lib/graphic/Text';\nimport { getPaddingFromTooltipModel } from './tooltipMarkup';\nimport { throwError } from '../../util/log';\n\nvar TooltipRichContent =\n/** @class */\nfunction () {\n function TooltipRichContent(api) {\n this._show = false;\n this._styleCoord = [0, 0, 0, 0];\n this._enterable = true;\n this._zr = api.getZr();\n makeStyleCoord(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2);\n }\n /**\n * Update when tooltip is rendered\n */\n\n\n TooltipRichContent.prototype.update = function (tooltipModel) {\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveIfResized();\n };\n\n TooltipRichContent.prototype.show = function () {\n if (this._hideTimeout) {\n clearTimeout(this._hideTimeout);\n }\n\n this.el.show();\n this._show = true;\n };\n /**\n * Set tooltip content\n */\n\n\n TooltipRichContent.prototype.setContent = function (content, markupStyleCreator, tooltipModel, borderColor, arrowPosition) {\n if (zrUtil.isObject(content)) {\n throwError(process.env.NODE_ENV !== 'production' ? 'Passing DOM nodes as content is not supported in richText tooltip!' : '');\n }\n\n if (this.el) {\n this._zr.remove(this.el);\n }\n\n var textStyleModel = tooltipModel.getModel('textStyle');\n this.el = new ZRText({\n style: {\n rich: markupStyleCreator.richTextStyles,\n text: content,\n lineHeight: 22,\n backgroundColor: tooltipModel.get('backgroundColor'),\n borderRadius: tooltipModel.get('borderRadius'),\n borderWidth: 1,\n borderColor: borderColor,\n shadowColor: tooltipModel.get('shadowColor'),\n shadowBlur: tooltipModel.get('shadowBlur'),\n shadowOffsetX: tooltipModel.get('shadowOffsetX'),\n shadowOffsetY: tooltipModel.get('shadowOffsetY'),\n textShadowColor: textStyleModel.get('textShadowColor'),\n textShadowBlur: textStyleModel.get('textShadowBlur') || 0,\n textShadowOffsetX: textStyleModel.get('textShadowOffsetX') || 0,\n textShadowOffsetY: textStyleModel.get('textShadowOffsetY') || 0,\n fill: tooltipModel.get(['textStyle', 'color']),\n padding: getPaddingFromTooltipModel(tooltipModel, 'richText'),\n verticalAlign: 'top',\n align: 'left'\n },\n z: tooltipModel.get('z')\n });\n\n this._zr.add(this.el);\n\n var self = this;\n this.el.on('mouseover', function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n\n self._inContent = true;\n });\n this.el.on('mouseout', function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n\n self._inContent = false;\n });\n };\n\n TooltipRichContent.prototype.setEnterable = function (enterable) {\n this._enterable = enterable;\n };\n\n TooltipRichContent.prototype.getSize = function () {\n var el = this.el;\n var bounding = this.el.getBoundingRect(); // bounding rect does not include shadow. For renderMode richText,\n // if overflow, it will be cut. So calculate them accurately.\n\n var shadowOuterSize = calcShadowOuterSize(el.style);\n return [bounding.width + shadowOuterSize.left + shadowOuterSize.right, bounding.height + shadowOuterSize.top + shadowOuterSize.bottom];\n };\n\n TooltipRichContent.prototype.moveTo = function (x, y) {\n var el = this.el;\n\n if (el) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, x, y);\n x = styleCoord[0];\n y = styleCoord[1];\n var style = el.style;\n var borderWidth = mathMaxWith0(style.borderWidth || 0);\n var shadowOuterSize = calcShadowOuterSize(style); // rich text x, y do not include border.\n\n el.x = x + borderWidth + shadowOuterSize.left;\n el.y = y + borderWidth + shadowOuterSize.top;\n el.markRedraw();\n }\n };\n /**\n * when `alwaysShowContent` is true,\n * move the tooltip after chart resized\n */\n\n\n TooltipRichContent.prototype._moveIfResized = function () {\n // The ratio of left to width\n var ratioX = this._styleCoord[2]; // The ratio of top to height\n\n var ratioY = this._styleCoord[3];\n this.moveTo(ratioX * this._zr.getWidth(), ratioY * this._zr.getHeight());\n };\n\n TooltipRichContent.prototype.hide = function () {\n if (this.el) {\n this.el.hide();\n }\n\n this._show = false;\n };\n\n TooltipRichContent.prototype.hideLater = function (time) {\n if (this._show && !(this._inContent && this._enterable)) {\n if (time) {\n this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times\n\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n };\n\n TooltipRichContent.prototype.isShow = function () {\n return this._show;\n };\n\n TooltipRichContent.prototype.getOuterSize = function () {\n var size = this.getSize();\n return {\n width: size[0],\n height: size[1]\n };\n };\n\n TooltipRichContent.prototype.dispose = function () {\n this._zr.remove(this.el);\n };\n\n return TooltipRichContent;\n}();\n\nfunction mathMaxWith0(val) {\n return Math.max(0, val);\n}\n\nfunction calcShadowOuterSize(style) {\n var shadowBlur = mathMaxWith0(style.shadowBlur || 0);\n var shadowOffsetX = mathMaxWith0(style.shadowOffsetX || 0);\n var shadowOffsetY = mathMaxWith0(style.shadowOffsetY || 0);\n return {\n left: mathMaxWith0(shadowBlur - shadowOffsetX),\n right: mathMaxWith0(shadowBlur + shadowOffsetX),\n top: mathMaxWith0(shadowBlur - shadowOffsetY),\n bottom: mathMaxWith0(shadowBlur + shadowOffsetY)\n };\n}\n\nfunction makeStyleCoord(out, zr, zrX, zrY) {\n out[0] = zrX;\n out[1] = zrY;\n out[2] = out[0] / zr.getWidth();\n out[3] = out[1] / zr.getHeight();\n}\n\nexport default TooltipRichContent;","\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/*\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\nimport * as zrUtil from 'zrender/lib/core/util';\nimport env from 'zrender/lib/core/env';\nimport TooltipHTMLContent from './TooltipHTMLContent';\nimport TooltipRichContent from './TooltipRichContent';\nimport * as formatUtil from '../../util/format';\nimport * as numberUtil from '../../util/number';\nimport * as graphic from '../../util/graphic';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries';\nimport * as layoutUtil from '../../util/layout';\nimport Model from '../../model/Model';\nimport * as globalListener from '../axisPointer/globalListener';\nimport * as axisHelper from '../../coord/axisHelper';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper';\nimport { getTooltipRenderMode, preParseFinder, queryReferringComponents } from '../../util/model';\nimport ComponentView from '../../view/Component';\nimport { format as timeFormat } from '../../util/time'; // import { isDimensionStacked } from '../../data/helper/dataStackHelper';\n\nimport { getECData } from '../../util/innerStore';\nimport { shouldTooltipConfine } from './helper';\nimport { normalizeTooltipFormatResult } from '../../model/mixin/dataFormat';\nimport { createTooltipMarkup, buildTooltipMarkup, TooltipMarkupStyleCreator } from './tooltipMarkup';\nimport { findEventDispatcher } from '../../util/event';\nvar bind = zrUtil.bind;\nvar each = zrUtil.each;\nvar parsePercent = numberUtil.parsePercent;\nvar proxyRect = new graphic.Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\n\nvar TooltipView =\n/** @class */\nfunction (_super) {\n __extends(TooltipView, _super);\n\n function TooltipView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = TooltipView.type;\n return _this;\n }\n\n TooltipView.prototype.init = function (ecModel, api) {\n if (env.node) {\n return;\n }\n\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = tooltipModel.get('renderMode');\n this._renderMode = getTooltipRenderMode(renderMode);\n this._tooltipContent = this._renderMode === 'richText' ? new TooltipRichContent(api) : new TooltipHTMLContent(api.getDom(), api, {\n appendToBody: tooltipModel.get('appendToBody', true)\n });\n };\n\n TooltipView.prototype.render = function (tooltipModel, ecModel, api) {\n if (env.node) {\n return;\n } // Reset\n\n\n this.group.removeAll();\n this._tooltipModel = tooltipModel;\n this._ecModel = ecModel;\n this._api = api;\n /**\n * @private\n * @type {boolean}\n */\n\n this._alwaysShowContent = tooltipModel.get('alwaysShowContent');\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n\n this._initGlobalListener();\n\n this._keepShow();\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\n TooltipView.prototype._keepShow = function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api; // Try to keep the tooltip show when refreshing\n\n if (this._lastX != null && this._lastY != null // 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 && tooltipModel.get('triggerOn') !== 'none') {\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 /**\n * Show tip manually by\n * dispatchAction({\n * type: 'showTip',\n * x: 10,\n * y: 10\n * });\n * Or\n * dispatchAction({\n * type: 'showTip',\n * seriesIndex: 0,\n * dataIndex or dataIndexInside or name\n * });\n *\n * TODO Batch\n */\n\n\n TooltipView.prototype.manuallyShowTip = function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node) {\n return;\n }\n\n var dispatchAction = makeDispatchAction(payload, api); // Reset ticket\n\n this._ticket = ''; // When triggered from axisPointer.\n\n var dataByCoordSys = payload.dataByCoordSys;\n var cmptRef = findComponentReference(payload, ecModel, api);\n\n if (cmptRef) {\n var rect = cmptRef.el.getBoundingRect().clone();\n rect.applyTransform(cmptRef.el.transform);\n\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 }; // Manually show tooltip while view is not using zrender elements.\n\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\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n\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\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\n TooltipView.prototype.manuallyHideTip = function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n\n if (!this._alwaysShowContent && this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n\n this._lastX = this._lastY = this._lastDataByCoordSys = null;\n\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\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\n\n TooltipView.prototype._manuallyAxisShowTip = function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex; // @ts-ignore\n\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n\n if (!seriesModel) {\n return;\n }\n\n var data = seriesModel.getData();\n var tooltipCascadedModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model], this._tooltipModel);\n\n if (tooltipCascadedModel.get('trigger') !== 'axis') {\n return;\n }\n\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n };\n\n TooltipView.prototype._tryShow = function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n\n if (!tooltipModel) {\n return;\n } // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n\n\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } else if (el) {\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 } // Tooltip provided directly. Like legend.\n\n\n if (getECData(target).tooltipConfig != null) {\n cmptDispatcher_1 = target;\n return true;\n }\n }, true);\n\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\n this._hide(dispatchAction);\n }\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 = zrUtil.bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n };\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 }); // Only for legacy: `Serise['formatTooltip']` returns a string.\n\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\n if (!axisModel || axisValue == null) {\n return;\n }\n\n var axisValueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, axisItem.seriesDataIndices, axisItem.valueLabelOpt);\n var axisSectionMarkup = createTooltipMarkup('section', {\n header: axisValueLabel,\n noHeader: !zrUtil.trim(axisValueLabel),\n sortBlocks: true,\n blocks: []\n });\n articleMarkup.blocks.push(axisSectionMarkup);\n zrUtil.each(axisItem.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var cbParams = series.getDataParams(dataIndex);\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; // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n\n cbParams.marker = markupStyleCreator.makeTooltipMarker('item', formatUtil.convertToColorString(cbParams.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(series.formatTooltip(dataIndex, true, null));\n\n if (seriesTooltipResult.markupFragment) {\n axisSectionMarkup.blocks.push(seriesTooltipResult.markupFragment);\n }\n\n if (seriesTooltipResult.markupText) {\n markupTextArrLegacy.push(seriesTooltipResult.markupText);\n }\n\n cbParamsList.push(cbParams);\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\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' : '
';\n var allMarkupText = markupTextArrLegacy.join(blockBreak);\n\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys)) {\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 }); // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n\n };\n\n TooltipView.prototype._showSeriesItemTooltip = function (e, dispatcher, dispatchAction) {\n var ecModel = this._ecModel;\n var ecData = getECData(dispatcher); // 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\n var seriesIndex = ecData.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex); // For example, graph link.\n\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\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n\n var params = dataModel.getDataParams(dataIndex, dataType);\n var markupStyleCreator = new TooltipMarkupStyleCreator(); // Pre-create marker style for makers. Users can assemble richText\n // text in `formatter` callback and use those markers style.\n\n params.marker = markupStyleCreator.makeTooltipMarker('item', formatUtil.convertToColorString(params.color), renderMode);\n var seriesTooltipResult = normalizeTooltipFormatResult(dataModel.formatTooltip(dataIndex, false, dataType));\n var orderMode = tooltipModel.get('order');\n var markupText = seriesTooltipResult.markupFragment ? buildTooltipMarkup(seriesTooltipResult.markupFragment, markupStyleCreator, renderMode, orderMode, ecModel.get('useUTC'), tooltipModel.get('textStyle')) : seriesTooltipResult.markupText;\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, markupText, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markupStyleCreator);\n }); // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n\n\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n };\n\n TooltipView.prototype._showComponentItemTooltip = function (e, el, dispatchAction) {\n var ecData = getECData(el);\n var tooltipConfig = ecData.tooltipConfig;\n var tooltipOpt = tooltipConfig.option;\n\n if (zrUtil.isString(tooltipOpt)) {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n }\n\n var tooltipModelCascade = [tooltipOpt];\n\n var cmpt = this._ecModel.getComponent(ecData.componentMainType, ecData.componentIndex);\n\n if (cmpt) {\n tooltipModelCascade.push(cmpt);\n }\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() + ''; // PENDING: this case do not support richText style yet.\n\n var markupStyleCreator = new TooltipMarkupStyleCreator(); // 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\n this._showOrMove(subTooltipModel, function () {\n // Use formatterParams from element defined in component\n // Avoid users modify it.\n var formatterParams = zrUtil.clone(subTooltipModel.get('formatterParams') || {});\n\n this._showTooltipContent(subTooltipModel, defaultHtml, formatterParams, asyncTicket, e.offsetX, e.offsetY, e.position, el, markupStyleCreator);\n }); // If not dispatch showTip, tip may be hide triggered by axis.\n\n\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n };\n\n TooltipView.prototype._showTooltipContent = function ( // Use Model 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\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n\n var tooltipContent = this._tooltipContent;\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n\n var nearPoint = this._getNearestPoint([x, y], params, tooltipModel.get('trigger'), tooltipModel.get('borderColor'));\n\n var nearPointColor = nearPoint.color;\n\n if (formatter && zrUtil.isString(formatter)) {\n var useUTC = tooltipModel.ecModel.get('useUTC');\n var params0 = zrUtil.isArray(params) ? params[0] : params;\n var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;\n html = formatter;\n\n if (isTimeAxis) {\n html = timeFormat(params0.axisValue, html, useUTC);\n }\n\n html = formatUtil.formatTpl(html, params, true);\n } else if (zrUtil.isFunction(formatter)) {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n }\n\n tooltipContent.setContent(html, markupStyleCreator, tooltipModel, nearPointColor, positionExpr);\n tooltipContent.show(tooltipModel, nearPointColor);\n\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n };\n\n TooltipView.prototype._getNearestPoint = function (point, tooltipDataParams, trigger, borderColor) {\n if (trigger === 'axis' || zrUtil.isArray(tooltipDataParams)) {\n return {\n color: borderColor || (this._renderMode === 'html' ? '#fff' : 'none')\n };\n }\n\n if (!zrUtil.isArray(tooltipDataParams)) {\n return {\n color: borderColor || tooltipDataParams.color || tooltipDataParams.borderColor\n };\n }\n };\n\n TooltipView.prototype._updatePosition = function (tooltipModel, positionExpr, x, // Mouse x\n y, // Mouse y\n content, params, el) {\n var viewWidth = this._api.getWidth();\n\n var viewHeight = this._api.getHeight();\n\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\n if (zrUtil.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\n if (zrUtil.isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (zrUtil.isObject(positionExpr)) {\n var boxLayoutPosition = positionExpr;\n boxLayoutPosition.width = contentSize[0];\n boxLayoutPosition.height = contentSize[1];\n var layoutRect = layoutUtil.getLayoutRect(boxLayoutPosition, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null; // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n\n vAlign = null;\n } // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (zrUtil.isString(positionExpr) && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize);\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\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\n if (shouldTooltipConfine(tooltipModel)) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n\n content.moveTo(x, y);\n }; // FIXME\n // Should we remove this but leave this to user?\n\n\n TooltipView.prototype._updateContentNotChangedOnAxis = function (dataByCoordSys) {\n var lastCoordSys = this._lastDataByCoordSys;\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 });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n return !!contentNotChanged;\n };\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\n TooltipView.prototype.dispose = function (ecModel, api) {\n if (env.node) {\n return;\n }\n\n this._tooltipContent.dispose();\n\n globalListener.unregister('itemTooltip', api);\n };\n\n TooltipView.type = 'tooltip';\n return TooltipView;\n}(ComponentView);\n/**\n * From top to bottom. (the last one should be globalTooltipModel);\n */\n\n\nfunction buildTooltipModel(modelCascade, globalTooltipModel, defaultTooltipOption) {\n // Last is always tooltip model.\n var ecModel = globalTooltipModel.ecModel;\n var resultModel;\n\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\n for (var i = modelCascade.length - 1; i >= 0; i--) {\n var tooltipOpt = modelCascade[i];\n\n if (tooltipOpt) {\n if (tooltipOpt instanceof Model) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n } // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n\n\n if (zrUtil.isString(tooltipOpt)) {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n\n if (tooltipOpt) {\n resultModel = new Model(tooltipOpt, resultModel, ecModel);\n }\n }\n }\n\n return resultModel;\n}\n\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || zrUtil.bind(api.dispatchAction, api);\n}\n\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getOuterSize();\n var width = size.width;\n var height = size.height;\n\n if (gapH != null) {\n // Add extra 2 pixels for this case:\n // At present the \"values\" in defaut 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\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n\n return [x, y];\n}\n\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getOuterSize();\n var width = size.width;\n var height = size.height;\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}\n\nfunction calcTooltipPosition(position, rect, contentSize) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var gap = 10;\n var offset = 5;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n\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\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - gap;\n break;\n\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + gap;\n break;\n\n case 'left':\n x = rect.x - domWidth - gap - offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n\n case 'right':\n x = rect.x + rectWidth + gap + offset;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n\n return [x, y];\n}\n\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n/**\n * Find target component by payload like:\n * ```js\n * { legendId: 'some_id', name: 'xxx' }\n * { toolboxIndex: 1, name: 'xxx' }\n * { geoName: 'some_name', name: 'xxx' }\n * ```\n * PENDING: at present only\n *\n * If not found, return null/undefined.\n */\n\n\nfunction findComponentReference(payload, ecModel, api) {\n var queryOptionMap = preParseFinder(payload).queryOptionMap;\n var componentMainType = queryOptionMap.keys()[0];\n\n if (!componentMainType || componentMainType === 'series') {\n return;\n }\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\n if (!model) {\n return;\n }\n\n var view = api.getViewOfComponentModel(model);\n var el;\n view.group.traverse(function (subEl) {\n var tooltipConfig = getECData(subEl).tooltipConfig;\n\n if (tooltipConfig && tooltipConfig.name === payload.name) {\n el = subEl;\n return true; // stop\n }\n });\n\n if (el) {\n return {\n componentMainType: componentMainType,\n componentIndex: model.componentIndex,\n el: el\n };\n }\n}\n\nexport default TooltipView;","\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\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*/\nimport { install as installAxisPointer } from '../axisPointer/install';\nimport { use } from '../../extension';\nimport TooltipModel from './TooltipModel';\nimport TooltipView from './TooltipView';\nexport function install(registers) {\n use(installAxisPointer);\n registers.registerComponentModel(TooltipModel);\n registers.registerComponentView(TooltipView);\n /**\n * @action\n * @property {string} type\n * @property {number} seriesIndex\n * @property {number} dataIndex\n * @property {number} [x]\n * @property {number} [y]\n */\n\n registers.registerAction({\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n }, // noop\n function () {});\n registers.registerAction({\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n }, // noop\n function () {});\n}","\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\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*/\nimport { __extends } from \"tslib\";\nimport ComponentView from '../../view/Component';\nimport GridModel from '../../coord/cartesian/GridModel';\nimport { Rect } from '../../util/graphic';\nimport { defaults } from 'zrender/lib/core/util';\nimport { CartesianAxisModel } from '../../coord/cartesian/AxisModel';\nimport axisModelCreator from '../../coord/axisModelCreator';\nimport Grid from '../../coord/cartesian/Grid';\nimport { CartesianXAxisView, CartesianYAxisView } from '../axis/CartesianAxisView'; // Grid view\n\nvar GridView =\n/** @class */\nfunction (_super) {\n __extends(GridView, _super);\n\n function GridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = 'grid';\n return _this;\n }\n\n GridView.prototype.render = function (gridModel, ecModel) {\n this.group.removeAll();\n\n if (gridModel.get('show')) {\n this.group.add(new Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n };\n\n GridView.type = 'grid';\n return GridView;\n}(ComponentView);\n\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n offset: 0\n};\nexport function install(registers) {\n registers.registerComponentView(GridView);\n registers.registerComponentModel(GridModel);\n registers.registerCoordinateSystem('cartesian2d', Grid);\n axisModelCreator(registers, 'x', CartesianAxisModel, extraOption);\n axisModelCreator(registers, 'y', CartesianAxisModel, extraOption);\n registers.registerComponentView(CartesianXAxisView);\n registers.registerComponentView(CartesianYAxisView);\n registers.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\n }\n });\n}","\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\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*/\nimport { install as installSimple } from './installSimple';\nimport { install as installAxisPointer } from '../axisPointer/install';\nimport { use } from '../../extension';\nexport function install(registers) {\n use(installSimple);\n use(installAxisPointer);\n}"],"sourceRoot":""}