"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _echartsForReact = _interopRequireDefault(require("echarts-for-react"));
var _vmSubTitle = _interopRequireDefault(require("../vm-sub-title"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Wtlx = function Wtlx(props) {
  var orderCategory = props.orderCategory;
  var color = ['#5C91FA', '#5BD9A7', '#5D7091', '#F5BD16', '#E86351', '#5AD8A6', '#5B8FF9', '#FF9D4D'];
  var option = {
    color: color,
    backgroundColor: 'transparent',
    tooltip: {
      show: true,
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',
      left: '45%',
      top: 'middle',
      align: 'left',
      itemGap: 12,
      itemWidth: 10,
      itemHeight: 10,
      formatter: function formatter(name) {
        var value = orderCategory.find(function (item) {
          return item.name === name;
        });
        if (value) {
          return "\t\t".concat(name, "\t\t").concat(value.value, "\u6B21\t\t");
        } else {
          return '';
        }
      },
      textStyle: {
        fontSize: 14,
        color: '#fff'
      },
      pageIconColor: '#fff',
      pageIconInactiveColor: '#fff',
      pageTextStyle: {
        color: '#fff'
      }
    },
    series: [{
      type: 'pie',
      radius: ['55%', '75%'],
      center: ['20%', '50%'],
      hoverAnimation: true,
      z: 10,
      itemStyle: {
        normal: {
          borderWidth: 2,
          borderColor: '#003359'
        }
      },
      label: {
        show: false
      },
      data: orderCategory,
      labelLine: {
        show: false
      }
    }]
  };
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "appraisal-content-zg-wt"
  }, /*#__PURE__*/_react["default"].createElement(_vmSubTitle["default"], {
    title: "\u95EE\u9898\u7C7B\u578B\u5206\u6790"
  }), /*#__PURE__*/_react["default"].createElement(_echartsForReact["default"], {
    option: option,
    notMerge: true,
    lazyUpdate: true,
    style: {
      height: '200px',
      width: '100%'
    }
  }));
};
var _default = Wtlx;
exports["default"] = _default;
//# sourceMappingURL=Wtlx.js.map
