qauMaWeb/node_modules/.cache/babel-loader/8a3cfd27fa47c5686d5241ae61e...

1 line
49 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.slice.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*/\n\n/**\r\n * Parallel Coordinates\r\n * <https://en.wikipedia.org/wiki/Parallel_coordinates>\r\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport * as axisHelper from '../../coord/axisHelper.js';\nimport ParallelAxis from './ParallelAxis.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as numberUtil from '../../util/number.js';\nimport sliderMove from '../../component/helper/sliderMove.js';\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathFloor = Math.floor;\nvar mathCeil = Math.ceil;\nvar round = numberUtil.round;\nvar PI = Math.PI;\n\nvar Parallel =\n/** @class */\nfunction () {\n function Parallel(parallelModel, ecModel, api) {\n this.type = 'parallel';\n /**\r\n * key: dimension\r\n */\n\n this._axesMap = zrUtil.createHashMap();\n /**\r\n * key: dimension\r\n * value: {position: [], rotation, }\r\n */\n\n this._axesLayout = {};\n this.dimensions = parallelModel.dimensions;\n this._model = parallelModel;\n\n this._init(parallelModel, ecModel, api);\n }\n\n Parallel.prototype._init = function (parallelModel, ecModel, api) {\n var dimensions = parallelModel.dimensions;\n var parallelAxisIndex = parallelModel.parallelAxisIndex;\n each(dimensions, function (dim, idx) {\n var axisIndex = parallelAxisIndex[idx];\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n\n var axis = this._axesMap.set(dim, new ParallelAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisIndex));\n\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse'); // Injection\n\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = axisModel.coordinateSystem = this;\n }, this);\n };\n /**\r\n * Update axis scale after data processed\r\n */\n\n\n Parallel.prototype.update = function (ecModel, api) {\n this._updateAxesFromSeries(this._model, ecModel);\n };\n\n Parallel.prototype.containPoint = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n\n var axisBase = layoutInfo.axisBase;\n var layoutBase = layoutInfo.layoutBase;\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var pAxis = point[1 - pixelDimIndex];\n var pLayout = point[pixelDimIndex];\n return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength;\n };\n\n Parallel.prototype.getModel = function () {\n return this._model;\n };\n /**\r\n * Update properties from series\r\n */\n\n\n Parallel.prototype._updateAxesFromSeries = function (parallelModel, ecModel) {\n ecModel.eachSeries(function (seriesModel) {\n if (!parallelModel.contains(seriesModel, ecModel)) {\n return;\n }\n\n var data = seriesModel.getData();\n each(this.dimensions, function (dim) {\n var axis = this._axesMap.get(dim);\n\n axis.scale.unionExtentFromData(data, data.mapDimension(dim));\n axisHelper.niceScaleExtent(axis.scale, axis.model);\n }, this);\n }, this);\n };\n /**\r\n * Resize the parallel coordinate system.\r\n */\n\n\n Parallel.prototype.resize = function (parallelModel, api) {\n this._rect = layoutUtil.getLayoutRect(parallelModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n\n this._layoutAxes();\n };\n\n Parallel.prototype.getRect = function () {\n return this._rect;\n };\n\n Parallel.prototype._makeLayoutInfo = function () {\n var parallelModel = this._model;\n var rect = this._rect;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var layout = parallelModel.get('layout');\n var pixelDimIndex = layout === 'horizontal' ? 0 : 1;\n var layoutLength = rect[wh[pixelDimIndex]];\n var layoutExtent = [0, layoutLength];\n var axisCount = this.dimensions.length;\n var axisExpandWidth = restrict(parallelModel.get('axisExpandWidth'), layoutExtent);\n var axisExpandCount = restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]);\n var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0; // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength],\n // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow),\n // where collapsed axes should be overlapped.\n\n var axisExpandWindow = parallelModel.get('axisExpandWindow');\n var winSize;\n\n if (!axisExpandWindow) {\n winSize = restrict(axisExpandWidth * (axisExpandCount - 1), layoutExtent);\n var axisExpandCenter = parallelModel.get('axisExpandCenter') || mathFloor(axisCount / 2);\n axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2];\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n } else {\n winSize = restrict(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent);\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n }\n\n var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount); // Avoid axisCollapseWidth is too small.\n\n axisCollapseWidth < 3 && (axisCollapseWidth = 0); // Find the first and last indices > ewin[0] and < ewin[1].\n\n var winInnerIndices = [mathFloor(round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, mathCeil(round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1]; // Pos in ec coordinates.\n\n var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];\n return {\n layout: layout,\n pixelDimIndex: pixelDimIndex,\n layoutBase: rect[xy[pixelDimIndex]],\n layoutLength: layoutLength,\n axisBase: rect[xy[1 - pixelDimIndex]],\n axisLength: rect[wh[1 - pixelDimIndex]],\n axisExpandable: axisExpandable,\n axisExpandWidth: axisExpandWidth,\n axisCollapseWidth: axisCollapseWidth,\n axisExpandWindow: axisExpandWindow,\n axisCount: axisCount,\n winInnerIndices: winInnerIndices,\n axisExpandWindow0Pos: axisExpandWindow0Pos\n };\n };\n\n Parallel.prototype._layoutAxes = function () {\n var rect = this._rect;\n var axes = this._axesMap;\n var dimensions = this.dimensions;\n\n var layoutInfo = this._makeLayoutInfo();\n\n var layout = layoutInfo.layout;\n axes.each(function (axis) {\n var axisExtent = [0, layoutInfo.axisLength];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(axisExtent[idx], axisExtent[1 - idx]);\n });\n each(dimensions, function (dim, idx) {\n var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo);\n var positionTable = {\n horizontal: {\n x: posInfo.position,\n y: layoutInfo.axisLength\n },\n vertical: {\n x: 0,\n y: posInfo.position\n }\n };\n var rotationTable = {\n horizontal: PI / 2,\n vertical: 0\n };\n var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y];\n var rotation = rotationTable[layout];\n var transform = matrix.create();\n matrix.rotate(transform, transform, rotation);\n matrix.translate(transform, transform, position); // TODO\n // tick layout info\n // TODO\n // update dimensions info based on axis order.\n\n this._axesLayout[dim] = {\n position: position,\n rotation: rotation,\n transform: transform,\n axisNameAvailableWidth: posInfo.axisNameAvailableWidth,\n axisLabelShow: posInfo.axisLabelShow,\n nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth,\n tickDirection: 1,\n labelDirection: 1\n };\n }, this);\n };\n /**\r\n * Get axis by dim.\r\n */\n\n\n Parallel.prototype.getAxis = function (dim) {\n return this._axesMap.get(dim);\n };\n /**\r\n * Convert a dim value of a single item of series data to Point.\r\n */\n\n\n Parallel.prototype.dataToPoint = function (value, dim) {\n return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim);\n };\n /**\r\n * Travel data for one time, get activeState of each data item.\r\n * @param start the start dataIndex that travel from.\r\n * @param end the next dataIndex of the last dataIndex will be travel.\r\n */\n\n\n Parallel.prototype.eachActiveState = function (data, callback, start, end) {\n start == null && (start = 0);\n end == null && (end = data.count());\n var axesMap = this._axesMap;\n var dimensions = this.dimensions;\n var dataDimensions = [];\n var axisModels = [];\n zrUtil.each(dimensions, function (axisDim) {\n dataDimensions.push(data.mapDimension(axisDim));\n axisModels.push(axesMap.get(axisDim).model);\n });\n var hasActiveSet = this.hasAxisBrushed();\n\n for (var dataIndex = start; dataIndex < end; dataIndex++) {\n var activeState = void 0;\n\n if (!hasActiveSet) {\n activeState = 'normal';\n } else {\n activeState = 'active';\n var values = data.getValues(dataDimensions, dataIndex);\n\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n var state = axisModels[j].getActiveState(values[j]);\n\n if (state === 'inactive') {\n activeState = 'inactive';\n break;\n }\n }\n }\n\n callback(activeState, dataIndex);\n }\n };\n /**\r\n * Whether has any activeSet.\r\n */\n\n\n Parallel.prototype.hasAxisBrushed = function () {\n var dimensions = this.dimensions;\n var axesMap = this._axesMap;\n var hasActiveSet = false;\n\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') {\n hasActiveSet = true;\n }\n }\n\n return hasActiveSet;\n };\n /**\r\n * Convert coords of each axis to Point.\r\n * Return point. For example: [10, 20]\r\n */\n\n\n Parallel.prototype.axisCoordToPoint = function (coord, dim) {\n var axisLayout = this._axesLayout[dim];\n return graphic.applyTransform([coord, 0], axisLayout.transform);\n };\n /**\r\n * Get axis layout.\r\n */\n\n\n Parallel.prototype.getAxisLayout = function (dim) {\n return zrUtil.clone(this._axesLayout[dim]);\n };\n /**\r\n * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.\r\n */\n\n\n Parallel.prototype.getSlidedAxisExpandWindow = function (point) {\n var layoutInfo = this._makeLayoutInfo();\n\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var axisExpandWindow = layoutInfo.axisExpandWindow.slice();\n var winSize = axisExpandWindow[1] - axisExpandWindow[0];\n var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)]; // Out of the area of coordinate system.\n\n if (!this.containPoint(point)) {\n return {\n behavior: 'none',\n axisExpandWindow: axisExpandWindow\n };\n } // Conver the point from global to expand coordinates.\n\n\n var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos; // For dragging operation convenience, the window should not be\n // slided when mouse is the center area of the window.\n\n var delta;\n var behavior = 'slide';\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n\n var triggerArea = this._model.get('axisExpandSlideTriggerArea'); // But consider touch device, jump is necessary.\n\n\n var useJump = triggerArea[0] != null;\n\n if (axisCollapseWidth) {\n if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) {\n behavior = 'jump';\n delta = pointCoord - winSize * triggerArea[2];\n } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) {\n behavior = 'jump';\n delta = pointCoord - winSize * (1 - triggerArea[2]);\n } else {\n (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0);\n }\n\n delta *= layoutInfo.axisExpandWidth / axisCollapseWidth;\n delta ? sliderMove(delta, axisExpandWindow, extent, 'all') // Avoid nonsense triger on mousemove.\n : behavior = 'none';\n } // When screen is too narrow, make it visible and slidable, although it is hard to interact.\n else {\n var winSize2 = axisExpandWindow[1] - axisExpandWindow[0];\n var pos = extent[1] * pointCoord / winSize2;\n axisExpandWindow = [mathMax(0, pos - winSize2 / 2)];\n axisExpandWindow[1] = mathMin(extent[1], axisExpandWindow[0] + winSize2);\n axisExpandWindow[0] = axisExpandWindow[1] - winSize2;\n }\n\n return {\n axisExpandWindow: axisExpandWindow,\n behavior: behavior\n };\n };\n\n return Parallel;\n}();\n\nfunction restrict(len, extent) {\n return mathMin(mathMax(len, extent[0]), extent[1]);\n}\n\nfunction layoutAxisWithoutExpand(axisIndex, layoutInfo) {\n var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1);\n return {\n position: step * axisIndex,\n axisNameAvailableWidth: step,\n axisLabelShow: true\n };\n}\n\nfunction layoutAxisWithExpand(axisIndex, layoutInfo) {\n var layoutLength = layoutInfo.layoutLength;\n var axisExpandWidth = layoutInfo.axisExpandWidth;\n var axisCount = layoutInfo.axisCount;\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var winInnerIndices = layoutInfo.winInnerIndices;\n var position;\n var axisNameAvailableWidth = axisCollapseWidth;\n var axisLabelShow = false;\n var nameTruncateMaxWidth;\n\n if (axisIndex < winInnerIndices[0]) {\n position = axisIndex * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n } else if (axisIndex <= winInnerIndices[1]) {\n position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0];\n axisNameAvailableWidth = axisExpandWidth;\n axisLabelShow = true;\n } else {\n position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n }\n\n return {\n position: position,\n axisNameAvailableWidth: axisNameAvailableWidth,\n axisLabelShow: axisLabelShow,\n nameTruncateMaxWidth: nameTruncateMaxWidth\n };\n}\n\nexport default Parallel;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/coord/parallel/Parallel.js"],"names":["zrUtil","matrix","layoutUtil","axisHelper","ParallelAxis","graphic","numberUtil","sliderMove","each","mathMin","Math","min","mathMax","max","mathFloor","floor","mathCeil","ceil","round","PI","Parallel","parallelModel","ecModel","api","type","_axesMap","createHashMap","_axesLayout","dimensions","_model","_init","prototype","parallelAxisIndex","dim","idx","axisIndex","axisModel","getComponent","axis","set","createScaleByModel","get","isCategory","onBand","inverse","model","coordinateSystem","update","_updateAxesFromSeries","containPoint","point","layoutInfo","_makeLayoutInfo","axisBase","layoutBase","pixelDimIndex","pAxis","pLayout","axisLength","layoutLength","getModel","eachSeries","seriesModel","contains","data","getData","scale","unionExtentFromData","mapDimension","niceScaleExtent","resize","_rect","getLayoutRect","getBoxLayoutParams","width","getWidth","height","getHeight","_layoutAxes","getRect","rect","xy","wh","layout","layoutExtent","axisCount","length","axisExpandWidth","restrict","axisExpandCount","axisExpandable","axisExpandWindow","winSize","axisExpandCenter","axisCollapseWidth","winInnerIndices","axisExpandWindow0Pos","axes","axisExtent","setExtent","posInfo","layoutAxisWithExpand","layoutAxisWithoutExpand","positionTable","horizontal","x","position","y","vertical","rotationTable","rotation","transform","create","rotate","translate","axisNameAvailableWidth","axisLabelShow","nameTruncateMaxWidth","tickDirection","labelDirection","getAxis","dataToPoint","value","axisCoordToPoint","dataToCoord","eachActiveState","callback","start","end","count","axesMap","dataDimensions","axisModels","axisDim","push","hasActiveSet","hasAxisBrushed","dataIndex","activeState","values","getValues","j","lenj","state","getActiveState","coord","axisLayout","applyTransform","getAxisLayout","clone","getSlidedAxisExpandWindow","slice","extent","behavior","pointCoord","delta","triggerArea","useJump","winSize2","pos","len","step"],"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;;AAEA;AACA;AACA;AACA;AACA,OAAO,KAAKA,MAAZ,MAAwB,0BAAxB;AACA,OAAO,KAAKC,MAAZ,MAAwB,4BAAxB;AACA,OAAO,KAAKC,UAAZ,MAA4B,sBAA5B;AACA,OAAO,KAAKC,UAAZ,MAA4B,2BAA5B;AACA,OAAOC,YAAP,MAAyB,mBAAzB;AACA,OAAO,KAAKC,OAAZ,MAAyB,uBAAzB;AACA,OAAO,KAAKC,UAAZ,MAA4B,sBAA5B;AACA,OAAOC,UAAP,MAAuB,sCAAvB;AACA,IAAIC,IAAI,GAAGR,MAAM,CAACQ,IAAlB;AACA,IAAIC,OAAO,GAAGC,IAAI,CAACC,GAAnB;AACA,IAAIC,OAAO,GAAGF,IAAI,CAACG,GAAnB;AACA,IAAIC,SAAS,GAAGJ,IAAI,CAACK,KAArB;AACA,IAAIC,QAAQ,GAAGN,IAAI,CAACO,IAApB;AACA,IAAIC,KAAK,GAAGZ,UAAU,CAACY,KAAvB;AACA,IAAIC,EAAE,GAAGT,IAAI,CAACS,EAAd;;AAEA,IAAIC,QAAQ;AACZ;AACA,YAAY;AACV,WAASA,QAAT,CAAkBC,aAAlB,EAAiCC,OAAjC,EAA0CC,GAA1C,EAA+C;AAC7C,SAAKC,IAAL,GAAY,UAAZ;AACA;AACJ;AACA;;AAEI,SAAKC,QAAL,GAAgBzB,MAAM,CAAC0B,aAAP,EAAhB;AACA;AACJ;AACA;AACA;;AAEI,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,eAAjC;AACA,MAAIF,SAAS,GAAGlC,UAAU,CAACkC,SAA3B;AACA,MAAIS,iBAAiB,GAAG3C,UAAU,CAAC2C,iBAAnC;AACA,MAAIC,eAAe,GAAG5C,UAAU,CAAC4C,eAAjC;AACA,MAAIW,QAAJ;AACA,MAAIS,sBAAsB,GAAGrB,iBAA7B;AACA,MAAIsB,aAAa,GAAG,KAApB;AACA,MAAIC,oBAAJ;;AAEA,MAAIlF,SAAS,GAAG4D,eAAe,CAAC,CAAD,CAA/B,EAAoC;AAClCW,IAAAA,QAAQ,GAAGvE,SAAS,GAAG2D,iBAAvB;AACAuB,IAAAA,oBAAoB,GAAGvB,iBAAvB;AACD,GAHD,MAGO,IAAI3D,SAAS,IAAI4D,eAAe,CAAC,CAAD,CAAhC,EAAqC;AAC1CW,IAAAA,QAAQ,GAAGvD,UAAU,CAAC6C,oBAAX,GAAkC7D,SAAS,GAAGoD,eAA9C,GAAgEpC,UAAU,CAACwC,gBAAX,CAA4B,CAA5B,CAA3E;AACAwB,IAAAA,sBAAsB,GAAG5B,eAAzB;AACA6B,IAAAA,aAAa,GAAG,IAAhB;AACD,GAJM,MAIA;AACLV,IAAAA,QAAQ,GAAG/C,YAAY,GAAG,CAAC0B,SAAS,GAAG,CAAZ,GAAgBlD,SAAjB,IAA8B2D,iBAAxD;AACAuB,IAAAA,oBAAoB,GAAGvB,iBAAvB;AACD;;AAED,SAAO;AACLY,IAAAA,QAAQ,EAAEA,QADL;AAELS,IAAAA,sBAAsB,EAAEA,sBAFnB;AAGLC,IAAAA,aAAa,EAAEA,aAHV;AAILC,IAAAA,oBAAoB,EAAEA;AAJjB,GAAP;AAMD;;AAED,eAAejG,QAAf","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\n\r\n/**\r\n * Parallel Coordinates\r\n * <https://en.wikipedia.org/wiki/Parallel_coordinates>\r\n */\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nimport * as matrix from 'zrender/lib/core/matrix.js';\r\nimport * as layoutUtil from '../../util/layout.js';\r\nimport * as axisHelper from '../../coord/axisHelper.js';\r\nimport ParallelAxis from './ParallelAxis.js';\r\nimport * as graphic from '../../util/graphic.js';\r\nimport * as numberUtil from '../../util/number.js';\r\nimport sliderMove from '../../component/helper/sliderMove.js';\r\nvar each = zrUtil.each;\r\nvar mathMin = Math.min;\r\nvar mathMax = Math.max;\r\nvar mathFloor = Math.floor;\r\nvar mathCeil = Math.ceil;\r\nvar round = numberUtil.round;\r\nvar PI = Math.PI;\r\n\r\nvar Parallel =\r\n/** @class */\r\nfunction () {\r\n function Parallel(parallelModel, ecModel, api) {\r\n this.type = 'parallel';\r\n /**\r\n * key: dimension\r\n */\r\n\r\n this._axesMap = zrUtil.createHashMap();\r\n /**\r\n * key: dimension\r\n * value: {position: [], rotation, }\r\n */\r\n\r\n this._axesLayout = {};\r\n this.dimensions = parallelModel.dimensions;\r\n this._model = parallelModel;\r\n\r\n this._init(parallelModel, ecModel, api);\r\n }\r\n\r\n Parallel.prototype._init = function (parallelModel, ecModel, api) {\r\n var dimensions = parallelModel.dimensions;\r\n var parallelAxisIndex = parallelModel.parallelAxisIndex;\r\n each(dimensions, function (dim, idx) {\r\n var axisIndex = parallelAxisIndex[idx];\r\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\r\n\r\n var axis = this._axesMap.set(dim, new ParallelAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisIndex));\r\n\r\n var isCategory = axis.type === 'category';\r\n axis.onBand = isCategory && axisModel.get('boundaryGap');\r\n axis.inverse = axisModel.get('inverse'); // Injection\r\n\r\n axisModel.axis = axis;\r\n axis.model = axisModel;\r\n axis.coordinateSystem = axisModel.coordinateSystem = this;\r\n }, this);\r\n };\r\n /**\r\n * Update axis scale after data processed\r\n */\r\n\r\n\r\n Parallel.prototype.update = function (ecModel, api) {\r\n this._updateAxesFromSeries(this._model, ecModel);\r\n };\r\n\r\n Parallel.prototype.containPoint = function (point) {\r\n var layoutInfo = this._makeLayoutInfo();\r\n\r\n var axisBase = layoutInfo.axisBase;\r\n var layoutBase = layoutInfo.layoutBase;\r\n var pixelDimIndex = layoutInfo.pixelDimIndex;\r\n var pAxis = point[1 - pixelDimIndex];\r\n var pLayout = point[pixelDimIndex];\r\n return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength;\r\n };\r\n\r\n Parallel.prototype.getModel = function () {\r\n return this._model;\r\n };\r\n /**\r\n * Update properties from series\r\n */\r\n\r\n\r\n Parallel.prototype._updateAxesFromSeries = function (parallelModel, ecModel) {\r\n ecModel.eachSeries(function (seriesModel) {\r\n if (!parallelModel.contains(seriesModel, ecModel)) {\r\n return;\r\n }\r\n\r\n var data = seriesModel.getData();\r\n each(this.dimensions, function (dim) {\r\n var axis = this._axesMap.get(dim);\r\n\r\n axis.scale.unionExtentFromData(data, data.mapDimension(dim));\r\n axisHelper.niceScaleExtent(axis.scale, axis.model);\r\n }, this);\r\n }, this);\r\n };\r\n /**\r\n * Resize the parallel coordinate system.\r\n */\r\n\r\n\r\n Parallel.prototype.resize = function (parallelModel, api) {\r\n this._rect = layoutUtil.getLayoutRect(parallelModel.getBoxLayoutParams(), {\r\n width: api.getWidth(),\r\n height: api.getHeight()\r\n });\r\n\r\n this._layoutAxes();\r\n };\r\n\r\n Parallel.prototype.getRect = function () {\r\n return this._rect;\r\n };\r\n\r\n Parallel.prototype._makeLayoutInfo = function () {\r\n var parallelModel = this._model;\r\n var rect = this._rect;\r\n var xy = ['x', 'y'];\r\n var wh = ['width', 'height'];\r\n var layout = parallelModel.get('layout');\r\n var pixelDimIndex = layout === 'horizontal' ? 0 : 1;\r\n var layoutLength = rect[wh[pixelDimIndex]];\r\n var layoutExtent = [0, layoutLength];\r\n var axisCount = this.dimensions.length;\r\n var axisExpandWidth = restrict(parallelModel.get('axisExpandWidth'), layoutExtent);\r\n var axisExpandCount = restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]);\r\n var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0; // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength],\r\n // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow),\r\n // where collapsed axes should be overlapped.\r\n\r\n var axisExpandWindow = parallelModel.get('axisExpandWindow');\r\n var winSize;\r\n\r\n if (!axisExpandWindow) {\r\n winSize = restrict(axisExpandWidth * (axisExpandCount - 1), layoutExtent);\r\n var axisExpandCenter = parallelModel.get('axisExpandCenter') || mathFloor(axisCount / 2);\r\n axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2];\r\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\r\n } else {\r\n winSize = restrict(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent);\r\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\r\n }\r\n\r\n var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount); // Avoid axisCollapseWidth is too small.\r\n\r\n axisCollapseWidth < 3 && (axisCollapseWidth = 0); // Find the first and last indices > ewin[0] and < ewin[1].\r\n\r\n var winInnerIndices = [mathFloor(round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, mathCeil(round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1]; // Pos in ec coordinates.\r\n\r\n var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];\r\n return {\r\n layout: layout,\r\n pixelDimIndex: pixelDimIndex,\r\n layoutBase: rect[xy[pixelDimIndex]],\r\n layoutLength: layoutLength,\r\n axisBase: rect[xy[1 - pixelDimIndex]],\r\n axisLength: rect[wh[1 - pixelDimIndex]],\r\n axisExpandable: axisExpandable,\r\n axisExpandWidth: axisExpandWidth,\r\n axisCollapseWidth: axisCollapseWidth,\r\n axisExpandWindow: axisExpandWindow,\r\n axisCount: axisCount,\r\n winInnerIndices: winInnerIndices,\r\n axisExpandWindow0Pos: axisExpandWindow0Pos\r\n };\r\n };\r\n\r\n Parallel.prototype._layoutAxes = function () {\r\n var rect = this._rect;\r\n var axes = this._axesMap;\r\n var dimensions = this.dimensions;\r\n\r\n var layoutInfo = this._makeLayoutInfo();\r\n\r\n var layout = layoutInfo.layout;\r\n axes.each(function (axis) {\r\n var axisExtent = [0, layoutInfo.axisLength];\r\n var idx = axis.inverse ? 1 : 0;\r\n axis.setExtent(axisExtent[idx], axisExtent[1 - idx]);\r\n });\r\n each(dimensions, function (dim, idx) {\r\n var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo);\r\n var positionTable = {\r\n horizontal: {\r\n x: posInfo.position,\r\n y: layoutInfo.axisLength\r\n },\r\n vertical: {\r\n x: 0,\r\n y: posInfo.position\r\n }\r\n };\r\n var rotationTable = {\r\n horizontal: PI / 2,\r\n vertical: 0\r\n };\r\n var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y];\r\n var rotation = rotationTable[layout];\r\n var transform = matrix.create();\r\n matrix.rotate(transform, transform, rotation);\r\n matrix.translate(transform, transform, position); // TODO\r\n // tick layout info\r\n // TODO\r\n // update dimensions info based on axis order.\r\n\r\n this._axesLayout[dim] = {\r\n position: position,\r\n rotation: rotation,\r\n transform: transform,\r\n axisNameAvailableWidth: posInfo.axisNameAvailableWidth,\r\n axisLabelShow: posInfo.axisLabelShow,\r\n nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth,\r\n tickDirection: 1,\r\n labelDirection: 1\r\n };\r\n }, this);\r\n };\r\n /**\r\n * Get axis by dim.\r\n */\r\n\r\n\r\n Parallel.prototype.getAxis = function (dim) {\r\n return this._axesMap.get(dim);\r\n };\r\n /**\r\n * Convert a dim value of a single item of series data to Point.\r\n */\r\n\r\n\r\n Parallel.prototype.dataToPoint = function (value, dim) {\r\n return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim);\r\n };\r\n /**\r\n * Travel data for one time, get activeState of each data item.\r\n * @param start the start dataIndex that travel from.\r\n * @param end the next dataIndex of the last dataIndex will be travel.\r\n */\r\n\r\n\r\n Parallel.prototype.eachActiveState = function (data, callback, start, end) {\r\n start == null && (start = 0);\r\n end == null && (end = data.count());\r\n var axesMap = this._axesMap;\r\n var dimensions = this.dimensions;\r\n var dataDimensions = [];\r\n var axisModels = [];\r\n zrUtil.each(dimensions, function (axisDim) {\r\n dataDimensions.push(data.mapDimension(axisDim));\r\n axisModels.push(axesMap.get(axisDim).model);\r\n });\r\n var hasActiveSet = this.hasAxisBrushed();\r\n\r\n for (var dataIndex = start; dataIndex < end; dataIndex++) {\r\n var activeState = void 0;\r\n\r\n if (!hasActiveSet) {\r\n activeState = 'normal';\r\n } else {\r\n activeState = 'active';\r\n var values = data.getValues(dataDimensions, dataIndex);\r\n\r\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\r\n var state = axisModels[j].getActiveState(values[j]);\r\n\r\n if (state === 'inactive') {\r\n activeState = 'inactive';\r\n break;\r\n }\r\n }\r\n }\r\n\r\n callback(activeState, dataIndex);\r\n }\r\n };\r\n /**\r\n * Whether has any activeSet.\r\n */\r\n\r\n\r\n Parallel.prototype.hasAxisBrushed = function () {\r\n var dimensions = this.dimensions;\r\n var axesMap = this._axesMap;\r\n var hasActiveSet = false;\r\n\r\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\r\n if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') {\r\n hasActiveSet = true;\r\n }\r\n }\r\n\r\n return hasActiveSet;\r\n };\r\n /**\r\n * Convert coords of each axis to Point.\r\n * Return point. For example: [10, 20]\r\n */\r\n\r\n\r\n Parallel.prototype.axisCoordToPoint = function (coord, dim) {\r\n var axisLayout = this._axesLayout[dim];\r\n return graphic.applyTransform([coord, 0], axisLayout.transform);\r\n };\r\n /**\r\n * Get axis layout.\r\n */\r\n\r\n\r\n Parallel.prototype.getAxisLayout = function (dim) {\r\n return zrUtil.clone(this._axesLayout[dim]);\r\n };\r\n /**\r\n * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.\r\n */\r\n\r\n\r\n Parallel.prototype.getSlidedAxisExpandWindow = function (point) {\r\n var layoutInfo = this._makeLayoutInfo();\r\n\r\n var pixelDimIndex = layoutInfo.pixelDimIndex;\r\n var axisExpandWindow = layoutInfo.axisExpandWindow.slice();\r\n var winSize = axisExpandWindow[1] - axisExpandWindow[0];\r\n var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)]; // Out of the area of coordinate system.\r\n\r\n if (!this.containPoint(point)) {\r\n return {\r\n behavior: 'none',\r\n axisExpandWindow: axisExpandWindow\r\n };\r\n } // Conver the point from global to expand coordinates.\r\n\r\n\r\n var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos; // For dragging operation convenience, the window should not be\r\n // slided when mouse is the center area of the window.\r\n\r\n var delta;\r\n var behavior = 'slide';\r\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\r\n\r\n var triggerArea = this._model.get('axisExpandSlideTriggerArea'); // But consider touch device, jump is necessary.\r\n\r\n\r\n var useJump = triggerArea[0] != null;\r\n\r\n if (axisCollapseWidth) {\r\n if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) {\r\n behavior = 'jump';\r\n delta = pointCoord - winSize * triggerArea[2];\r\n } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) {\r\n behavior = 'jump';\r\n delta = pointCoord - winSize * (1 - triggerArea[2]);\r\n } else {\r\n (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0);\r\n }\r\n\r\n delta *= layoutInfo.axisExpandWidth / axisCollapseWidth;\r\n delta ? sliderMove(delta, axisExpandWindow, extent, 'all') // Avoid nonsense triger on mousemove.\r\n : behavior = 'none';\r\n } // When screen is too narrow, make it visible and slidable, although it is hard to interact.\r\n else {\r\n var winSize2 = axisExpandWindow[1] - axisExpandWindow[0];\r\n var pos = extent[1] * pointCoord / winSize2;\r\n axisExpandWindow = [mathMax(0, pos - winSize2 / 2)];\r\n axisExpandWindow[1] = mathMin(extent[1], axisExpandWindow[0] + winSize2);\r\n axisExpandWindow[0] = axisExpandWindow[1] - winSize2;\r\n }\r\n\r\n return {\r\n axisExpandWindow: axisExpandWindow,\r\n behavior: behavior\r\n };\r\n };\r\n\r\n return Parallel;\r\n}();\r\n\r\nfunction restrict(len, extent) {\r\n return mathMin(mathMax(len, extent[0]), extent[1]);\r\n}\r\n\r\nfunction layoutAxisWithoutExpand(axisIndex, layoutInfo) {\r\n var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1);\r\n return {\r\n position: step * axisIndex,\r\n axisNameAvailableWidth: step,\r\n axisLabelShow: true\r\n };\r\n}\r\n\r\nfunction layoutAxisWithExpand(axisIndex, layoutInfo) {\r\n var layoutLength = layoutInfo.layoutLength;\r\n var axisExpandWidth = layoutInfo.axisExpandWidth;\r\n var axisCount = layoutInfo.axisCount;\r\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\r\n var winInnerIndices = layoutInfo.winInnerIndices;\r\n var position;\r\n var axisNameAvailableWidth = axisCollapseWidth;\r\n var axisLabelShow = false;\r\n var nameTruncateMaxWidth;\r\n\r\n if (axisIndex < winInnerIndices[0]) {\r\n position = axisIndex * axisCollapseWidth;\r\n nameTruncateMaxWidth = axisCollapseWidth;\r\n } else if (axisIndex <= winInnerIndices[1]) {\r\n position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0];\r\n axisNameAvailableWidth = axisExpandWidth;\r\n axisLabelShow = true;\r\n } else {\r\n position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth;\r\n nameTruncateMaxWidth = axisCollapseWidth;\r\n }\r\n\r\n return {\r\n position: position,\r\n axisNameAvailableWidth: axisNameAvailableWidth,\r\n axisLabelShow: axisLabelShow,\r\n nameTruncateMaxWidth: nameTruncateMaxWidth\r\n };\r\n}\r\n\r\nexport default Parallel;"]},"metadata":{},"sourceType":"module"}