1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.number.to-fixed.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\nimport { defaultEmphasis } from '../../util/model.js';\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\nimport SeriesModel from '../../model/Series.js';\n\nvar FunnelSeriesModel =\n/** @class */\nfunction (_super) {\n __extends(FunnelSeriesModel, _super);\n\n function FunnelSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = FunnelSeriesModel.type;\n return _this;\n }\n\n FunnelSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n\n\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)); // Extend labelLine emphasis\n\n this._defaultLabelLine(option);\n };\n\n FunnelSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesDataSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n };\n\n FunnelSeriesModel.prototype._defaultLabelLine = function (option) {\n // Extend labelLine emphasis\n defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false`\n\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n }; // Overwrite\n\n\n FunnelSeriesModel.prototype.getDataParams = function (dataIndex) {\n var data = this.getData();\n\n var params = _super.prototype.getDataParams.call(this, dataIndex);\n\n var valueDim = data.mapDimension('value');\n var sum = data.getSum(valueDim); // Percent is 0 if sum is 0\n\n params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2);\n params.$vars.push('percent');\n return params;\n };\n\n FunnelSeriesModel.type = 'series.funnel';\n FunnelSeriesModel.defaultOption = {\n // zlevel: 0, // 一级层叠\n z: 2,\n legendHoverLink: true,\n colorBy: 'data',\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n // 默认取数据最小最大值\n // min: 0,\n // max: 100,\n minSize: '0%',\n maxSize: '100%',\n sort: 'descending',\n orient: 'vertical',\n gap: 0,\n funnelAlign: 'center',\n label: {\n show: true,\n position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n\n },\n labelLine: {\n show: true,\n length: 20,\n lineStyle: {\n // color: 各异,\n width: 1\n }\n },\n itemStyle: {\n // color: 各异,\n borderColor: '#fff',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return FunnelSeriesModel;\n}(SeriesModel);\n\nexport default FunnelSeriesModel;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/chart/funnel/FunnelSeries.js"],"names":["__extends","zrUtil","createSeriesDataSimply","defaultEmphasis","makeSeriesEncodeForNameBased","LegendVisualProvider","SeriesModel","FunnelSeriesModel","_super","_this","apply","arguments","type","prototype","init","option","legendVisualProvider","bind","getData","getRawData","_defaultLabelLine","getInitialData","ecModel","coordDimensions","encodeDefaulter","curry","labelLineNormalOpt","labelLine","labelLineEmphasisOpt","emphasis","show","label","getDataParams","dataIndex","data","params","call","valueDim","mapDimension","sum","getSum","percent","get","toFixed","$vars","push","defaultOption","z","legendHoverLink","colorBy","left","top","right","bottom","minSize","maxSize","sort","orient","gap","funnelAlign","position","length","lineStyle","width","itemStyle","borderColor","borderWidth","select"],"mappings":";;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,OAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,0BAAxB;AACA,OAAOC,sBAAP,MAAmC,qCAAnC;AACA,SAASC,eAAT,QAAgC,qBAAhC;AACA,SAASC,4BAAT,QAA6C,mCAA7C;AACA,OAAOC,oBAAP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C,IAAAA,CAAC,EAAE,CAF6B;AAGhCC,IAAAA,eAAe,EAAE,IAHe;AAIhCC,IAAAA,OAAO,EAAE,MAJuB;AAKhCC,IAAAA,IAAI,EAAE,EAL0B;AAMhCC,IAAAA,GAAG,EAAE,EAN2B;AAOhCC,IAAAA,KAAK,EAAE,EAPyB;AAQhCC,IAAAA,MAAM,EAAE,EARwB;AAShC;AACA;AACA;AACA;AACA;AACAC,IAAAA,OAAO,EAAE,IAduB;AAehCC,IAAAA,OAAO,EAAE,MAfuB;AAgBhCC,IAAAA,IAAI,EAAE,YAhB0B;AAiBhCC,IAAAA,MAAM,EAAE,UAjBwB;AAkBhCC,IAAAA,GAAG,EAAE,CAlB2B;AAmBhCC,IAAAA,WAAW,EAAE,QAnBmB;AAoBhC5B,IAAAA,KAAK,EAAE;AACLD,MAAAA,IAAI,EAAE,IADD;AAEL8B,MAAAA,QAAQ,EAAE,OAFL,CAEa;;AAFb,KApByB;AAyBhCjC,IAAAA,SAAS,EAAE;AACTG,MAAAA,IAAI,EAAE,IADG;AAET+B,MAAAA,MAAM,EAAE,EAFC;AAGTC,MAAAA,SAAS,EAAE;AACT;AACAC,QAAAA,KAAK,EAAE;AAFE;AAHF,KAzBqB;AAiChCC,IAAAA,SAAS,EAAE;AACT;AACAC,MAAAA,WAAW,EAAE,MAFJ;AAGTC,MAAAA,WAAW,EAAE;AAHJ,KAjCqB;AAsChCrC,IAAAA,QAAQ,EAAE;AACRE,MAAAA,KAAK,EAAE;AACLD,QAAAA,IAAI,EAAE;AADD;AADC,KAtCsB;AA2ChCqC,IAAAA,MAAM,EAAE;AACNH,MAAAA,SAAS,EAAE;AACTC,QAAAA,WAAW,EAAE;AADJ;AADL;AA3CwB,GAAlC;AAiDA,SAAO1D,iBAAP;AACD,CAtGD,CAsGED,WAtGF,CAFA;;AA0GA,eAAeC,iBAAf","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\nimport { __extends } from \"tslib\";\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nimport createSeriesDataSimply from '../helper/createSeriesDataSimply.js';\r\nimport { defaultEmphasis } from '../../util/model.js';\r\nimport { makeSeriesEncodeForNameBased } from '../../data/helper/sourceHelper.js';\r\nimport LegendVisualProvider from '../../visual/LegendVisualProvider.js';\r\nimport SeriesModel from '../../model/Series.js';\r\n\r\nvar FunnelSeriesModel =\r\n/** @class */\r\nfunction (_super) {\r\n __extends(FunnelSeriesModel, _super);\r\n\r\n function FunnelSeriesModel() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n\r\n _this.type = FunnelSeriesModel.type;\r\n return _this;\r\n }\r\n\r\n FunnelSeriesModel.prototype.init = function (option) {\r\n _super.prototype.init.apply(this, arguments); // Enable legend selection for each data item\r\n // Use a function instead of direct access because data reference may changed\r\n\r\n\r\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)); // Extend labelLine emphasis\r\n\r\n this._defaultLabelLine(option);\r\n };\r\n\r\n FunnelSeriesModel.prototype.getInitialData = function (option, ecModel) {\r\n return createSeriesDataSimply(this, {\r\n coordDimensions: ['value'],\r\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\r\n });\r\n };\r\n\r\n FunnelSeriesModel.prototype._defaultLabelLine = function (option) {\r\n // Extend labelLine emphasis\r\n defaultEmphasis(option, 'labelLine', ['show']);\r\n var labelLineNormalOpt = option.labelLine;\r\n var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false`\r\n\r\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\r\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\r\n }; // Overwrite\r\n\r\n\r\n FunnelSeriesModel.prototype.getDataParams = function (dataIndex) {\r\n var data = this.getData();\r\n\r\n var params = _super.prototype.getDataParams.call(this, dataIndex);\r\n\r\n var valueDim = data.mapDimension('value');\r\n var sum = data.getSum(valueDim); // Percent is 0 if sum is 0\r\n\r\n params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2);\r\n params.$vars.push('percent');\r\n return params;\r\n };\r\n\r\n FunnelSeriesModel.type = 'series.funnel';\r\n FunnelSeriesModel.defaultOption = {\r\n // zlevel: 0, // 一级层叠\r\n z: 2,\r\n legendHoverLink: true,\r\n colorBy: 'data',\r\n left: 80,\r\n top: 60,\r\n right: 80,\r\n bottom: 60,\r\n // width: {totalWidth} - left - right,\r\n // height: {totalHeight} - top - bottom,\r\n // 默认取数据最小最大值\r\n // min: 0,\r\n // max: 100,\r\n minSize: '0%',\r\n maxSize: '100%',\r\n sort: 'descending',\r\n orient: 'vertical',\r\n gap: 0,\r\n funnelAlign: 'center',\r\n label: {\r\n show: true,\r\n position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\r\n\r\n },\r\n labelLine: {\r\n show: true,\r\n length: 20,\r\n lineStyle: {\r\n // color: 各异,\r\n width: 1\r\n }\r\n },\r\n itemStyle: {\r\n // color: 各异,\r\n borderColor: '#fff',\r\n borderWidth: 1\r\n },\r\n emphasis: {\r\n label: {\r\n show: true\r\n }\r\n },\r\n select: {\r\n itemStyle: {\r\n borderColor: '#212121'\r\n }\r\n }\r\n };\r\n return FunnelSeriesModel;\r\n}(SeriesModel);\r\n\r\nexport default FunnelSeriesModel;"]},"metadata":{},"sourceType":"module"} |