qauMaWeb/node_modules/.cache/babel-loader/99e958f783bb47e740029ec83f4...

1 line
44 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.number.constructor.js\";\nimport \"core-js/modules/es.array.map.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { makeInner } from '../../util/model.js';\nimport * as modelHelper from './modelHelper.js';\nimport findPointFromSeries from './findPointFromSeries.js';\nimport { each, curry, bind, extend } from 'zrender/lib/core/util.js';\nvar inner = makeInner();\n/**\r\n * Basic logic: check all axis, if they do not demand show/highlight,\r\n * then hide/downplay them.\r\n *\r\n * @return content of event obj for echarts.connect.\r\n */\n\nexport default function axisTrigger(payload, ecModel, api) {\n var currTrigger = payload.currTrigger;\n var point = [payload.x, payload.y];\n var finder = payload;\n var dispatchAction = payload.dispatchAction || bind(api.dispatchAction, api);\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; // Pending\n // See #6121. But we are not able to reproduce it yet.\n\n if (!coordSysAxesInfo) {\n return;\n }\n\n if (illegalPoint(point)) {\n // Used in the default behavior of `connection`: use the sample seriesIndex\n // and dataIndex. And also used in the tooltipView trigger.\n point = findPointFromSeries({\n seriesIndex: finder.seriesIndex,\n // Do not use dataIndexInside from other ec instance.\n // FIXME: auto detect it?\n dataIndex: finder.dataIndex\n }, ecModel).point;\n }\n\n var isIllegalPoint = illegalPoint(point); // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}).\n // Notice: In this case, it is difficult to get the `point` (which is necessary to show\n // tooltip, so if point is not given, we just use the point found by sample seriesIndex\n // and dataIndex.\n\n var inputAxesInfo = finder.axesInfo;\n var axesInfo = coordSysAxesInfo.axesInfo;\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\n var outputPayload = {};\n var showValueMap = {};\n var dataByCoordSys = {\n list: [],\n map: {}\n };\n var updaters = {\n showPointer: curry(showPointer, showValueMap),\n showTooltip: curry(showTooltip, dataByCoordSys)\n }; // Process for triggered axes.\n\n each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) {\n // If a point given, it must be contained by the coordinate system.\n var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point);\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\n var axis = axisInfo.axis;\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo); // If no inputAxesInfo, no axis is restricted.\n\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\n var val = inputAxisInfo && inputAxisInfo.value;\n\n if (val == null && !isIllegalPoint) {\n val = axis.pointToData(point);\n }\n\n val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload);\n }\n });\n }); // Process for linked axes.\n\n var linkTriggers = {};\n each(axesInfo, function (tarAxisInfo, tarKey) {\n var linkGroup = tarAxisInfo.linkGroup; // If axis has been triggered in the previous stage, it should not be triggered by link.\n\n if (linkGroup && !showValueMap[tarKey]) {\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\n var srcValItem = showValueMap[srcKey]; // If srcValItem exist, source axis is triggered, so link to target axis.\n\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\n var val = srcValItem.value;\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo))));\n linkTriggers[tarAxisInfo.key] = val;\n }\n });\n }\n });\n each(linkTriggers, function (val, tarKey) {\n processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload);\n });\n updateModelActually(showValueMap, axesInfo, outputPayload);\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\n dispatchHighDownActually(axesInfo, dispatchAction, api);\n return outputPayload;\n}\n\nfunction processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) {\n var axis = axisInfo.axis;\n\n if (axis.scale.isBlank() || !axis.containData(newValue)) {\n return;\n }\n\n if (!axisInfo.involveSeries) {\n updaters.showPointer(axisInfo, newValue);\n return;\n } // Heavy calculation. So put it after axis.containData checking.\n\n\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\n var payloadBatch = payloadInfo.payloadBatch;\n var snapToValue = payloadInfo.snapToValue; // Fill content of event obj for echarts.connect.\n // By default use the first involved series data as a sample to connect.\n\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\n extend(outputFinder, payloadBatch[0]);\n } // If no linkSource input, this process is for collecting link\n // target, where snap should not be accepted.\n\n\n if (!noSnap && axisInfo.snap) {\n if (axis.containData(snapToValue) && snapToValue != null) {\n newValue = snapToValue;\n }\n }\n\n updaters.showPointer(axisInfo, newValue, payloadBatch); // Tooltip should always be snapToValue, otherwise there will be\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\n\n updaters.showTooltip(axisInfo, payloadInfo, snapToValue);\n}\n\nfunction buildPayloadsBySeries(value, axisInfo) {\n var axis = axisInfo.axis;\n var dim = axis.dim;\n var snapToValue = value;\n var payloadBatch = [];\n var minDist = Number.MAX_VALUE;\n var minDiff = -1;\n each(axisInfo.seriesModels, function (series, idx) {\n var dataDim = series.getData().mapDimensionsAll(dim);\n var seriesNestestValue;\n var dataIndices;\n\n if (series.getAxisTooltipData) {\n var result = series.getAxisTooltipData(dataDim, value, axis);\n dataIndices = result.dataIndices;\n seriesNestestValue = result.nestestValue;\n } else {\n dataIndices = series.getData().indicesOfNearest(dataDim[0], value, // Add a threshold to avoid find the wrong dataIndex\n // when data length is not same.\n // false,\n axis.type === 'category' ? 0.5 : null);\n\n if (!dataIndices.length) {\n return;\n }\n\n seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]);\n }\n\n if (seriesNestestValue == null || !isFinite(seriesNestestValue)) {\n return;\n }\n\n var diff = value - seriesNestestValue;\n var dist = Math.abs(diff); // Consider category case\n\n if (dist <= minDist) {\n if (dist < minDist || diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n snapToValue = seriesNestestValue;\n payloadBatch.length = 0;\n }\n\n each(dataIndices, function (dataIndex) {\n payloadBatch.push({\n seriesIndex: series.seriesIndex,\n dataIndexInside: dataIndex,\n dataIndex: series.getData().getRawIndex(dataIndex)\n });\n });\n }\n });\n return {\n payloadBatch: payloadBatch,\n snapToValue: snapToValue\n };\n}\n\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\n showValueMap[axisInfo.key] = {\n value: value,\n payloadBatch: payloadBatch\n };\n}\n\nfunction showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) {\n var payloadBatch = payloadInfo.payloadBatch;\n var axis = axisInfo.axis;\n var axisModel = axis.model;\n var axisPointerModel = axisInfo.axisPointerModel; // If no data, do not create anything in dataByCoordSys,\n // whose length will be used to judge whether dispatch action.\n\n if (!axisInfo.triggerTooltip || !payloadBatch.length) {\n return;\n }\n\n var coordSysModel = axisInfo.coordSys.model;\n var coordSysKey = modelHelper.makeKey(coordSysModel);\n var coordSysItem = dataByCoordSys.map[coordSysKey];\n\n if (!coordSysItem) {\n coordSysItem = dataByCoordSys.map[coordSysKey] = {\n coordSysId: coordSysModel.id,\n coordSysIndex: coordSysModel.componentIndex,\n coordSysType: coordSysModel.type,\n coordSysMainType: coordSysModel.mainType,\n dataByAxis: []\n };\n dataByCoordSys.list.push(coordSysItem);\n }\n\n coordSysItem.dataByAxis.push({\n axisDim: axis.dim,\n axisIndex: axisModel.componentIndex,\n axisType: axisModel.type,\n axisId: axisModel.id,\n value: value,\n // Caustion: viewHelper.getValueLabel is actually on \"view stage\", which\n // depends that all models have been updated. So it should not be performed\n // here. Considering axisPointerModel used here is volatile, which is hard\n // to be retrieve in TooltipView, we prepare parameters here.\n valueLabelOpt: {\n precision: axisPointerModel.get(['label', 'precision']),\n formatter: axisPointerModel.get(['label', 'formatter'])\n },\n seriesDataIndices: payloadBatch.slice()\n });\n}\n\nfunction updateModelActually(showValueMap, axesInfo, outputPayload) {\n var outputAxesInfo = outputPayload.axesInfo = []; // Basic logic: If no 'show' required, 'hide' this axisPointer.\n\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n var valItem = showValueMap[key];\n\n if (valItem) {\n !axisInfo.useHandle && (option.status = 'show');\n option.value = valItem.value; // For label formatter param and highlight.\n\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\n } // When always show (e.g., handle used), remain\n // original value and status.\n else {\n // If hide, value still need to be set, consider\n // click legend to toggle axis blank.\n !axisInfo.useHandle && (option.status = 'hide');\n } // If status is 'hide', should be no info in payload.\n\n\n option.status === 'show' && outputAxesInfo.push({\n axisDim: axisInfo.axis.dim,\n axisIndex: axisInfo.axis.model.componentIndex,\n value: option.value\n });\n });\n}\n\nfunction dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) {\n // Basic logic: If no showTip required, hideTip will be dispatched.\n if (illegalPoint(point) || !dataByCoordSys.list.length) {\n dispatchAction({\n type: 'hideTip'\n });\n return;\n } // In most case only one axis (or event one series is used). It is\n // convinient to fetch payload.seriesIndex and payload.dataIndex\n // dirtectly. So put the first seriesIndex and dataIndex of the first\n // axis on the payload.\n\n\n var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\n dispatchAction({\n type: 'showTip',\n escapeConnect: true,\n x: point[0],\n y: point[1],\n tooltipOption: payload.tooltipOption,\n position: payload.position,\n dataIndexInside: sampleItem.dataIndexInside,\n dataIndex: sampleItem.dataIndex,\n seriesIndex: sampleItem.seriesIndex,\n dataByCoordSys: dataByCoordSys.list\n });\n}\n\nfunction dispatchHighDownActually(axesInfo, dispatchAction, api) {\n // FIXME\n // highlight status modification shoule be a stage of main process?\n // (Consider confilct (e.g., legend and axisPointer) and setOption)\n var zr = api.getZr();\n var highDownKey = 'axisPointerLastHighlights';\n var lastHighlights = inner(zr)[highDownKey] || {};\n var newHighlights = inner(zr)[highDownKey] = {}; // Update highlight/downplay status according to axisPointer model.\n // Build hash map and remove duplicate incidentally.\n\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n option.status === 'show' && each(option.seriesDataIndices, function (batchItem) {\n var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex;\n newHighlights[key] = batchItem;\n });\n }); // Diff.\n\n var toHighlight = [];\n var toDownplay = [];\n each(lastHighlights, function (batchItem, key) {\n !newHighlights[key] && toDownplay.push(batchItem);\n });\n each(newHighlights, function (batchItem, key) {\n !lastHighlights[key] && toHighlight.push(batchItem);\n });\n toDownplay.length && api.dispatchAction({\n type: 'downplay',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toDownplay\n });\n toHighlight.length && api.dispatchAction({\n type: 'highlight',\n escapeConnect: true,\n // Not blur others when highlight in axisPointer.\n notBlur: true,\n batch: toHighlight\n });\n}\n\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\n var inputAxisInfo = inputAxesInfo[i];\n\n if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) {\n return inputAxisInfo;\n }\n }\n}\n\nfunction makeMapperParam(axisInfo) {\n var axisModel = axisInfo.axis.model;\n var item = {};\n var dim = item.axisDim = axisInfo.axis.dim;\n item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex;\n item.axisName = item[dim + 'AxisName'] = axisModel.name;\n item.axisId = item[dim + 'AxisId'] = axisModel.id;\n return item;\n}\n\nfunction illegalPoint(point) {\n return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]);\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/axisPointer/axisTrigger.js"],"names":["makeInner","modelHelper","findPointFromSeries","each","curry","bind","extend","inner","axisTrigger","payload","ecModel","api","currTrigger","point","x","y","finder","dispatchAction","coordSysAxesInfo","getComponent","illegalPoint","seriesIndex","dataIndex","isIllegalPoint","inputAxesInfo","axesInfo","shouldHide","outputPayload","showValueMap","dataByCoordSys","list","map","updaters","showPointer","showTooltip","coordSysMap","coordSys","coordSysKey","coordSysContainsPoint","containPoint","axisInfo","key","axis","inputAxisInfo","findInputAxisInfo","val","value","pointToData","processOnAxis","linkTriggers","tarAxisInfo","tarKey","linkGroup","srcAxisInfo","srcKey","srcValItem","mapper","scale","parse","makeMapperParam","updateModelActually","dispatchTooltipActually","dispatchHighDownActually","newValue","noSnap","outputFinder","isBlank","containData","involveSeries","payloadInfo","buildPayloadsBySeries","payloadBatch","snapToValue","snap","dim","minDist","Number","MAX_VALUE","minDiff","seriesModels","series","idx","dataDim","getData","mapDimensionsAll","seriesNestestValue","dataIndices","getAxisTooltipData","result","nestestValue","indicesOfNearest","type","length","get","isFinite","diff","dist","Math","abs","push","dataIndexInside","getRawIndex","axisModel","model","axisPointerModel","triggerTooltip","coordSysModel","makeKey","coordSysItem","coordSysId","id","coordSysIndex","componentIndex","coordSysType","coordSysMainType","mainType","dataByAxis","axisDim","axisIndex","axisType","axisId","valueLabelOpt","precision","formatter","seriesDataIndices","slice","outputAxesInfo","option","valItem","useHandle","status","sampleItem","escapeConnect","tooltipOption","position","zr","getZr","highDownKey","lastHighlights","newHighlights","batchItem","toHighlight","toDownplay","notBlur","batch","i","item","axisName","name","isNaN"],"mappings":";;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,qBAA1B;AACA,OAAO,KAAKC,WAAZ,MAA6B,kBAA7B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,SAASC,IAAT,EAAeC,KAAf,EAAsBC,IAAtB,EAA4BC,MAA5B,QAA0C,0BAA1C;AACA,IAAIC,KAAK,GAAGP,SAAS,EAArB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAASQ,WAAT,CAAqBC,OAArB,EAA8BC,OAA9B,EAAuCC,GAAvC,EAA4C;AACzD,MAAIC,WAAW,GAAGH,OAAO,CAACG,WAA1B;AACA,MAAIC,KAAK,GAAG,CAACJ,OAAO,CAACK,CAAT,EAAYL,OAAO,CAACM,CAApB,CAAZ;AACA,MAAIC,MAAM,GAAGP,OAAb;AACA,MAAIQ,cAAc,GAAGR,OAAO,CAACQ,cAAR,IAA0BZ,IAAI,CAACM,GAAG,CAACM,cAAL,EAAqBN,GAArB,CAAnD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AAC,EAAnD,EAAuD;AACrD,QAAItG,aAAa,GAAGnB,aAAa,CAACyH,CAAD,CAAjC;;AAEA,QAAIzG,QAAQ,CAACE,IAAT,CAAcgC,GAAd,KAAsB/B,aAAa,CAAC0E,OAApC,IAA+C7E,QAAQ,CAACE,IAAT,CAAc6D,KAAd,CAAoBS,cAApB,KAAuCrE,aAAa,CAAC2E,SAAxG,EAAmH;AACjH,aAAO3E,aAAP;AACD;AACF;AACF;;AAED,SAASgB,eAAT,CAAyBnB,QAAzB,EAAmC;AACjC,MAAI8D,SAAS,GAAG9D,QAAQ,CAACE,IAAT,CAAc6D,KAA9B;AACA,MAAI2C,IAAI,GAAG,EAAX;AACA,MAAIxE,GAAG,GAAGwE,IAAI,CAAC7B,OAAL,GAAe7E,QAAQ,CAACE,IAAT,CAAcgC,GAAvC;AACAwE,EAAAA,IAAI,CAAC5B,SAAL,GAAiB4B,IAAI,CAACxE,GAAG,GAAG,WAAP,CAAJ,GAA0B4B,SAAS,CAACU,cAArD;AACAkC,EAAAA,IAAI,CAACC,QAAL,GAAgBD,IAAI,CAACxE,GAAG,GAAG,UAAP,CAAJ,GAAyB4B,SAAS,CAAC8C,IAAnD;AACAF,EAAAA,IAAI,CAAC1B,MAAL,GAAc0B,IAAI,CAACxE,GAAG,GAAG,QAAP,CAAJ,GAAuB4B,SAAS,CAACQ,EAA/C;AACA,SAAOoC,IAAP;AACD;;AAED,SAAS9H,YAAT,CAAsBP,KAAtB,EAA6B;AAC3B,SAAO,CAACA,KAAD,IAAUA,KAAK,CAAC,CAAD,CAAL,IAAY,IAAtB,IAA8BwI,KAAK,CAACxI,KAAK,CAAC,CAAD,CAAN,CAAnC,IAAiDA,KAAK,CAAC,CAAD,CAAL,IAAY,IAA7D,IAAqEwI,KAAK,CAACxI,KAAK,CAAC,CAAD,CAAN,CAAjF;AACD","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\nimport { makeInner } from '../../util/model.js';\r\nimport * as modelHelper from './modelHelper.js';\r\nimport findPointFromSeries from './findPointFromSeries.js';\r\nimport { each, curry, bind, extend } from 'zrender/lib/core/util.js';\r\nvar inner = makeInner();\r\n/**\r\n * Basic logic: check all axis, if they do not demand show/highlight,\r\n * then hide/downplay them.\r\n *\r\n * @return content of event obj for echarts.connect.\r\n */\r\n\r\nexport default function axisTrigger(payload, ecModel, api) {\r\n var currTrigger = payload.currTrigger;\r\n var point = [payload.x, payload.y];\r\n var finder = payload;\r\n var dispatchAction = payload.dispatchAction || bind(api.dispatchAction, api);\r\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; // Pending\r\n // See #6121. But we are not able to reproduce it yet.\r\n\r\n if (!coordSysAxesInfo) {\r\n return;\r\n }\r\n\r\n if (illegalPoint(point)) {\r\n // Used in the default behavior of `connection`: use the sample seriesIndex\r\n // and dataIndex. And also used in the tooltipView trigger.\r\n point = findPointFromSeries({\r\n seriesIndex: finder.seriesIndex,\r\n // Do not use dataIndexInside from other ec instance.\r\n // FIXME: auto detect it?\r\n dataIndex: finder.dataIndex\r\n }, ecModel).point;\r\n }\r\n\r\n var isIllegalPoint = illegalPoint(point); // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}).\r\n // Notice: In this case, it is difficult to get the `point` (which is necessary to show\r\n // tooltip, so if point is not given, we just use the point found by sample seriesIndex\r\n // and dataIndex.\r\n\r\n var inputAxesInfo = finder.axesInfo;\r\n var axesInfo = coordSysAxesInfo.axesInfo;\r\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\r\n var outputPayload = {};\r\n var showValueMap = {};\r\n var dataByCoordSys = {\r\n list: [],\r\n map: {}\r\n };\r\n var updaters = {\r\n showPointer: curry(showPointer, showValueMap),\r\n showTooltip: curry(showTooltip, dataByCoordSys)\r\n }; // Process for triggered axes.\r\n\r\n each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) {\r\n // If a point given, it must be contained by the coordinate system.\r\n var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point);\r\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\r\n var axis = axisInfo.axis;\r\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo); // If no inputAxesInfo, no axis is restricted.\r\n\r\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\r\n var val = inputAxisInfo && inputAxisInfo.value;\r\n\r\n if (val == null && !isIllegalPoint) {\r\n val = axis.pointToData(point);\r\n }\r\n\r\n val != null && processOnAxis(axisInfo, val, updaters, false, outputPayload);\r\n }\r\n });\r\n }); // Process for linked axes.\r\n\r\n var linkTriggers = {};\r\n each(axesInfo, function (tarAxisInfo, tarKey) {\r\n var linkGroup = tarAxisInfo.linkGroup; // If axis has been triggered in the previous stage, it should not be triggered by link.\r\n\r\n if (linkGroup && !showValueMap[tarKey]) {\r\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\r\n var srcValItem = showValueMap[srcKey]; // If srcValItem exist, source axis is triggered, so link to target axis.\r\n\r\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\r\n var val = srcValItem.value;\r\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo))));\r\n linkTriggers[tarAxisInfo.key] = val;\r\n }\r\n });\r\n }\r\n });\r\n each(linkTriggers, function (val, tarKey) {\r\n processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload);\r\n });\r\n updateModelActually(showValueMap, axesInfo, outputPayload);\r\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\r\n dispatchHighDownActually(axesInfo, dispatchAction, api);\r\n return outputPayload;\r\n}\r\n\r\nfunction processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) {\r\n var axis = axisInfo.axis;\r\n\r\n if (axis.scale.isBlank() || !axis.containData(newValue)) {\r\n return;\r\n }\r\n\r\n if (!axisInfo.involveSeries) {\r\n updaters.showPointer(axisInfo, newValue);\r\n return;\r\n } // Heavy calculation. So put it after axis.containData checking.\r\n\r\n\r\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\r\n var payloadBatch = payloadInfo.payloadBatch;\r\n var snapToValue = payloadInfo.snapToValue; // Fill content of event obj for echarts.connect.\r\n // By default use the first involved series data as a sample to connect.\r\n\r\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\r\n extend(outputFinder, payloadBatch[0]);\r\n } // If no linkSource input, this process is for collecting link\r\n // target, where snap should not be accepted.\r\n\r\n\r\n if (!noSnap && axisInfo.snap) {\r\n if (axis.containData(snapToValue) && snapToValue != null) {\r\n newValue = snapToValue;\r\n }\r\n }\r\n\r\n updaters.showPointer(axisInfo, newValue, payloadBatch); // Tooltip should always be snapToValue, otherwise there will be\r\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\r\n\r\n updaters.showTooltip(axisInfo, payloadInfo, snapToValue);\r\n}\r\n\r\nfunction buildPayloadsBySeries(value, axisInfo) {\r\n var axis = axisInfo.axis;\r\n var dim = axis.dim;\r\n var snapToValue = value;\r\n var payloadBatch = [];\r\n var minDist = Number.MAX_VALUE;\r\n var minDiff = -1;\r\n each(axisInfo.seriesModels, function (series, idx) {\r\n var dataDim = series.getData().mapDimensionsAll(dim);\r\n var seriesNestestValue;\r\n var dataIndices;\r\n\r\n if (series.getAxisTooltipData) {\r\n var result = series.getAxisTooltipData(dataDim, value, axis);\r\n dataIndices = result.dataIndices;\r\n seriesNestestValue = result.nestestValue;\r\n } else {\r\n dataIndices = series.getData().indicesOfNearest(dataDim[0], value, // Add a threshold to avoid find the wrong dataIndex\r\n // when data length is not same.\r\n // false,\r\n axis.type === 'category' ? 0.5 : null);\r\n\r\n if (!dataIndices.length) {\r\n return;\r\n }\r\n\r\n seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]);\r\n }\r\n\r\n if (seriesNestestValue == null || !isFinite(seriesNestestValue)) {\r\n return;\r\n }\r\n\r\n var diff = value - seriesNestestValue;\r\n var dist = Math.abs(diff); // Consider category case\r\n\r\n if (dist <= minDist) {\r\n if (dist < minDist || diff >= 0 && minDiff < 0) {\r\n minDist = dist;\r\n minDiff = diff;\r\n snapToValue = seriesNestestValue;\r\n payloadBatch.length = 0;\r\n }\r\n\r\n each(dataIndices, function (dataIndex) {\r\n payloadBatch.push({\r\n seriesIndex: series.seriesIndex,\r\n dataIndexInside: dataIndex,\r\n dataIndex: series.getData().getRawIndex(dataIndex)\r\n });\r\n });\r\n }\r\n });\r\n return {\r\n payloadBatch: payloadBatch,\r\n snapToValue: snapToValue\r\n };\r\n}\r\n\r\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\r\n showValueMap[axisInfo.key] = {\r\n value: value,\r\n payloadBatch: payloadBatch\r\n };\r\n}\r\n\r\nfunction showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) {\r\n var payloadBatch = payloadInfo.payloadBatch;\r\n var axis = axisInfo.axis;\r\n var axisModel = axis.model;\r\n var axisPointerModel = axisInfo.axisPointerModel; // If no data, do not create anything in dataByCoordSys,\r\n // whose length will be used to judge whether dispatch action.\r\n\r\n if (!axisInfo.triggerTooltip || !payloadBatch.length) {\r\n return;\r\n }\r\n\r\n var coordSysModel = axisInfo.coordSys.model;\r\n var coordSysKey = modelHelper.makeKey(coordSysModel);\r\n var coordSysItem = dataByCoordSys.map[coordSysKey];\r\n\r\n if (!coordSysItem) {\r\n coordSysItem = dataByCoordSys.map[coordSysKey] = {\r\n coordSysId: coordSysModel.id,\r\n coordSysIndex: coordSysModel.componentIndex,\r\n coordSysType: coordSysModel.type,\r\n coordSysMainType: coordSysModel.mainType,\r\n dataByAxis: []\r\n };\r\n dataByCoordSys.list.push(coordSysItem);\r\n }\r\n\r\n coordSysItem.dataByAxis.push({\r\n axisDim: axis.dim,\r\n axisIndex: axisModel.componentIndex,\r\n axisType: axisModel.type,\r\n axisId: axisModel.id,\r\n value: value,\r\n // Caustion: viewHelper.getValueLabel is actually on \"view stage\", which\r\n // depends that all models have been updated. So it should not be performed\r\n // here. Considering axisPointerModel used here is volatile, which is hard\r\n // to be retrieve in TooltipView, we prepare parameters here.\r\n valueLabelOpt: {\r\n precision: axisPointerModel.get(['label', 'precision']),\r\n formatter: axisPointerModel.get(['label', 'formatter'])\r\n },\r\n seriesDataIndices: payloadBatch.slice()\r\n });\r\n}\r\n\r\nfunction updateModelActually(showValueMap, axesInfo, outputPayload) {\r\n var outputAxesInfo = outputPayload.axesInfo = []; // Basic logic: If no 'show' required, 'hide' this axisPointer.\r\n\r\n each(axesInfo, function (axisInfo, key) {\r\n var option = axisInfo.axisPointerModel.option;\r\n var valItem = showValueMap[key];\r\n\r\n if (valItem) {\r\n !axisInfo.useHandle && (option.status = 'show');\r\n option.value = valItem.value; // For label formatter param and highlight.\r\n\r\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\r\n } // When always show (e.g., handle used), remain\r\n // original value and status.\r\n else {\r\n // If hide, value still need to be set, consider\r\n // click legend to toggle axis blank.\r\n !axisInfo.useHandle && (option.status = 'hide');\r\n } // If status is 'hide', should be no info in payload.\r\n\r\n\r\n option.status === 'show' && outputAxesInfo.push({\r\n axisDim: axisInfo.axis.dim,\r\n axisIndex: axisInfo.axis.model.componentIndex,\r\n value: option.value\r\n });\r\n });\r\n}\r\n\r\nfunction dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) {\r\n // Basic logic: If no showTip required, hideTip will be dispatched.\r\n if (illegalPoint(point) || !dataByCoordSys.list.length) {\r\n dispatchAction({\r\n type: 'hideTip'\r\n });\r\n return;\r\n } // In most case only one axis (or event one series is used). It is\r\n // convinient to fetch payload.seriesIndex and payload.dataIndex\r\n // dirtectly. So put the first seriesIndex and dataIndex of the first\r\n // axis on the payload.\r\n\r\n\r\n var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\r\n dispatchAction({\r\n type: 'showTip',\r\n escapeConnect: true,\r\n x: point[0],\r\n y: point[1],\r\n tooltipOption: payload.tooltipOption,\r\n position: payload.position,\r\n dataIndexInside: sampleItem.dataIndexInside,\r\n dataIndex: sampleItem.dataIndex,\r\n seriesIndex: sampleItem.seriesIndex,\r\n dataByCoordSys: dataByCoordSys.list\r\n });\r\n}\r\n\r\nfunction dispatchHighDownActually(axesInfo, dispatchAction, api) {\r\n // FIXME\r\n // highlight status modification shoule be a stage of main process?\r\n // (Consider confilct (e.g., legend and axisPointer) and setOption)\r\n var zr = api.getZr();\r\n var highDownKey = 'axisPointerLastHighlights';\r\n var lastHighlights = inner(zr)[highDownKey] || {};\r\n var newHighlights = inner(zr)[highDownKey] = {}; // Update highlight/downplay status according to axisPointer model.\r\n // Build hash map and remove duplicate incidentally.\r\n\r\n each(axesInfo, function (axisInfo, key) {\r\n var option = axisInfo.axisPointerModel.option;\r\n option.status === 'show' && each(option.seriesDataIndices, function (batchItem) {\r\n var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex;\r\n newHighlights[key] = batchItem;\r\n });\r\n }); // Diff.\r\n\r\n var toHighlight = [];\r\n var toDownplay = [];\r\n each(lastHighlights, function (batchItem, key) {\r\n !newHighlights[key] && toDownplay.push(batchItem);\r\n });\r\n each(newHighlights, function (batchItem, key) {\r\n !lastHighlights[key] && toHighlight.push(batchItem);\r\n });\r\n toDownplay.length && api.dispatchAction({\r\n type: 'downplay',\r\n escapeConnect: true,\r\n // Not blur others when highlight in axisPointer.\r\n notBlur: true,\r\n batch: toDownplay\r\n });\r\n toHighlight.length && api.dispatchAction({\r\n type: 'highlight',\r\n escapeConnect: true,\r\n // Not blur others when highlight in axisPointer.\r\n notBlur: true,\r\n batch: toHighlight\r\n });\r\n}\r\n\r\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\r\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\r\n var inputAxisInfo = inputAxesInfo[i];\r\n\r\n if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) {\r\n return inputAxisInfo;\r\n }\r\n }\r\n}\r\n\r\nfunction makeMapperParam(axisInfo) {\r\n var axisModel = axisInfo.axis.model;\r\n var item = {};\r\n var dim = item.axisDim = axisInfo.axis.dim;\r\n item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex;\r\n item.axisName = item[dim + 'AxisName'] = axisModel.name;\r\n item.axisId = item[dim + 'AxisId'] = axisModel.id;\r\n return item;\r\n}\r\n\r\nfunction illegalPoint(point) {\r\n return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]);\r\n}"]},"metadata":{},"sourceType":"module"}