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Y,YAAYsE,EAAQrE,SAC5B,GACF,G,wBCVA,IAAI4e,EAEkB,qBAAXC,OACTD,EAAMC,OAAO1P,QAEY,qBAAX,EAAA2P,IACZF,EAAM,EAAAE,EAAO3P,SAGE,qBAARyP,IACTA,GAAM,GAGR,IAAIzP,EAAUyP,EACdhc,EAAQuM,QAAUA,C","sources":["webpack://app/./node_modules/echarts/lib/component/visualMap.js","webpack://app/./node_modules/echarts/lib/component/visualMapContinuous.js","webpack://app/./node_modules/echarts/lib/component/visualMapPiecewise.js","webpack://app/./node_modules/echarts/lib/component/visualMap/ContinuousModel.js","webpack://app/./node_modules/echarts/lib/component/visualMap/ContinuousView.js","webpack://app/./node_modules/echarts/lib/component/visualMap/PiecewiseModel.js","webpack://app/./node_modules/echarts/lib/component/visualMap/PiecewiseView.js","webpack://app/./node_modules/echarts/lib/component/visualMap/VisualMapModel.js","webpack://app/./node_modules/echarts/lib/component/visualMap/VisualMapView.js","webpack://app/./node_modules/echarts/lib/component/visualMap/helper.js","webpack://app/./node_modules/echarts/lib/component/visualMap/preprocessor.js","webpack://app/./node_modules/echarts/lib/component/visualMap/typeDefaulter.js","webpack://app/./node_modules/echarts/lib/component/visualMap/visualEncoding.js","webpack://app/./node_modules/echarts/lib/component/visualMap/visualMapAction.js","webpack://app/./node_modules/echarts/lib/config.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\nrequire(\"./visualMapContinuous\");\n\nrequire(\"./visualMapPiecewise\");","\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\nvar echarts = require(\"../echarts\");\n\nvar preprocessor = require(\"./visualMap/preprocessor\");\n\nrequire(\"./visualMap/typeDefaulter\");\n\nrequire(\"./visualMap/visualEncoding\");\n\nrequire(\"./visualMap/ContinuousModel\");\n\nrequire(\"./visualMap/ContinuousView\");\n\nrequire(\"./visualMap/visualMapAction\");\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 * DataZoom component entry\n */\necharts.registerPreprocessor(preprocessor);","\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\nvar echarts = require(\"../echarts\");\n\nvar preprocessor = require(\"./visualMap/preprocessor\");\n\nrequire(\"./visualMap/typeDefaulter\");\n\nrequire(\"./visualMap/visualEncoding\");\n\nrequire(\"./visualMap/PiecewiseModel\");\n\nrequire(\"./visualMap/PiecewiseView\");\n\nrequire(\"./visualMap/visualMapAction\");\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 * DataZoom component entry\n */\necharts.registerPreprocessor(preprocessor);","\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\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapModel = require(\"./VisualMapModel\");\n\nvar numberUtil = require(\"../../util/number\");\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// Constant\nvar DEFAULT_BAR_BOUND = [20, 140];\nvar ContinuousModel = VisualMapModel.extend({\n type: 'visualMap.continuous',\n\n /**\n * @protected\n */\n defaultOption: {\n align: 'auto',\n // 'auto', 'left', 'right', 'top', 'bottom'\n calculable: false,\n // This prop effect default component type determine,\n // See echarts/component/visualMap/typeDefaulter.\n range: null,\n // selected range. In default case `range` is [min, max]\n // and can auto change along with modification of min max,\n // util use specifid a range.\n realtime: true,\n // Whether realtime update.\n itemHeight: null,\n // The length of the range control edge.\n itemWidth: null,\n // The length of the other side.\n hoverLink: true,\n // Enable hover highlight.\n hoverLinkDataSize: null,\n // The size of hovered data.\n hoverLinkOnHandle: null // Whether trigger hoverLink when hover handle.\n // If not specified, follow the value of `realtime`.\n\n },\n\n /**\n * @override\n */\n optionUpdated: function (newOption, isInit) {\n ContinuousModel.superApply(this, 'optionUpdated', arguments);\n this.resetExtent();\n this.resetVisual(function (mappingOption) {\n mappingOption.mappingMethod = 'linear';\n mappingOption.dataExtent = this.getExtent();\n });\n\n this._resetRange();\n },\n\n /**\n * @protected\n * @override\n */\n resetItemSize: function () {\n ContinuousModel.superApply(this, 'resetItemSize', arguments);\n var itemSize = this.itemSize;\n this._orient === 'horizontal' && itemSize.reverse();\n (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);\n (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);\n },\n\n /**\n * @private\n */\n _resetRange: function () {\n var dataExtent = this.getExtent();\n var range = this.option.range;\n\n if (!range || range.auto) {\n // `range` should always be array (so we dont use other\n // value like 'auto') for user-friend. (consider getOption).\n dataExtent.auto = 1;\n this.option.range = dataExtent;\n } else if (zrUtil.isArray(range)) {\n if (range[0] > range[1]) {\n range.reverse();\n }\n\n range[0] = Math.max(range[0], dataExtent[0]);\n range[1] = Math.min(range[1], dataExtent[1]);\n }\n },\n\n /**\n * @protected\n * @override\n */\n completeVisualOption: function () {\n VisualMapModel.prototype.completeVisualOption.apply(this, arguments);\n zrUtil.each(this.stateList, function (state) {\n var symbolSize = this.option.controller[state].symbolSize;\n\n if (symbolSize && symbolSize[0] !== symbolSize[1]) {\n symbolSize[0] = 0; // For good looking.\n }\n }, this);\n },\n\n /**\n * @override\n */\n setSelected: function (selected) {\n this.option.range = selected.slice();\n\n this._resetRange();\n },\n\n /**\n * @public\n */\n getSelected: function () {\n var dataExtent = this.getExtent();\n var dataInterval = numberUtil.asc((this.get('range') || []).slice()); // Clamp\n\n dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]);\n dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]);\n dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]);\n dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]);\n return dataInterval;\n },\n\n /**\n * @override\n */\n getValueState: function (value) {\n var range = this.option.range;\n var dataExtent = this.getExtent(); // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'.\n // range[1] is processed likewise.\n\n return (range[0] <= dataExtent[0] || range[0] <= value) && (range[1] >= dataExtent[1] || value <= range[1]) ? 'inRange' : 'outOfRange';\n },\n\n /**\n * @params {Array.} range target value: range[0] <= value && value <= range[1]\n * @return {Array.} [{seriesId, dataIndices: >}, ...]\n */\n findTargetDataIndices: function (range) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimension(data), function (value, dataIndex) {\n range[0] <= value && value <= range[1] && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n },\n\n /**\n * @implement\n */\n getVisualMeta: function (getColorVisual) {\n var oVals = getColorStopValues(this, 'outOfRange', this.getExtent());\n var iVals = getColorStopValues(this, 'inRange', this.option.range.slice());\n var stops = [];\n\n function setStop(value, valueState) {\n stops.push({\n value: value,\n color: getColorVisual(value, valueState)\n });\n } // Format to: outOfRange -- inRange -- outOfRange.\n\n\n var iIdx = 0;\n var oIdx = 0;\n var iLen = iVals.length;\n var oLen = oVals.length;\n\n for (; oIdx < oLen && (!iVals.length || oVals[oIdx] <= iVals[0]); oIdx++) {\n // If oVal[oIdx] === iVals[iIdx], oVal[oIdx] should be ignored.\n if (oVals[oIdx] < iVals[iIdx]) {\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n\n for (var first = 1; iIdx < iLen; iIdx++, first = 0) {\n // If range is full, value beyond min, max will be clamped.\n // make a singularity\n first && stops.length && setStop(iVals[iIdx], 'outOfRange');\n setStop(iVals[iIdx], 'inRange');\n }\n\n for (var first = 1; oIdx < oLen; oIdx++) {\n if (!iVals.length || iVals[iVals.length - 1] < oVals[oIdx]) {\n // make a singularity\n if (first) {\n stops.length && setStop(stops[stops.length - 1].value, 'outOfRange');\n first = 0;\n }\n\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n\n var stopsLen = stops.length;\n return {\n stops: stops,\n outerColors: [stopsLen ? stops[0].color : 'transparent', stopsLen ? stops[stopsLen - 1].color : 'transparent']\n };\n }\n});\n\nfunction getColorStopValues(visualMapModel, valueState, dataExtent) {\n if (dataExtent[0] === dataExtent[1]) {\n return dataExtent.slice();\n } // When using colorHue mapping, it is not linear color any more.\n // Moreover, canvas gradient seems not to be accurate linear.\n // FIXME\n // Should be arbitrary value 100? or based on pixel size?\n\n\n var count = 200;\n var step = (dataExtent[1] - dataExtent[0]) / count;\n var value = dataExtent[0];\n var stopValues = [];\n\n for (var i = 0; i <= count && value < dataExtent[1]; i++) {\n stopValues.push(value);\n value += step;\n }\n\n stopValues.push(dataExtent[1]);\n return stopValues;\n}\n\nvar _default = ContinuousModel;\nmodule.exports = _default;","\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\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar LinearGradient = require(\"zrender/lib/graphic/LinearGradient\");\n\nvar eventTool = require(\"zrender/lib/core/event\");\n\nvar VisualMapView = require(\"./VisualMapView\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar sliderMove = require(\"../helper/sliderMove\");\n\nvar helper = require(\"./helper\");\n\nvar modelUtil = require(\"../../util/model\");\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 linearMap = numberUtil.linearMap;\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max; // Arbitrary value\n\nvar HOVER_LINK_SIZE = 12;\nvar HOVER_LINK_OUT = 6; // Notice:\n// Any \"interval\" should be by the order of [low, high].\n// \"handle0\" (handleIndex === 0) maps to\n// low data value: this._dataInterval[0] and has low coord.\n// \"handle1\" (handleIndex === 1) maps to\n// high data value: this._dataInterval[1] and has high coord.\n// The logic of transform is implemented in this._createBarGroup.\n\nvar ContinuousView = VisualMapView.extend({\n type: 'visualMap.continuous',\n\n /**\n * @override\n */\n init: function () {\n ContinuousView.superApply(this, 'init', arguments);\n /**\n * @private\n */\n\n this._shapes = {};\n /**\n * @private\n */\n\n this._dataInterval = [];\n /**\n * @private\n */\n\n this._handleEnds = [];\n /**\n * @private\n */\n\n this._orient;\n /**\n * @private\n */\n\n this._useHandle;\n /**\n * @private\n */\n\n this._hoverLinkDataIndices = [];\n /**\n * @private\n */\n\n this._dragging;\n /**\n * @private\n */\n\n this._hovering;\n },\n\n /**\n * @protected\n * @override\n */\n doRender: function (visualMapModel, ecModel, api, payload) {\n if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) {\n this._buildView();\n }\n },\n\n /**\n * @private\n */\n _buildView: function () {\n this.group.removeAll();\n var visualMapModel = this.visualMapModel;\n var thisGroup = this.group;\n this._orient = visualMapModel.get('orient');\n this._useHandle = visualMapModel.get('calculable');\n\n this._resetInterval();\n\n this._renderBar(thisGroup);\n\n var dataRangeText = visualMapModel.get('text');\n\n this._renderEndsText(thisGroup, dataRangeText, 0);\n\n this._renderEndsText(thisGroup, dataRangeText, 1); // Do this for background size calculation.\n\n\n this._updateView(true); // After updating view, inner shapes is built completely,\n // and then background can be rendered.\n\n\n this.renderBackground(thisGroup); // Real update view\n\n this._updateView();\n\n this._enableHoverLinkToSeries();\n\n this._enableHoverLinkFromSeries();\n\n this.positionGroup(thisGroup);\n },\n\n /**\n * @private\n */\n _renderEndsText: function (group, dataRangeText, endsIndex) {\n if (!dataRangeText) {\n return;\n } // Compatible with ec2, text[0] map to high value, text[1] map low value.\n\n\n var text = dataRangeText[1 - endsIndex];\n text = text != null ? text + '' : '';\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var itemSize = visualMapModel.itemSize;\n var barGroup = this._shapes.barGroup;\n\n var position = this._applyTransform([itemSize[0] / 2, endsIndex === 0 ? -textGap : itemSize[1] + textGap], barGroup);\n\n var align = this._applyTransform(endsIndex === 0 ? 'bottom' : 'top', barGroup);\n\n var orient = this._orient;\n var textStyleModel = this.visualMapModel.textStyleModel;\n this.group.add(new graphic.Text({\n style: {\n x: position[0],\n y: position[1],\n textVerticalAlign: orient === 'horizontal' ? 'middle' : align,\n textAlign: orient === 'horizontal' ? align : 'center',\n text: text,\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n }));\n },\n\n /**\n * @private\n */\n _renderBar: function (targetGroup) {\n var visualMapModel = this.visualMapModel;\n var shapes = this._shapes;\n var itemSize = visualMapModel.itemSize;\n var orient = this._orient;\n var useHandle = this._useHandle;\n var itemAlign = helper.getItemAlign(visualMapModel, this.api, itemSize);\n\n var barGroup = shapes.barGroup = this._createBarGroup(itemAlign); // Bar\n\n\n barGroup.add(shapes.outOfRange = createPolygon());\n barGroup.add(shapes.inRange = createPolygon(null, useHandle ? getCursor(this._orient) : null, zrUtil.bind(this._dragHandle, this, 'all', false), zrUtil.bind(this._dragHandle, this, 'all', true)));\n var textRect = visualMapModel.textStyleModel.getTextRect('国');\n var textSize = mathMax(textRect.width, textRect.height); // Handle\n\n if (useHandle) {\n shapes.handleThumbs = [];\n shapes.handleLabels = [];\n shapes.handleLabelPoints = [];\n\n this._createHandle(barGroup, 0, itemSize, textSize, orient, itemAlign);\n\n this._createHandle(barGroup, 1, itemSize, textSize, orient, itemAlign);\n }\n\n this._createIndicator(barGroup, itemSize, textSize, orient);\n\n targetGroup.add(barGroup);\n },\n\n /**\n * @private\n */\n _createHandle: function (barGroup, handleIndex, itemSize, textSize, orient) {\n var onDrift = zrUtil.bind(this._dragHandle, this, handleIndex, false);\n var onDragEnd = zrUtil.bind(this._dragHandle, this, handleIndex, true);\n var handleThumb = createPolygon(createHandlePoints(handleIndex, textSize), getCursor(this._orient), onDrift, onDragEnd);\n handleThumb.position[0] = itemSize[0];\n barGroup.add(handleThumb); // Text is always horizontal layout but should not be effected by\n // transform (orient/inverse). So label is built separately but not\n // use zrender/graphic/helper/RectText, and is located based on view\n // group (according to handleLabelPoint) but not barGroup.\n\n var textStyleModel = this.visualMapModel.textStyleModel;\n var handleLabel = new graphic.Text({\n draggable: true,\n drift: onDrift,\n onmousemove: function (e) {\n // Fot mobile devicem, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd,\n style: {\n x: 0,\n y: 0,\n text: '',\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n });\n this.group.add(handleLabel);\n var handleLabelPoint = [orient === 'horizontal' ? textSize / 2 : textSize * 1.5, orient === 'horizontal' ? handleIndex === 0 ? -(textSize * 1.5) : textSize * 1.5 : handleIndex === 0 ? -textSize / 2 : textSize / 2];\n var shapes = this._shapes;\n shapes.handleThumbs[handleIndex] = handleThumb;\n shapes.handleLabelPoints[handleIndex] = handleLabelPoint;\n shapes.handleLabels[handleIndex] = handleLabel;\n },\n\n /**\n * @private\n */\n _createIndicator: function (barGroup, itemSize, textSize, orient) {\n var indicator = createPolygon([[0, 0]], 'move');\n indicator.position[0] = itemSize[0];\n indicator.attr({\n invisible: true,\n silent: true\n });\n barGroup.add(indicator);\n var textStyleModel = this.visualMapModel.textStyleModel;\n var indicatorLabel = new graphic.Text({\n silent: true,\n invisible: true,\n style: {\n x: 0,\n y: 0,\n text: '',\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n });\n this.group.add(indicatorLabel);\n var indicatorLabelPoint = [orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT + 3, 0];\n var shapes = this._shapes;\n shapes.indicator = indicator;\n shapes.indicatorLabel = indicatorLabel;\n shapes.indicatorLabelPoint = indicatorLabelPoint;\n },\n\n /**\n * @private\n */\n _dragHandle: function (handleIndex, isEnd, dx, dy) {\n if (!this._useHandle) {\n return;\n }\n\n this._dragging = !isEnd;\n\n if (!isEnd) {\n // Transform dx, dy to bar coordination.\n var vertex = this._applyTransform([dx, dy], this._shapes.barGroup, true);\n\n this._updateInterval(handleIndex, vertex[1]); // Considering realtime, update view should be executed\n // before dispatch action.\n\n\n this._updateView();\n } // dragEnd do not dispatch action when realtime.\n\n\n if (isEnd === !this.visualMapModel.get('realtime')) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: this._dataInterval.slice()\n });\n }\n\n if (isEnd) {\n !this._hovering && this._clearHoverLinkToSeries();\n } else if (useHoverLinkOnHandle(this.visualMapModel)) {\n this._doHoverLinkToSeries(this._handleEnds[handleIndex], false);\n }\n },\n\n /**\n * @private\n */\n _resetInterval: function () {\n var visualMapModel = this.visualMapModel;\n var dataInterval = this._dataInterval = visualMapModel.getSelected();\n var dataExtent = visualMapModel.getExtent();\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n this._handleEnds = [linearMap(dataInterval[0], dataExtent, sizeExtent, true), linearMap(dataInterval[1], dataExtent, sizeExtent, true)];\n },\n\n /**\n * @private\n * @param {(number|string)} handleIndex 0 or 1 or 'all'\n * @param {number} dx\n * @param {number} dy\n */\n _updateInterval: function (handleIndex, delta) {\n delta = delta || 0;\n var visualMapModel = this.visualMapModel;\n var handleEnds = this._handleEnds;\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n sliderMove(delta, handleEnds, sizeExtent, handleIndex, // cross is forbiden\n 0);\n var dataExtent = visualMapModel.getExtent(); // Update data interval.\n\n this._dataInterval = [linearMap(handleEnds[0], sizeExtent, dataExtent, true), linearMap(handleEnds[1], sizeExtent, dataExtent, true)];\n },\n\n /**\n * @private\n */\n _updateView: function (forSketch) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var shapes = this._shapes;\n var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]];\n var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds;\n\n var visualInRange = this._createBarVisual(this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange');\n\n var visualOutOfRange = this._createBarVisual(dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange');\n\n shapes.inRange.setStyle({\n fill: visualInRange.barColor,\n opacity: visualInRange.opacity\n }).setShape('points', visualInRange.barPoints);\n shapes.outOfRange.setStyle({\n fill: visualOutOfRange.barColor,\n opacity: visualOutOfRange.opacity\n }).setShape('points', visualOutOfRange.barPoints);\n\n this._updateHandle(inRangeHandleEnds, visualInRange);\n },\n\n /**\n * @private\n */\n _createBarVisual: function (dataInterval, dataExtent, handleEnds, forceState) {\n var opts = {\n forceState: forceState,\n convertOpacityToAlpha: true\n };\n\n var colorStops = this._makeColorGradient(dataInterval, opts);\n\n var symbolSizes = [this.getControllerVisual(dataInterval[0], 'symbolSize', opts), this.getControllerVisual(dataInterval[1], 'symbolSize', opts)];\n\n var barPoints = this._createBarPoints(handleEnds, symbolSizes);\n\n return {\n barColor: new LinearGradient(0, 0, 0, 1, colorStops),\n barPoints: barPoints,\n handlesColor: [colorStops[0].color, colorStops[colorStops.length - 1].color]\n };\n },\n\n /**\n * @private\n */\n _makeColorGradient: function (dataInterval, opts) {\n // Considering colorHue, which is not linear, so we have to sample\n // to calculate gradient color stops, but not only caculate head\n // and tail.\n var sampleNumber = 100; // Arbitrary value.\n\n var colorStops = [];\n var step = (dataInterval[1] - dataInterval[0]) / sampleNumber;\n colorStops.push({\n color: this.getControllerVisual(dataInterval[0], 'color', opts),\n offset: 0\n });\n\n for (var i = 1; i < sampleNumber; i++) {\n var currValue = dataInterval[0] + step * i;\n\n if (currValue > dataInterval[1]) {\n break;\n }\n\n colorStops.push({\n color: this.getControllerVisual(currValue, 'color', opts),\n offset: i / sampleNumber\n });\n }\n\n colorStops.push({\n color: this.getControllerVisual(dataInterval[1], 'color', opts),\n offset: 1\n });\n return colorStops;\n },\n\n /**\n * @private\n */\n _createBarPoints: function (handleEnds, symbolSizes) {\n var itemSize = this.visualMapModel.itemSize;\n return [[itemSize[0] - symbolSizes[0], handleEnds[0]], [itemSize[0], handleEnds[0]], [itemSize[0], handleEnds[1]], [itemSize[0] - symbolSizes[1], handleEnds[1]]];\n },\n\n /**\n * @private\n */\n _createBarGroup: function (itemAlign) {\n var orient = this._orient;\n var inverse = this.visualMapModel.get('inverse');\n return new graphic.Group(orient === 'horizontal' && !inverse ? {\n scale: itemAlign === 'bottom' ? [1, 1] : [-1, 1],\n rotation: Math.PI / 2\n } : orient === 'horizontal' && inverse ? {\n scale: itemAlign === 'bottom' ? [-1, 1] : [1, 1],\n rotation: -Math.PI / 2\n } : orient === 'vertical' && !inverse ? {\n scale: itemAlign === 'left' ? [1, -1] : [-1, -1]\n } : {\n scale: itemAlign === 'left' ? [1, 1] : [-1, 1]\n });\n },\n\n /**\n * @private\n */\n _updateHandle: function (handleEnds, visualInRange) {\n if (!this._useHandle) {\n return;\n }\n\n var shapes = this._shapes;\n var visualMapModel = this.visualMapModel;\n var handleThumbs = shapes.handleThumbs;\n var handleLabels = shapes.handleLabels;\n each([0, 1], function (handleIndex) {\n var handleThumb = handleThumbs[handleIndex];\n handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]);\n handleThumb.position[1] = handleEnds[handleIndex]; // Update handle label position.\n\n var textPoint = graphic.applyTransform(shapes.handleLabelPoints[handleIndex], graphic.getTransform(handleThumb, this.group));\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n text: visualMapModel.formatValueText(this._dataInterval[handleIndex]),\n textVerticalAlign: 'middle',\n textAlign: this._applyTransform(this._orient === 'horizontal' ? handleIndex === 0 ? 'bottom' : 'top' : 'left', shapes.barGroup)\n });\n }, this);\n },\n\n /**\n * @private\n * @param {number} cursorValue\n * @param {number} textValue\n * @param {string} [rangeSymbol]\n * @param {number} [halfHoverLinkSize]\n */\n _showIndicator: function (cursorValue, textValue, rangeSymbol, halfHoverLinkSize) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var itemSize = visualMapModel.itemSize;\n var sizeExtent = [0, itemSize[1]];\n var pos = linearMap(cursorValue, dataExtent, sizeExtent, true);\n var shapes = this._shapes;\n var indicator = shapes.indicator;\n\n if (!indicator) {\n return;\n }\n\n indicator.position[1] = pos;\n indicator.attr('invisible', false);\n indicator.setShape('points', createIndicatorPoints(!!rangeSymbol, halfHoverLinkSize, pos, itemSize[1]));\n var opts = {\n convertOpacityToAlpha: true\n };\n var color = this.getControllerVisual(cursorValue, 'color', opts);\n indicator.setStyle('fill', color); // Update handle label position.\n\n var textPoint = graphic.applyTransform(shapes.indicatorLabelPoint, graphic.getTransform(indicator, this.group));\n var indicatorLabel = shapes.indicatorLabel;\n indicatorLabel.attr('invisible', false);\n\n var align = this._applyTransform('left', shapes.barGroup);\n\n var orient = this._orient;\n indicatorLabel.setStyle({\n text: (rangeSymbol ? rangeSymbol : '') + visualMapModel.formatValueText(textValue),\n textVerticalAlign: orient === 'horizontal' ? align : 'middle',\n textAlign: orient === 'horizontal' ? 'center' : align,\n x: textPoint[0],\n y: textPoint[1]\n });\n },\n\n /**\n * @private\n */\n _enableHoverLinkToSeries: function () {\n var self = this;\n\n this._shapes.barGroup.on('mousemove', function (e) {\n self._hovering = true;\n\n if (!self._dragging) {\n var itemSize = self.visualMapModel.itemSize;\n\n var pos = self._applyTransform([e.offsetX, e.offsetY], self._shapes.barGroup, true, true); // For hover link show when hover handle, which might be\n // below or upper than sizeExtent.\n\n\n pos[1] = mathMin(mathMax(0, pos[1]), itemSize[1]);\n\n self._doHoverLinkToSeries(pos[1], 0 <= pos[0] && pos[0] <= itemSize[0]);\n }\n }).on('mouseout', function () {\n // When mouse is out of handle, hoverLink still need\n // to be displayed when realtime is set as false.\n self._hovering = false;\n !self._dragging && self._clearHoverLinkToSeries();\n });\n },\n\n /**\n * @private\n */\n _enableHoverLinkFromSeries: function () {\n var zr = this.api.getZr();\n\n if (this.visualMapModel.option.hoverLink) {\n zr.on('mouseover', this._hoverLinkFromSeriesMouseOver, this);\n zr.on('mouseout', this._hideIndicator, this);\n } else {\n this._clearHoverLinkFromSeries();\n }\n },\n\n /**\n * @private\n */\n _doHoverLinkToSeries: function (cursorPos, hoverOnBar) {\n var visualMapModel = this.visualMapModel;\n var itemSize = visualMapModel.itemSize;\n\n if (!visualMapModel.option.hoverLink) {\n return;\n }\n\n var sizeExtent = [0, itemSize[1]];\n var dataExtent = visualMapModel.getExtent(); // For hover link show when hover handle, which might be below or upper than sizeExtent.\n\n cursorPos = mathMin(mathMax(sizeExtent[0], cursorPos), sizeExtent[1]);\n var halfHoverLinkSize = getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent);\n var hoverRange = [cursorPos - halfHoverLinkSize, cursorPos + halfHoverLinkSize];\n var cursorValue = linearMap(cursorPos, sizeExtent, dataExtent, true);\n var valueRange = [linearMap(hoverRange[0], sizeExtent, dataExtent, true), linearMap(hoverRange[1], sizeExtent, dataExtent, true)]; // Consider data range is out of visualMap range, see test/visualMap-continuous.html,\n // where china and india has very large population.\n\n hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity);\n hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity); // Do not show indicator when mouse is over handle,\n // otherwise labels overlap, especially when dragging.\n\n if (hoverOnBar) {\n if (valueRange[0] === -Infinity) {\n this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize);\n } else if (valueRange[1] === Infinity) {\n this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize);\n } else {\n this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize);\n }\n } // When realtime is set as false, handles, which are in barGroup,\n // also trigger hoverLink, which help user to realize where they\n // focus on when dragging. (see test/heatmap-large.html)\n // When realtime is set as true, highlight will not show when hover\n // handle, because the label on handle, which displays a exact value\n // but not range, might mislead users.\n\n\n var oldBatch = this._hoverLinkDataIndices;\n var newBatch = [];\n\n if (hoverOnBar || useHoverLinkOnHandle(visualMapModel)) {\n newBatch = this._hoverLinkDataIndices = visualMapModel.findTargetDataIndices(valueRange);\n }\n\n var resultBatches = modelUtil.compressBatches(oldBatch, newBatch);\n\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(resultBatches[0], visualMapModel));\n\n this._dispatchHighDown('highlight', helper.makeHighDownBatch(resultBatches[1], visualMapModel));\n },\n\n /**\n * @private\n */\n _hoverLinkFromSeriesMouseOver: function (e) {\n var el = e.target;\n var visualMapModel = this.visualMapModel;\n\n if (!el || el.dataIndex == null) {\n return;\n }\n\n var dataModel = this.ecModel.getSeriesByIndex(el.seriesIndex);\n\n if (!visualMapModel.isTargetSeries(dataModel)) {\n return;\n }\n\n var data = dataModel.getData(el.dataType);\n var value = data.get(visualMapModel.getDataDimension(data), el.dataIndex, true);\n\n if (!isNaN(value)) {\n this._showIndicator(value, value);\n }\n },\n\n /**\n * @private\n */\n _hideIndicator: function () {\n var shapes = this._shapes;\n shapes.indicator && shapes.indicator.attr('invisible', true);\n shapes.indicatorLabel && shapes.indicatorLabel.attr('invisible', true);\n },\n\n /**\n * @private\n */\n _clearHoverLinkToSeries: function () {\n this._hideIndicator();\n\n var indices = this._hoverLinkDataIndices;\n\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(indices, this.visualMapModel));\n\n indices.length = 0;\n },\n\n /**\n * @private\n */\n _clearHoverLinkFromSeries: function () {\n this._hideIndicator();\n\n var zr = this.api.getZr();\n zr.off('mouseover', this._hoverLinkFromSeriesMouseOver);\n zr.off('mouseout', this._hideIndicator);\n },\n\n /**\n * @private\n */\n _applyTransform: function (vertex, element, inverse, global) {\n var transform = graphic.getTransform(element, global ? null : this.group);\n return graphic[zrUtil.isArray(vertex) ? 'applyTransform' : 'transformDirection'](vertex, transform, inverse);\n },\n\n /**\n * @private\n */\n _dispatchHighDown: function (type, batch) {\n batch && batch.length && this.api.dispatchAction({\n type: type,\n batch: batch\n });\n },\n\n /**\n * @override\n */\n dispose: function () {\n this._clearHoverLinkFromSeries();\n\n this._clearHoverLinkToSeries();\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearHoverLinkFromSeries();\n\n this._clearHoverLinkToSeries();\n }\n});\n\nfunction createPolygon(points, cursor, onDrift, onDragEnd) {\n return new graphic.Polygon({\n shape: {\n points: points\n },\n draggable: !!onDrift,\n cursor: cursor,\n drift: onDrift,\n onmousemove: function (e) {\n // Fot mobile devicem, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd\n });\n}\n\nfunction createHandlePoints(handleIndex, textSize) {\n return handleIndex === 0 ? [[0, 0], [textSize, 0], [textSize, -textSize]] : [[0, 0], [textSize, 0], [textSize, textSize]];\n}\n\nfunction createIndicatorPoints(isRange, halfHoverLinkSize, pos, extentMax) {\n return isRange ? [// indicate range\n [0, -mathMin(halfHoverLinkSize, mathMax(pos, 0))], [HOVER_LINK_OUT, 0], [0, mathMin(halfHoverLinkSize, mathMax(extentMax - pos, 0))]] : [// indicate single value\n [0, 0], [5, -5], [5, 5]];\n}\n\nfunction getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) {\n var halfHoverLinkSize = HOVER_LINK_SIZE / 2;\n var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize');\n\n if (hoverLinkDataSize) {\n halfHoverLinkSize = linearMap(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2;\n }\n\n return halfHoverLinkSize;\n}\n\nfunction useHoverLinkOnHandle(visualMapModel) {\n var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle');\n return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle);\n}\n\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\n\nvar _default = ContinuousView;\nmodule.exports = _default;","\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\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapModel = require(\"./VisualMapModel\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar visualDefault = require(\"../../visual/visualDefault\");\n\nvar _number = require(\"../../util/number\");\n\nvar reformIntervals = _number.reformIntervals;\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 PiecewiseModel = VisualMapModel.extend({\n type: 'visualMap.piecewise',\n\n /**\n * Order Rule:\n *\n * option.categories / option.pieces / option.text / option.selected:\n * If !option.inverse,\n * Order when vertical: ['top', ..., 'bottom'].\n * Order when horizontal: ['left', ..., 'right'].\n * If option.inverse, the meaning of\n * the order should be reversed.\n *\n * this._pieceList:\n * The order is always [low, ..., high].\n *\n * Mapping from location to low-high:\n * If !option.inverse\n * When vertical, top is high.\n * When horizontal, right is high.\n * If option.inverse, reverse.\n */\n\n /**\n * @protected\n */\n defaultOption: {\n selected: null,\n // Object. If not specified, means selected.\n // When pieces and splitNumber: {'0': true, '5': true}\n // When categories: {'cate1': false, 'cate3': true}\n // When selected === false, means all unselected.\n minOpen: false,\n // Whether include values that smaller than `min`.\n maxOpen: false,\n // Whether include values that bigger than `max`.\n align: 'auto',\n // 'auto', 'left', 'right'\n itemWidth: 20,\n // When put the controller vertically, it is the length of\n // horizontal side of each item. Otherwise, vertical side.\n itemHeight: 14,\n // When put the controller vertically, it is the length of\n // vertical side of each item. Otherwise, horizontal side.\n itemSymbol: 'roundRect',\n pieceList: null,\n // Each item is Object, with some of those attrs:\n // {min, max, lt, gt, lte, gte, value,\n // color, colorSaturation, colorAlpha, opacity,\n // symbol, symbolSize}, which customize the range or visual\n // coding of the certain piece. Besides, see \"Order Rule\".\n categories: null,\n // category names, like: ['some1', 'some2', 'some3'].\n // Attr min/max are ignored when categories set. See \"Order Rule\"\n splitNumber: 5,\n // If set to 5, auto split five pieces equally.\n // If set to 0 and component type not set, component type will be\n // determined as \"continuous\". (It is less reasonable but for ec2\n // compatibility, see echarts/component/visualMap/typeDefaulter)\n selectedMode: 'multiple',\n // Can be 'multiple' or 'single'.\n itemGap: 10,\n // The gap between two items, in px.\n hoverLink: true,\n // Enable hover highlight.\n showLabel: null // By default, when text is used, label will hide (the logic\n // is remained for compatibility reason)\n\n },\n\n /**\n * @override\n */\n optionUpdated: function (newOption, isInit) {\n PiecewiseModel.superApply(this, 'optionUpdated', arguments);\n /**\n * The order is always [low, ..., high].\n * [{text: string, interval: Array.}, ...]\n * @private\n * @type {Array.}\n */\n\n this._pieceList = [];\n this.resetExtent();\n /**\n * 'pieces', 'categories', 'splitNumber'\n * @type {string}\n */\n\n var mode = this._mode = this._determineMode();\n\n resetMethods[this._mode].call(this);\n\n this._resetSelected(newOption, isInit);\n\n var categories = this.option.categories;\n this.resetVisual(function (mappingOption, state) {\n if (mode === 'categories') {\n mappingOption.mappingMethod = 'category';\n mappingOption.categories = zrUtil.clone(categories);\n } else {\n mappingOption.dataExtent = this.getExtent();\n mappingOption.mappingMethod = 'piecewise';\n mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {\n var piece = zrUtil.clone(piece);\n\n if (state !== 'inRange') {\n // FIXME\n // outOfRange do not support special visual in pieces.\n piece.visual = null;\n }\n\n return piece;\n });\n }\n });\n },\n\n /**\n * @protected\n * @override\n */\n completeVisualOption: function () {\n // Consider this case:\n // visualMap: {\n // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}]\n // }\n // where no inRange/outOfRange set but only pieces. So we should make\n // default inRange/outOfRange for this case, otherwise visuals that only\n // appear in `pieces` will not be taken into account in visual encoding.\n var option = this.option;\n var visualTypesInPieces = {};\n var visualTypes = VisualMapping.listVisualTypes();\n var isCategory = this.isCategory();\n zrUtil.each(option.pieces, function (piece) {\n zrUtil.each(visualTypes, function (visualType) {\n if (piece.hasOwnProperty(visualType)) {\n visualTypesInPieces[visualType] = 1;\n }\n });\n });\n zrUtil.each(visualTypesInPieces, function (v, visualType) {\n var exists = 0;\n zrUtil.each(this.stateList, function (state) {\n exists |= has(option, state, visualType) || has(option.target, state, visualType);\n }, this);\n !exists && zrUtil.each(this.stateList, function (state) {\n (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory);\n });\n }, this);\n\n function has(obj, state, visualType) {\n return obj && obj[state] && (zrUtil.isObject(obj[state]) ? obj[state].hasOwnProperty(visualType) : obj[state] === visualType // e.g., inRange: 'symbol'\n );\n }\n\n VisualMapModel.prototype.completeVisualOption.apply(this, arguments);\n },\n _resetSelected: function (newOption, isInit) {\n var thisOption = this.option;\n var pieceList = this._pieceList; // Selected do not merge but all override.\n\n var selected = (isInit ? thisOption : newOption).selected || {};\n thisOption.selected = selected; // Consider 'not specified' means true.\n\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n\n if (!selected.hasOwnProperty(key)) {\n selected[key] = true;\n }\n }, this);\n\n if (thisOption.selectedMode === 'single') {\n // Ensure there is only one selected.\n var hasSel = false;\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n\n if (selected[key]) {\n hasSel ? selected[key] = false : hasSel = true;\n }\n }, this);\n } // thisOption.selectedMode === 'multiple', default: all selected.\n\n },\n\n /**\n * @public\n */\n getSelectedMapKey: function (piece) {\n return this._mode === 'categories' ? piece.value + '' : piece.index + '';\n },\n\n /**\n * @public\n */\n getPieceList: function () {\n return this._pieceList;\n },\n\n /**\n * @private\n * @return {string}\n */\n _determineMode: function () {\n var option = this.option;\n return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';\n },\n\n /**\n * @public\n * @override\n */\n setSelected: function (selected) {\n this.option.selected = zrUtil.clone(selected);\n },\n\n /**\n * @public\n * @override\n */\n getValueState: function (value) {\n var index = VisualMapping.findPieceIndex(value, this._pieceList);\n return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';\n },\n\n /**\n * @public\n * @params {number} pieceIndex piece index in visualMapModel.getPieceList()\n * @return {Array.} [{seriesId, dataIndex: >}, ...]\n */\n findTargetDataIndices: function (pieceIndex) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimension(data), function (value, dataIndex) {\n // Should always base on model pieceList, because it is order sensitive.\n var pIdx = VisualMapping.findPieceIndex(value, this._pieceList);\n pIdx === pieceIndex && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n },\n\n /**\n * @private\n * @param {Object} piece piece.value or piece.interval is required.\n * @return {number} Can be Infinity or -Infinity\n */\n getRepresentValue: function (piece) {\n var representValue;\n\n if (this.isCategory()) {\n representValue = piece.value;\n } else {\n if (piece.value != null) {\n representValue = piece.value;\n } else {\n var pieceInterval = piece.interval || [];\n representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2;\n }\n }\n\n return representValue;\n },\n getVisualMeta: function (getColorVisual) {\n // Do not support category. (category axis is ordinal, numerical)\n if (this.isCategory()) {\n return;\n }\n\n var stops = [];\n var outerColors = [];\n var visualMapModel = this;\n\n function setStop(interval, valueState) {\n var representValue = visualMapModel.getRepresentValue({\n interval: interval\n });\n\n if (!valueState) {\n valueState = visualMapModel.getValueState(representValue);\n }\n\n var color = getColorVisual(representValue, valueState);\n\n if (interval[0] === -Infinity) {\n outerColors[0] = color;\n } else if (interval[1] === Infinity) {\n outerColors[1] = color;\n } else {\n stops.push({\n value: interval[0],\n color: color\n }, {\n value: interval[1],\n color: color\n });\n }\n } // Suplement\n\n\n var pieceList = this._pieceList.slice();\n\n if (!pieceList.length) {\n pieceList.push({\n interval: [-Infinity, Infinity]\n });\n } else {\n var edge = pieceList[0].interval[0];\n edge !== -Infinity && pieceList.unshift({\n interval: [-Infinity, edge]\n });\n edge = pieceList[pieceList.length - 1].interval[1];\n edge !== Infinity && pieceList.push({\n interval: [edge, Infinity]\n });\n }\n\n var curr = -Infinity;\n zrUtil.each(pieceList, function (piece) {\n var interval = piece.interval;\n\n if (interval) {\n // Fulfill gap.\n interval[0] > curr && setStop([curr, interval[0]], 'outOfRange');\n setStop(interval.slice());\n curr = interval[1];\n }\n }, this);\n return {\n stops: stops,\n outerColors: outerColors\n };\n }\n});\n/**\n * Key is this._mode\n * @type {Object}\n * @this {module:echarts/component/viusalMap/PiecewiseMode}\n */\n\nvar resetMethods = {\n splitNumber: function () {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n var precision = Math.min(thisOption.precision, 20);\n var dataExtent = this.getExtent();\n var splitNumber = thisOption.splitNumber;\n splitNumber = Math.max(parseInt(splitNumber, 10), 1);\n thisOption.splitNumber = splitNumber;\n var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber; // Precision auto-adaption\n\n while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {\n precision++;\n }\n\n thisOption.precision = precision;\n splitStep = +splitStep.toFixed(precision);\n\n if (thisOption.minOpen) {\n pieceList.push({\n interval: [-Infinity, dataExtent[0]],\n close: [0, 0]\n });\n }\n\n for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {\n var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;\n pieceList.push({\n interval: [curr, max],\n close: [1, 1]\n });\n }\n\n if (thisOption.maxOpen) {\n pieceList.push({\n interval: [dataExtent[1], Infinity],\n close: [0, 0]\n });\n }\n\n reformIntervals(pieceList);\n zrUtil.each(pieceList, function (piece, index) {\n piece.index = index;\n piece.text = this.formatValueText(piece.interval);\n }, this);\n },\n categories: function () {\n var thisOption = this.option;\n zrUtil.each(thisOption.categories, function (cate) {\n // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。\n // 是否改一致。\n this._pieceList.push({\n text: this.formatValueText(cate, true),\n value: cate\n });\n }, this); // See \"Order Rule\".\n\n normalizeReverse(thisOption, this._pieceList);\n },\n pieces: function () {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n zrUtil.each(thisOption.pieces, function (pieceListItem, index) {\n if (!zrUtil.isObject(pieceListItem)) {\n pieceListItem = {\n value: pieceListItem\n };\n }\n\n var item = {\n text: '',\n index: index\n };\n\n if (pieceListItem.label != null) {\n item.text = pieceListItem.label;\n }\n\n if (pieceListItem.hasOwnProperty('value')) {\n var value = item.value = pieceListItem.value;\n item.interval = [value, value];\n item.close = [1, 1];\n } else {\n // `min` `max` is legacy option.\n // `lt` `gt` `lte` `gte` is recommanded.\n var interval = item.interval = [];\n var close = item.close = [0, 0];\n var closeList = [1, 0, 1];\n var infinityList = [-Infinity, Infinity];\n var useMinMax = [];\n\n for (var lg = 0; lg < 2; lg++) {\n var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];\n\n for (var i = 0; i < 3 && interval[lg] == null; i++) {\n interval[lg] = pieceListItem[names[i]];\n close[lg] = closeList[i];\n useMinMax[lg] = i === 2;\n }\n\n interval[lg] == null && (interval[lg] = infinityList[lg]);\n }\n\n useMinMax[0] && interval[1] === Infinity && (close[0] = 0);\n useMinMax[1] && interval[0] === -Infinity && (close[1] = 0);\n\n if (interval[0] === interval[1] && close[0] && close[1]) {\n // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],\n // we use value to lift the priority when min === max\n item.value = interval[0];\n }\n }\n\n item.visual = VisualMapping.retrieveVisuals(pieceListItem);\n pieceList.push(item);\n }, this); // See \"Order Rule\".\n\n normalizeReverse(thisOption, pieceList); // Only pieces\n\n reformIntervals(pieceList);\n zrUtil.each(pieceList, function (piece) {\n var close = piece.close;\n var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]];\n piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols);\n }, this);\n }\n};\n\nfunction normalizeReverse(thisOption, pieceList) {\n var inverse = thisOption.inverse;\n\n if (thisOption.orient === 'vertical' ? !inverse : inverse) {\n pieceList.reverse();\n }\n}\n\nvar _default = PiecewiseModel;\nmodule.exports = _default;","\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\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapView = require(\"./VisualMapView\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar layout = require(\"../../util/layout\");\n\nvar helper = require(\"./helper\");\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 PiecewiseVisualMapView = VisualMapView.extend({\n type: 'visualMap.piecewise',\n\n /**\n * @protected\n * @override\n */\n doRender: function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var textStyleModel = visualMapModel.textStyleModel;\n var textFont = textStyleModel.getFont();\n var textFill = textStyleModel.getTextColor();\n\n var itemAlign = this._getItemAlign();\n\n var itemSize = visualMapModel.itemSize;\n\n var viewData = this._getViewData();\n\n var endsText = viewData.endsText;\n var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText);\n endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign);\n zrUtil.each(viewData.viewPieceList, renderItem, this);\n endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign);\n layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap'));\n this.renderBackground(thisGroup);\n this.positionGroup(thisGroup);\n\n function renderItem(item) {\n var piece = item.piece;\n var itemGroup = new graphic.Group();\n itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece);\n\n this._enableHoverLink(itemGroup, item.indexInModelPieceList);\n\n var representValue = visualMapModel.getRepresentValue(piece);\n\n this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]);\n\n if (showLabel) {\n var visualState = this.visualMapModel.getValueState(representValue);\n itemGroup.add(new graphic.Text({\n style: {\n x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap,\n y: itemSize[1] / 2,\n text: piece.text,\n textVerticalAlign: 'middle',\n textAlign: itemAlign,\n textFont: textFont,\n textFill: textFill,\n opacity: visualState === 'outOfRange' ? 0.5 : 1\n }\n }));\n }\n\n thisGroup.add(itemGroup);\n }\n },\n\n /**\n * @private\n */\n _enableHoverLink: function (itemGroup, pieceIndex) {\n itemGroup.on('mouseover', zrUtil.bind(onHoverLink, this, 'highlight')).on('mouseout', zrUtil.bind(onHoverLink, this, 'downplay'));\n\n function onHoverLink(method) {\n var visualMapModel = this.visualMapModel;\n visualMapModel.option.hoverLink && this.api.dispatchAction({\n type: method,\n batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel)\n });\n }\n },\n\n /**\n * @private\n */\n _getItemAlign: function () {\n var visualMapModel = this.visualMapModel;\n var modelOption = visualMapModel.option;\n\n if (modelOption.orient === 'vertical') {\n return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize);\n } else {\n // horizontal, most case left unless specifying right.\n var align = modelOption.align;\n\n if (!align || align === 'auto') {\n align = 'left';\n }\n\n return align;\n }\n },\n\n /**\n * @private\n */\n _renderEndsText: function (group, text, itemSize, showLabel, itemAlign) {\n if (!text) {\n return;\n }\n\n var itemGroup = new graphic.Group();\n var textStyleModel = this.visualMapModel.textStyleModel;\n itemGroup.add(new graphic.Text({\n style: {\n x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,\n y: itemSize[1] / 2,\n textVerticalAlign: 'middle',\n textAlign: showLabel ? itemAlign : 'center',\n text: text,\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n }));\n group.add(itemGroup);\n },\n\n /**\n * @private\n * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.\n */\n _getViewData: function () {\n var visualMapModel = this.visualMapModel;\n var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {\n return {\n piece: piece,\n indexInModelPieceList: index\n };\n });\n var endsText = visualMapModel.get('text'); // Consider orient and inverse.\n\n var orient = visualMapModel.get('orient');\n var inverse = visualMapModel.get('inverse'); // Order of model pieceList is always [low, ..., high]\n\n if (orient === 'horizontal' ? inverse : !inverse) {\n viewPieceList.reverse();\n } // Origin order of endsText is [high, low]\n else if (endsText) {\n endsText = endsText.slice().reverse();\n }\n\n return {\n viewPieceList: viewPieceList,\n endsText: endsText\n };\n },\n\n /**\n * @private\n */\n _createItemSymbol: function (group, representValue, shapeParam) {\n group.add(createSymbol(this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3], this.getControllerVisual(representValue, 'color')));\n },\n\n /**\n * @private\n */\n _onItemClick: function (piece) {\n var visualMapModel = this.visualMapModel;\n var option = visualMapModel.option;\n var selected = zrUtil.clone(option.selected);\n var newKey = visualMapModel.getSelectedMapKey(piece);\n\n if (option.selectedMode === 'single') {\n selected[newKey] = true;\n zrUtil.each(selected, function (o, key) {\n selected[key] = key === newKey;\n });\n } else {\n selected[newKey] = !selected[newKey];\n }\n\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: selected\n });\n }\n});\nvar _default = PiecewiseVisualMapView;\nmodule.exports = _default;","\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\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar visualDefault = require(\"../../visual/visualDefault\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar visualSolution = require(\"../../visual/visualSolution\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar numberUtil = require(\"../../util/number\");\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 mapVisual = VisualMapping.mapVisual;\nvar eachVisual = VisualMapping.eachVisual;\nvar isArray = zrUtil.isArray;\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\nvar linearMap = numberUtil.linearMap;\nvar noop = zrUtil.noop;\nvar VisualMapModel = echarts.extendComponentModel({\n type: 'visualMap',\n dependencies: ['series'],\n\n /**\n * @readOnly\n * @type {Array.}\n */\n stateList: ['inRange', 'outOfRange'],\n\n /**\n * @readOnly\n * @type {Array.}\n */\n replacableOptionKeys: ['inRange', 'outOfRange', 'target', 'controller', 'color'],\n\n /**\n * [lowerBound, upperBound]\n *\n * @readOnly\n * @type {Array.}\n */\n dataBound: [-Infinity, Infinity],\n\n /**\n * @readOnly\n * @type {string|Object}\n */\n layoutMode: {\n type: 'box',\n ignoreSize: true\n },\n\n /**\n * @protected\n */\n defaultOption: {\n show: true,\n zlevel: 0,\n z: 4,\n seriesIndex: 'all',\n // 'all' or null/undefined: all series.\n // A number or an array of number: the specified series.\n // set min: 0, max: 200, only for campatible with ec2.\n // In fact min max should not have default value.\n min: 0,\n // min value, must specified if pieces is not specified.\n max: 200,\n // max value, must specified if pieces is not specified.\n dimension: null,\n inRange: null,\n // 'color', 'colorHue', 'colorSaturation', 'colorLightness', 'colorAlpha',\n // 'symbol', 'symbolSize'\n outOfRange: null,\n // 'color', 'colorHue', 'colorSaturation',\n // 'colorLightness', 'colorAlpha',\n // 'symbol', 'symbolSize'\n left: 0,\n // 'center' ¦ 'left' ¦ 'right' ¦ {number} (px)\n right: null,\n // The same as left.\n top: null,\n // 'top' ¦ 'bottom' ¦ 'center' ¦ {number} (px)\n bottom: 0,\n // The same as top.\n itemWidth: null,\n itemHeight: null,\n inverse: false,\n orient: 'vertical',\n // 'horizontal' ¦ 'vertical'\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n // 值域边框颜色\n contentColor: '#5793f3',\n inactiveColor: '#aaa',\n borderWidth: 0,\n // 值域边框线宽,单位px,默认为0(无边框)\n padding: 5,\n // 值域内边距,单位px,默认各方向内边距为5,\n // 接受数组分别设定上右下左边距,同css\n textGap: 10,\n //\n precision: 0,\n // 小数精度,默认为0,无小数点\n color: null,\n //颜色(deprecated,兼容ec2,顺序同pieces,不同于inRange/outOfRange)\n formatter: null,\n text: null,\n // 文本,如['高', '低'],兼容ec2,text[0]对应高值,text[1]对应低值\n textStyle: {\n color: '#333' // 值域文字颜色\n\n }\n },\n\n /**\n * @protected\n */\n init: function (option, parentModel, ecModel) {\n /**\n * @private\n * @type {Array.}\n */\n this._dataExtent;\n /**\n * @readOnly\n */\n\n this.targetVisuals = {};\n /**\n * @readOnly\n */\n\n this.controllerVisuals = {};\n /**\n * @readOnly\n */\n\n this.textStyleModel;\n /**\n * [width, height]\n * @readOnly\n * @type {Array.}\n */\n\n this.itemSize;\n this.mergeDefaultAndTheme(option, ecModel);\n },\n\n /**\n * @protected\n */\n optionUpdated: function (newOption, isInit) {\n var thisOption = this.option; // FIXME\n // necessary?\n // Disable realtime view update if canvas is not supported.\n\n if (!env.canvasSupported) {\n thisOption.realtime = false;\n }\n\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, this.replacableOptionKeys);\n this.textStyleModel = this.getModel('textStyle');\n this.resetItemSize();\n this.completeVisualOption();\n },\n\n /**\n * @protected\n */\n resetVisual: function (supplementVisualOption) {\n var stateList = this.stateList;\n supplementVisualOption = zrUtil.bind(supplementVisualOption, this);\n this.controllerVisuals = visualSolution.createVisualMappings(this.option.controller, stateList, supplementVisualOption);\n this.targetVisuals = visualSolution.createVisualMappings(this.option.target, stateList, supplementVisualOption);\n },\n\n /**\n * @protected\n * @return {Array.} An array of series indices.\n */\n getTargetSeriesIndices: function () {\n var optionSeriesIndex = this.option.seriesIndex;\n var seriesIndices = [];\n\n if (optionSeriesIndex == null || optionSeriesIndex === 'all') {\n this.ecModel.eachSeries(function (seriesModel, index) {\n seriesIndices.push(index);\n });\n } else {\n seriesIndices = modelUtil.normalizeToArray(optionSeriesIndex);\n }\n\n return seriesIndices;\n },\n\n /**\n * @public\n */\n eachTargetSeries: function (callback, context) {\n zrUtil.each(this.getTargetSeriesIndices(), function (seriesIndex) {\n callback.call(context, this.ecModel.getSeriesByIndex(seriesIndex));\n }, this);\n },\n\n /**\n * @pubilc\n */\n isTargetSeries: function (seriesModel) {\n var is = false;\n this.eachTargetSeries(function (model) {\n model === seriesModel && (is = true);\n });\n return is;\n },\n\n /**\n * @example\n * this.formatValueText(someVal); // format single numeric value to text.\n * this.formatValueText(someVal, true); // format single category value to text.\n * this.formatValueText([min, max]); // format numeric min-max to text.\n * this.formatValueText([this.dataBound[0], max]); // using data lower bound.\n * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.\n *\n * @param {number|Array.} value Real value, or this.dataBound[0 or 1].\n * @param {boolean} [isCategory=false] Only available when value is number.\n * @param {Array.} edgeSymbols Open-close symbol when value is interval.\n * @return {string}\n * @protected\n */\n formatValueText: function (value, isCategory, edgeSymbols) {\n var option = this.option;\n var precision = option.precision;\n var dataBound = this.dataBound;\n var formatter = option.formatter;\n var isMinMax;\n var textValue;\n edgeSymbols = edgeSymbols || ['<', '>'];\n\n if (zrUtil.isArray(value)) {\n value = value.slice();\n isMinMax = true;\n }\n\n textValue = isCategory ? value : isMinMax ? [toFixed(value[0]), toFixed(value[1])] : toFixed(value);\n\n if (zrUtil.isString(formatter)) {\n return formatter.replace('{value}', isMinMax ? textValue[0] : textValue).replace('{value2}', isMinMax ? textValue[1] : textValue);\n } else if (zrUtil.isFunction(formatter)) {\n return isMinMax ? formatter(value[0], value[1]) : formatter(value);\n }\n\n if (isMinMax) {\n if (value[0] === dataBound[0]) {\n return edgeSymbols[0] + ' ' + textValue[1];\n } else if (value[1] === dataBound[1]) {\n return edgeSymbols[1] + ' ' + textValue[0];\n } else {\n return textValue[0] + ' - ' + textValue[1];\n }\n } else {\n // Format single value (includes category case).\n return textValue;\n }\n\n function toFixed(val) {\n return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20));\n }\n },\n\n /**\n * @protected\n */\n resetExtent: function () {\n var thisOption = this.option; // Can not calculate data extent by data here.\n // Because series and data may be modified in processing stage.\n // So we do not support the feature \"auto min/max\".\n\n var extent = asc([thisOption.min, thisOption.max]);\n this._dataExtent = extent;\n },\n\n /**\n * @public\n * @param {module:echarts/data/List} list\n * @return {string} Concrete dimention. If return null/undefined,\n * no dimension used.\n */\n getDataDimension: function (list) {\n var optDim = this.option.dimension;\n var listDimensions = list.dimensions;\n\n if (optDim == null && !listDimensions.length) {\n return;\n }\n\n if (optDim != null) {\n return list.getDimension(optDim);\n }\n\n var dimNames = list.dimensions;\n\n for (var i = dimNames.length - 1; i >= 0; i--) {\n var dimName = dimNames[i];\n var dimInfo = list.getDimensionInfo(dimName);\n\n if (!dimInfo.isCalculationCoord) {\n return dimName;\n }\n }\n },\n\n /**\n * @public\n * @override\n */\n getExtent: function () {\n return this._dataExtent.slice();\n },\n\n /**\n * @protected\n */\n completeVisualOption: function () {\n var ecModel = this.ecModel;\n var thisOption = this.option;\n var base = {\n inRange: thisOption.inRange,\n outOfRange: thisOption.outOfRange\n };\n var target = thisOption.target || (thisOption.target = {});\n var controller = thisOption.controller || (thisOption.controller = {});\n zrUtil.merge(target, base); // Do not override\n\n zrUtil.merge(controller, base); // Do not override\n\n var isCategory = this.isCategory();\n completeSingle.call(this, target);\n completeSingle.call(this, controller);\n completeInactive.call(this, target, 'inRange', 'outOfRange'); // completeInactive.call(this, target, 'outOfRange', 'inRange');\n\n completeController.call(this, controller);\n\n function completeSingle(base) {\n // Compatible with ec2 dataRange.color.\n // The mapping order of dataRange.color is: [high value, ..., low value]\n // whereas inRange.color and outOfRange.color is [low value, ..., high value]\n // Notice: ec2 has no inverse.\n if (isArray(thisOption.color) // If there has been inRange: {symbol: ...}, adding color is a mistake.\n // So adding color only when no inRange defined.\n && !base.inRange) {\n base.inRange = {\n color: thisOption.color.slice().reverse()\n };\n } // Compatible with previous logic, always give a defautl color, otherwise\n // simple config with no inRange and outOfRange will not work.\n // Originally we use visualMap.color as the default color, but setOption at\n // the second time the default color will be erased. So we change to use\n // constant DEFAULT_COLOR.\n // If user do not want the defualt color, set inRange: {color: null}.\n\n\n base.inRange = base.inRange || {\n color: ecModel.get('gradientColor')\n }; // If using shortcut like: {inRange: 'symbol'}, complete default value.\n\n each(this.stateList, function (state) {\n var visualType = base[state];\n\n if (zrUtil.isString(visualType)) {\n var defa = visualDefault.get(visualType, 'active', isCategory);\n\n if (defa) {\n base[state] = {};\n base[state][visualType] = defa;\n } else {\n // Mark as not specified.\n delete base[state];\n }\n }\n }, this);\n }\n\n function completeInactive(base, stateExist, stateAbsent) {\n var optExist = base[stateExist];\n var optAbsent = base[stateAbsent];\n\n if (optExist && !optAbsent) {\n optAbsent = base[stateAbsent] = {};\n each(optExist, function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n\n var defa = visualDefault.get(visualType, 'inactive', isCategory);\n\n if (defa != null) {\n optAbsent[visualType] = defa; // Compatibable with ec2:\n // Only inactive color to rgba(0,0,0,0) can not\n // make label transparent, so use opacity also.\n\n if (visualType === 'color' && !optAbsent.hasOwnProperty('opacity') && !optAbsent.hasOwnProperty('colorAlpha')) {\n optAbsent.opacity = [0, 0];\n }\n }\n });\n }\n }\n\n function completeController(controller) {\n var symbolExists = (controller.inRange || {}).symbol || (controller.outOfRange || {}).symbol;\n var symbolSizeExists = (controller.inRange || {}).symbolSize || (controller.outOfRange || {}).symbolSize;\n var inactiveColor = this.get('inactiveColor');\n each(this.stateList, function (state) {\n var itemSize = this.itemSize;\n var visuals = controller[state]; // Set inactive color for controller if no other color\n // attr (like colorAlpha) specified.\n\n if (!visuals) {\n visuals = controller[state] = {\n color: isCategory ? inactiveColor : [inactiveColor]\n };\n } // Consistent symbol and symbolSize if not specified.\n\n\n if (visuals.symbol == null) {\n visuals.symbol = symbolExists && zrUtil.clone(symbolExists) || (isCategory ? 'roundRect' : ['roundRect']);\n }\n\n if (visuals.symbolSize == null) {\n visuals.symbolSize = symbolSizeExists && zrUtil.clone(symbolSizeExists) || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]);\n } // Filter square and none.\n\n\n visuals.symbol = mapVisual(visuals.symbol, function (symbol) {\n return symbol === 'none' || symbol === 'square' ? 'roundRect' : symbol;\n }); // Normalize symbolSize\n\n var symbolSize = visuals.symbolSize;\n\n if (symbolSize != null) {\n var max = -Infinity; // symbolSize can be object when categories defined.\n\n eachVisual(symbolSize, function (value) {\n value > max && (max = value);\n });\n visuals.symbolSize = mapVisual(symbolSize, function (value) {\n return linearMap(value, [0, max], [0, itemSize[0]], true);\n });\n }\n }, this);\n }\n },\n\n /**\n * @protected\n */\n resetItemSize: function () {\n this.itemSize = [parseFloat(this.get('itemWidth')), parseFloat(this.get('itemHeight'))];\n },\n\n /**\n * @public\n */\n isCategory: function () {\n return !!this.option.categories;\n },\n\n /**\n * @public\n * @abstract\n */\n setSelected: noop,\n\n /**\n * @public\n * @abstract\n * @param {*|module:echarts/data/List} valueOrData\n * @param {number} dataIndex\n * @return {string} state See this.stateList\n */\n getValueState: noop,\n\n /**\n * FIXME\n * Do not publish to thirt-part-dev temporarily\n * util the interface is stable. (Should it return\n * a function but not visual meta?)\n *\n * @pubilc\n * @abstract\n * @param {Function} getColorVisual\n * params: value, valueState\n * return: color\n * @return {Object} visualMeta\n * should includes {stops, outerColors}\n * outerColor means [colorBeyondMinValue, colorBeyondMaxValue]\n */\n getVisualMeta: noop\n});\nvar _default = VisualMapModel;\nmodule.exports = _default;","\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\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar layout = require(\"../../util/layout\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\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 _default = echarts.extendComponentView({\n type: 'visualMap',\n\n /**\n * @readOnly\n * @type {Object}\n */\n autoPositionValues: {\n left: 1,\n right: 1,\n top: 1,\n bottom: 1\n },\n init: function (ecModel, api) {\n /**\n * @readOnly\n * @type {module:echarts/model/Global}\n */\n this.ecModel = ecModel;\n /**\n * @readOnly\n * @type {module:echarts/ExtensionAPI}\n */\n\n this.api = api;\n /**\n * @readOnly\n * @type {module:echarts/component/visualMap/visualMapModel}\n */\n\n this.visualMapModel;\n },\n\n /**\n * @protected\n */\n render: function (visualMapModel, ecModel, api, payload) {\n this.visualMapModel = visualMapModel;\n\n if (visualMapModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n\n this.doRender.apply(this, arguments);\n },\n\n /**\n * @protected\n */\n renderBackground: function (group) {\n var visualMapModel = this.visualMapModel;\n var padding = formatUtil.normalizeCssArray(visualMapModel.get('padding') || 0);\n var rect = group.getBoundingRect();\n group.add(new graphic.Rect({\n z2: -1,\n // Lay background rect on the lowest layer.\n silent: true,\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[3] + padding[1],\n height: rect.height + padding[0] + padding[2]\n },\n style: {\n fill: visualMapModel.get('backgroundColor'),\n stroke: visualMapModel.get('borderColor'),\n lineWidth: visualMapModel.get('borderWidth')\n }\n }));\n },\n\n /**\n * @protected\n * @param {number} targetValue can be Infinity or -Infinity\n * @param {string=} visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize'\n * @param {Object} [opts]\n * @param {string=} [opts.forceState] Specify state, instead of using getValueState method.\n * @param {string=} [opts.convertOpacityToAlpha=false] For color gradient in controller widget.\n * @return {*} Visual value.\n */\n getControllerVisual: function (targetValue, visualCluster, opts) {\n opts = opts || {};\n var forceState = opts.forceState;\n var visualMapModel = this.visualMapModel;\n var visualObj = {}; // Default values.\n\n if (visualCluster === 'symbol') {\n visualObj.symbol = visualMapModel.get('itemSymbol');\n }\n\n if (visualCluster === 'color') {\n var defaultColor = visualMapModel.get('contentColor');\n visualObj.color = defaultColor;\n }\n\n function getter(key) {\n return visualObj[key];\n }\n\n function setter(key, value) {\n visualObj[key] = value;\n }\n\n var mappings = visualMapModel.controllerVisuals[forceState || visualMapModel.getValueState(targetValue)];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n zrUtil.each(visualTypes, function (type) {\n var visualMapping = mappings[type];\n\n if (opts.convertOpacityToAlpha && type === 'opacity') {\n type = 'colorAlpha';\n visualMapping = mappings.__alphaForOpacity;\n }\n\n if (VisualMapping.dependsOn(type, visualCluster)) {\n visualMapping && visualMapping.applyVisual(targetValue, getter, setter);\n }\n });\n return visualObj[visualCluster];\n },\n\n /**\n * @protected\n */\n positionGroup: function (group) {\n var model = this.visualMapModel;\n var api = this.api;\n layout.positionElement(group, model.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n },\n\n /**\n * @protected\n * @abstract\n */\n doRender: zrUtil.noop\n});\n\nmodule.exports = _default;","\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\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _layout = require(\"../../util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\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 * @param {module:echarts/component/visualMap/VisualMapModel} visualMapModel\\\n * @param {module:echarts/ExtensionAPI} api\n * @param {Array.} itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\nfunction getItemAlign(visualMapModel, api, itemSize) {\n var modelOption = visualMapModel.option;\n var itemAlign = modelOption.align;\n\n if (itemAlign != null && itemAlign !== 'auto') {\n return itemAlign;\n } // Auto decision align.\n\n\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n var paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n var layoutInput = {};\n\n for (var i = 0; i < 3; i++) {\n layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];\n layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];\n }\n\n var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];\n var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);\n return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];\n}\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\n\n\nfunction makeHighDownBatch(batch, visualMapModel) {\n zrUtil.each(batch || [], function (batchItem) {\n if (batchItem.dataIndex != null) {\n batchItem.dataIndexInside = batchItem.dataIndex;\n batchItem.dataIndex = null;\n }\n\n batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}\n\nexports.getItemAlign = getItemAlign;\nexports.makeHighDownBatch = makeHighDownBatch;","\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\nvar zrUtil = require(\"zrender/lib/core/util\");\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 each = zrUtil.each;\n\nfunction _default(option) {\n var visualMap = option && option.visualMap;\n\n if (!zrUtil.isArray(visualMap)) {\n visualMap = visualMap ? [visualMap] : [];\n }\n\n each(visualMap, function (opt) {\n if (!opt) {\n return;\n } // rename splitList to pieces\n\n\n if (has(opt, 'splitList') && !has(opt, 'pieces')) {\n opt.pieces = opt.splitList;\n delete opt.splitList;\n }\n\n var pieces = opt.pieces;\n\n if (pieces && zrUtil.isArray(pieces)) {\n each(pieces, function (piece) {\n if (zrUtil.isObject(piece)) {\n if (has(piece, 'start') && !has(piece, 'min')) {\n piece.min = piece.start;\n }\n\n if (has(piece, 'end') && !has(piece, 'max')) {\n piece.max = piece.end;\n }\n }\n });\n }\n });\n}\n\nfunction has(obj, name) {\n return obj && obj.hasOwnProperty && obj.hasOwnProperty(name);\n}\n\nmodule.exports = _default;","\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\nvar Component = require(\"../../model/Component\");\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*/\nComponent.registerSubTypeDefaulter('visualMap', function (option) {\n // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used.\n return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? 'continuous' : 'piecewise';\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\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar visualSolution = require(\"../../visual/visualSolution\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\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 VISUAL_PRIORITY = echarts.PRIORITY.VISUAL.COMPONENT;\necharts.registerVisual(VISUAL_PRIORITY, {\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var resetDefines = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n var pipelineContext = seriesModel.pipelineContext;\n\n if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) {\n return;\n }\n\n resetDefines.push(visualSolution.incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, zrUtil.bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimension(seriesModel.getData())));\n });\n return resetDefines;\n }\n}); // Only support color.\n\necharts.registerVisual(VISUAL_PRIORITY, {\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var visualMetaList = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n if (visualMapModel.isTargetSeries(seriesModel)) {\n var visualMeta = visualMapModel.getVisualMeta(zrUtil.bind(getColorVisual, null, seriesModel, visualMapModel)) || {\n stops: [],\n outerColors: []\n };\n var concreteDim = visualMapModel.getDataDimension(data);\n var dimInfo = data.getDimensionInfo(concreteDim);\n\n if (dimInfo != null) {\n // visualMeta.dimension should be dimension index, but not concrete dimension.\n visualMeta.dimension = dimInfo.index;\n visualMetaList.push(visualMeta);\n }\n }\n }); // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n}); // FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\n\nfunction getColorVisual(seriesModel, visualMapModel, value, valueState) {\n var mappings = visualMapModel.targetVisuals[valueState];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n var resultVisual = {\n color: seriesModel.getData().getVisual('color') // default color.\n\n };\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n var mapping = mappings[type === 'opacity' ? '__alphaForOpacity' : type];\n mapping && mapping.applyVisual(value, getVisual, setVisual);\n }\n\n return resultVisual.color;\n\n function getVisual(key) {\n return resultVisual[key];\n }\n\n function setVisual(key, value) {\n resultVisual[key] = value;\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\nvar echarts = require(\"../../echarts\");\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 actionInfo = {\n type: 'selectDataRange',\n event: 'dataRangeSelected',\n // FIXME use updateView appears wrong\n update: 'update'\n};\necharts.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'visualMap',\n query: payload\n }, function (model) {\n model.setSelected(payload.selected);\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* 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// (1) The code `if (__DEV__) ...` can be removed by build tool.\n// (2) If intend to use `__DEV__`, this module should be imported. Use a global\n// variable `__DEV__` may cause that miss the declaration (see #6535), or the\n// declaration is behind of the using position (for example in `Model.extent`,\n// And tools like rollup can not analysis the dependency if not import).\nvar dev; // In browser\n\nif (typeof window !== 'undefined') {\n dev = window.__DEV__;\n} // In node\nelse if (typeof global !== 'undefined') {\n dev = global.__DEV__;\n }\n\nif (typeof dev === 'undefined') {\n dev = true;\n}\n\nvar __DEV__ = dev;\nexports.__DEV__ = __DEV__;"],"names":["echarts","preprocessor","registerPreprocessor","zrUtil","VisualMapModel","numberUtil","DEFAULT_BAR_BOUND","ContinuousModel","extend","type","defaultOption","align","calculable","range","realtime","itemHeight","itemWidth","hoverLink","hoverLinkDataSize","hoverLinkOnHandle","optionUpdated","newOption","isInit","superApply","this","arguments","resetExtent","resetVisual","mappingOption","mappingMethod","dataExtent","getExtent","_resetRange","resetItemSize","itemSize","_orient","reverse","isNaN","option","auto","isArray","Math","max","min","completeVisualOption","prototype","apply","each","stateList","state","symbolSize","controller","setSelected","selected","slice","getSelected","dataInterval","asc","get","getValueState","value","findTargetDataIndices","result","eachTargetSeries","seriesModel","dataIndices","data","getData","getDataDimension","dataIndex","push","seriesId","id","getVisualMeta","getColorVisual","oVals","getColorStopValues","iVals","stops","setStop","valueState","color","iIdx","oIdx","iLen","length","oLen","first","stopsLen","outerColors","visualMapModel","count","step","stopValues","i","_default","module","exports","LinearGradient","eventTool","VisualMapView","graphic","sliderMove","helper","modelUtil","linearMap","mathMin","mathMax","HOVER_LINK_SIZE","HOVER_LINK_OUT","ContinuousView","init","_shapes","_dataInterval","_handleEnds","_useHandle","_hoverLinkDataIndices","_dragging","_hovering","doRender","ecModel","api","payload","from","uid","_buildView","group","removeAll","thisGroup","_resetInterval","_renderBar","dataRangeText","_renderEndsText","_updateView","renderBackground","_enableHoverLinkToSeries","_enableHoverLinkFromSeries","positionGroup","endsIndex","text","textGap","barGroup","position","_applyTransform","orient","textStyleModel","add","Text","style","x","y","textVerticalAlign","textAlign","textFont","getFont","textFill","getTextColor","targetGroup","shapes","useHandle","itemAlign","getItemAlign","_createBarGroup","outOfRange","createPolygon","inRange","getCursor","bind","_dragHandle","textRect","getTextRect","textSize","width","height","handleThumbs","handleLabels","handleLabelPoints","_createHandle","_createIndicator","handleIndex","onDrift","onDragEnd","handleThumb","createHandlePoints","handleLabel","draggable","drift","onmousemove","e","stop","event","ondragend","handleLabelPoint","indicator","attr","invisible","silent","indicatorLabel","indicatorLabelPoint","isEnd","dx","dy","vertex","_updateInterval","dispatchAction","visualMapId","_clearHoverLinkToSeries","useHoverLinkOnHandle","_doHoverLinkToSeries","sizeExtent","delta","handleEnds","forSketch","outOfRangeHandleEnds","inRangeHandleEnds","visualInRange","_createBarVisual","visualOutOfRange","setStyle","fill","barColor","opacity","setShape","barPoints","_updateHandle","forceState","opts","convertOpacityToAlpha","colorStops","_makeColorGradient","symbolSizes","getControllerVisual","_createBarPoints","handlesColor","sampleNumber","offset","currValue","inverse","Group","scale","rotation","PI","textPoint","applyTransform","getTransform","formatValueText","_showIndicator","cursorValue","textValue","rangeSymbol","halfHoverLinkSize","pos","createIndicatorPoints","self","on","offsetX","offsetY","zr","getZr","_hoverLinkFromSeriesMouseOver","_hideIndicator","_clearHoverLinkFromSeries","cursorPos","hoverOnBar","getHalfHoverLinkSize","hoverRange","valueRange","Infinity","oldBatch","newBatch","resultBatches","compressBatches","_dispatchHighDown","makeHighDownBatch","el","target","dataModel","getSeriesByIndex","seriesIndex","isTargetSeries","dataType","indices","off","element","global","transform","batch","dispose","remove","points","cursor","Polygon","shape","isRange","extentMax","_config","__DEV__","VisualMapping","visualDefault","_number","reformIntervals","PiecewiseModel","minOpen","maxOpen","itemSymbol","pieceList","categories","splitNumber","selectedMode","itemGap","showLabel","_pieceList","mode","_mode","_determineMode","resetMethods","call","_resetSelected","clone","map","piece","visual","visualTypesInPieces","visualTypes","listVisualTypes","isCategory","has","obj","visualType","isObject","hasOwnProperty","pieces","v","exists","thisOption","index","key","getSelectedMapKey","hasSel","getPieceList","findPieceIndex","pieceIndex","pIdx","getRepresentValue","representValue","pieceInterval","interval","edge","unshift","curr","precision","parseInt","splitStep","toFixed","close","cate","normalizeReverse","pieceListItem","item","label","closeList","infinityList","useMinMax","lg","names","retrieveVisuals","edgeSymbols","_symbol","createSymbol","layout","PiecewiseVisualMapView","_getItemAlign","viewData","_getViewData","endsText","retrieve","renderItem","itemGroup","onclick","_onItemClick","_enableHoverLink","indexInModelPieceList","_createItemSymbol","visualState","viewPieceList","box","onHoverLink","method","modelOption","shapeParam","newKey","o","env","visualSolution","mapVisual","eachVisual","noop","extendComponentModel","dependencies","replacableOptionKeys","dataBound","layoutMode","ignoreSize","show","zlevel","z","dimension","left","right","top","bottom","backgroundColor","borderColor","contentColor","inactiveColor","borderWidth","padding","formatter","textStyle","parentModel","_dataExtent","targetVisuals","controllerVisuals","mergeDefaultAndTheme","canvasSupported","replaceVisualOption","getModel","supplementVisualOption","createVisualMappings","getTargetSeriesIndices","optionSeriesIndex","seriesIndices","eachSeries","normalizeToArray","callback","context","is","model","isMinMax","isString","replace","isFunction","val","extent","list","optDim","listDimensions","dimensions","getDimension","dimNames","dimName","dimInfo","getDimensionInfo","isCalculationCoord","base","merge","completeSingle","defa","completeInactive","stateExist","stateAbsent","optExist","optAbsent","visualData","isValidType","completeController","symbolExists","symbol","symbolSizeExists","visuals","parseFloat","formatUtil","extendComponentView","autoPositionValues","render","normalizeCssArray","rect","getBoundingRect","Rect","z2","stroke","lineWidth","targetValue","visualCluster","visualObj","defaultColor","getter","setter","mappings","prepareVisualTypes","visualMapping","__alphaForOpacity","dependsOn","applyVisual","positionElement","getBoxLayoutParams","getWidth","getHeight","_layout","getLayoutRect","ecSize","realIndex","paramsSet","reals","fakeValue","layoutInput","rParam","margin","batchItem","dataIndexInside","highlightKey","componentIndex","visualMap","opt","splitList","start","end","name","Component","registerSubTypeDefaulter","VISUAL_PRIORITY","PRIORITY","VISUAL","COMPONENT","resultVisual","getVisual","len","mapping","setVisual","registerVisual","createOnAllSeries","reset","resetDefines","eachComponent","pipelineContext","large","incrementalApplyVisual","visualMetaList","visualMeta","concreteDim","actionInfo","update","registerAction","mainType","query","dev","window","g"],"sourceRoot":""}