/**
 * 计量信息-图表-进场趋势分析
 */

import * as echarts from 'echarts';
import { VmEmpty, VmLineCharts } from "../../../_components";
import useSettings from "../../../_hooks/useSettings";
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
var Ljcsl = function Ljcsl(props) {
  var _values$;
  var _useSettings = useSettings(),
    chartFontColor = _useSettings.chartFontColor,
    isDark = _useSettings.isDark;
  if (!(props !== null && props !== void 0 && props.data)) {
    return /*#__PURE__*/_jsx("div", {});
  }
  var _props$data = props.data,
    names = _props$data.names,
    values = _props$data.values;
  return /*#__PURE__*/_jsx(_Fragment, {
    children: (values === null || values === void 0 ? void 0 : values.length) > 0 && ((_values$ = values[0]) === null || _values$ === void 0 ? void 0 : _values$.length) > 0 ? /*#__PURE__*/_jsx(VmLineCharts, {
      unit: "kg",
      height: 300,
      xAxis: names || [],
      dataList: [{
        data: (values === null || values === void 0 ? void 0 : values.length) > 0 ? values[0] : [],
        name: '日产生量',
        areaStyle: {
          color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
            offset: 0,
            color: '#51d0ff6e'
          }, {
            offset: 1,
            color: '#1B89FF'
          }])
        },
        markLine: {
          data: [{
            type: 'average',
            name: '平均产生量'
          }],
          label: {
            show: true,
            position: 'insideEndTop',
            formatter: '{b}: {c}',
            color: isDark ? '#fff' : chartFontColor,
            fontWeight: 'normal'
          },
          lineStyle: {
            color: '#FFE25D'
          }
        }
      }]
    }) : /*#__PURE__*/_jsx(VmEmpty, {
      type: "NO_CHART",
      style: {
        height: 300
      }
    })
  });
};
export default Ljcsl;