| 1 |
- {"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nexport var visualMapEncodingHandlers = [{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var resetDefines = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n var pipelineContext = seriesModel.pipelineContext;\n if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) {\n return;\n }\n resetDefines.push(visualSolution.incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, zrUtil.bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimensionIndex(seriesModel.getData())));\n });\n return resetDefines;\n }\n},\n// Only support color.\n{\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 dimIdx = visualMapModel.getDataDimensionIndex(data);\n if (dimIdx >= 0) {\n // visualMeta.dimension should be dimension index, but not concrete dimension.\n visualMeta.dimension = dimIdx;\n visualMetaList.push(visualMeta);\n }\n }\n });\n // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n}];\n// FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\nfunction getColorVisual(seriesModel, visualMapModel, value, valueState) {\n var mappings = visualMapModel.targetVisuals[valueState];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n var resultVisual = {\n color: getVisualFromData(seriesModel.getData(), 'color') // default color.\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 return resultVisual.color;\n function getVisual(key) {\n return resultVisual[key];\n }\n function setVisual(key, value) {\n resultVisual[key] = value;\n }\n}","map":{"version":3,"names":["zrUtil","visualSolution","VisualMapping","getVisualFromData","visualMapEncodingHandlers","createOnAllSeries","reset","seriesModel","ecModel","resetDefines","eachComponent","visualMapModel","pipelineContext","isTargetSeries","large","push","incrementalApplyVisual","stateList","targetVisuals","bind","getValueState","getDataDimensionIndex","getData","data","visualMetaList","visualMeta","getVisualMeta","getColorVisual","stops","outerColors","dimIdx","dimension","setVisual","value","valueState","mappings","visualTypes","prepareVisualTypes","resultVisual","color","i","len","length","type","mapping","applyVisual","getVisual","key"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/component/visualMap/visualEncoding.js"],"sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport VisualMapping from '../../visual/VisualMapping.js';\nimport { getVisualFromData } from '../../visual/helper.js';\nexport var visualMapEncodingHandlers = [{\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var resetDefines = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n var pipelineContext = seriesModel.pipelineContext;\n if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) {\n return;\n }\n resetDefines.push(visualSolution.incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, zrUtil.bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimensionIndex(seriesModel.getData())));\n });\n return resetDefines;\n }\n},\n// Only support color.\n{\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 dimIdx = visualMapModel.getDataDimensionIndex(data);\n if (dimIdx >= 0) {\n // visualMeta.dimension should be dimension index, but not concrete dimension.\n visualMeta.dimension = dimIdx;\n visualMetaList.push(visualMeta);\n }\n }\n });\n // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n}];\n// FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\nfunction getColorVisual(seriesModel, visualMapModel, value, valueState) {\n var mappings = visualMapModel.targetVisuals[valueState];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n var resultVisual = {\n color: getVisualFromData(seriesModel.getData(), 'color') // default color.\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 return resultVisual.color;\n function getVisual(key) {\n return resultVisual[key];\n }\n function setVisual(key, value) {\n resultVisual[key] = value;\n }\n}"],"mappings":";AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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