"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _echartsForReact = _interopRequireDefault(require("echarts-for-react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var getOption = function getOption(_ref) {
  var _ref$xAxis = _ref.xAxis,
    xAxis = _ref$xAxis === void 0 ? [] : _ref$xAxis,
    _ref$data = _ref.data,
    data = _ref$data === void 0 ? [] : _ref$data;
  return {
    color: ['#0E85FF', '#49FF81', '#26D4FF', '#F5D629', '#C97CFF'],
    tooltip: {
      trigger: 'axis'
    },
    legend: {
      top: 0,
      left: 'center',
      textStyle: {
        color: '#fff'
      }
    },
    grid: {
      top: 40,
      left: 30,
      right: 0,
      bottom: 50
    },
    xAxis: {
      data: xAxis,
      axisLabel: {
        color: '#DAF1FF',
        interval: 0
      },
      axisTick: {
        show: false
      },
      axisLine: {
        show: false
      },
      z: 10
    },
    yAxis: {
      name: '单位：次',
      nameTextStyle: {
        color: '#fff'
      },
      axisLine: {
        show: false
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        color: '#fff'
      },
      splitLine: {
        lineStyle: {
          type: 'dashed',
          color: 'rgba(255,255,255,0.2)'
        }
      }
    },
    series: data.map(function (item) {
      return {
        name: item.name,
        type: 'line',
        smooth: true,
        data: item.data
      };
    })
  };
};
var Line1 = function Line1(_ref2) {
  var xAxis = _ref2.xAxis,
    data = _ref2.data,
    style = _ref2.style;
  return /*#__PURE__*/_react["default"].createElement(_echartsForReact["default"], {
    option: getOption({
      xAxis: xAxis,
      data: data
    }),
    style: Object.assign({
      height: '100%'
    }, style)
  });
};
var _default = Line1;
exports["default"] = _default;
//# sourceMappingURL=Line1.js.map
