{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\node_modules\\@jiaminghi\\data-view\\lib\\components\\conicalColumnChart\\src\\main.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\@jiaminghi\\data-view\\lib\\components\\conicalColumnChart\\src\\main.vue","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.array.sort\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport autoResize from \"../../../mixin/autoResize\";\nimport { deepMerge } from '@jiaminghi/charts/lib/util/index';\nimport { deepClone } from '@jiaminghi/c-render/lib/plugin/util';\nexport default {\n  name: 'DvConicalColumnChart',\n  mixins: [autoResize],\n  props: {\n    config: {\n      type: Object,\n      default: function _default() {\n        return {};\n      }\n    }\n  },\n  data: function data() {\n    return {\n      ref: 'conical-column-chart',\n      defaultConfig: {\n        /**\n         * @description Chart data\n         * @type {Array<Object>}\n         * @default data = []\n         */\n        data: [],\n\n        /**\n         * @description Chart img\n         * @type {Array<String>}\n         * @default img = []\n         */\n        img: [],\n\n        /**\n         * @description Chart font size\n         * @type {Number}\n         * @default fontSize = 12\n         */\n        fontSize: 12,\n\n        /**\n         * @description Img side length\n         * @type {Number}\n         * @default imgSideLength = 30\n         */\n        imgSideLength: 30,\n\n        /**\n         * @description Column color\n         * @type {String}\n         * @default columnColor = 'rgba(0, 194, 255, 0.4)'\n         */\n        columnColor: 'rgba(0, 194, 255, 0.4)',\n\n        /**\n         * @description Text color\n         * @type {String}\n         * @default textColor = '#fff'\n         */\n        textColor: '#fff',\n\n        /**\n         * @description Show value\n         * @type {Boolean}\n         * @default showValue = false\n         */\n        showValue: false\n      },\n      mergedConfig: null,\n      column: []\n    };\n  },\n  watch: {\n    config: function config() {\n      var calcData = this.calcData;\n      calcData();\n    }\n  },\n  methods: {\n    afterAutoResizeMixinInit: function afterAutoResizeMixinInit() {\n      var calcData = this.calcData;\n      calcData();\n    },\n    onResize: function onResize() {\n      var calcData = this.calcData;\n      calcData();\n    },\n    calcData: function calcData() {\n      var mergeConfig = this.mergeConfig,\n          initData = this.initData,\n          calcSVGPath = this.calcSVGPath;\n      mergeConfig();\n      initData();\n      calcSVGPath();\n    },\n    mergeConfig: function mergeConfig() {\n      var defaultConfig = this.defaultConfig,\n          config = this.config;\n      this.mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {});\n    },\n    initData: function initData() {\n      var mergedConfig = this.mergedConfig;\n      var data = mergedConfig.data;\n      data = deepClone(data, true);\n      data.sort(function (_ref, _ref2) {\n        var a = _ref.value;\n        var b = _ref2.value;\n        if (a > b) return -1;\n        if (a < b) return 1;\n        if (a === b) return 0;\n      });\n      var max = data[0] ? data[0].value : 10;\n      data = data.map(function (item) {\n        return _objectSpread(_objectSpread({}, item), {}, {\n          percent: item.value / max\n        });\n      });\n      mergedConfig.data = data;\n    },\n    calcSVGPath: function calcSVGPath() {\n      var mergedConfig = this.mergedConfig,\n          width = this.width,\n          height = this.height;\n      var imgSideLength = mergedConfig.imgSideLength,\n          fontSize = mergedConfig.fontSize,\n          data = mergedConfig.data;\n      var itemNum = data.length;\n      var gap = width / (itemNum + 1);\n      var useAbleHeight = height - imgSideLength - fontSize - 5;\n      var svgBottom = height - fontSize - 5;\n      this.column = data.map(function (item, i) {\n        var percent = item.percent;\n        var middleXPos = gap * (i + 1);\n        var leftXPos = gap * i;\n        var rightXpos = gap * (i + 2);\n        var middleYPos = svgBottom - useAbleHeight * percent;\n        var controlYPos = useAbleHeight * percent * 0.6 + middleYPos;\n        var d = \"\\n          M\".concat(leftXPos, \", \").concat(svgBottom, \"\\n          Q\").concat(middleXPos, \", \").concat(controlYPos, \" \").concat(middleXPos, \",\").concat(middleYPos, \"\\n          M\").concat(middleXPos, \",\").concat(middleYPos, \"\\n          Q\").concat(middleXPos, \", \").concat(controlYPos, \" \").concat(rightXpos, \",\").concat(svgBottom, \"\\n          L\").concat(leftXPos, \", \").concat(svgBottom, \"\\n          Z\\n        \");\n        var textY = (svgBottom + middleYPos) / 2 + fontSize / 2;\n        return _objectSpread(_objectSpread({}, item), {}, {\n          d: d,\n          x: middleXPos,\n          y: middleYPos,\n          textY: textY\n        });\n      });\n    }\n  }\n};",null]}