'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var charts = require('echarts/charts');
var components = require('echarts/components');
var echarts = require('echarts/core');
var compFactory = require('../utils/comp-factory.js');

function _interopNamespaceDefault(e) {
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var echarts__namespace = /*#__PURE__*/_interopNamespaceDefault(echarts);

echarts__namespace.use([...compFactory.commonEchartsComponents, components.GridComponent, charts.ScatterChart]);
const scatterOption = (props) => {
    const { data } = props;
    return {
        // 声明一个 X 轴，类目轴（category）。默认情况下，类目轴对应到 dataset 第一列。
        xAxis: { type: 'category' },
        // 声明一个 Y 轴，数值轴。
        yAxis: {},
        series: data ? [{ type: 'scatter', data }] : undefined,
    };
};
var scatter = compFactory.defineComponent(echarts__namespace, 'scatter', scatterOption);

exports.default = scatter;
//# sourceMappingURL=scatter.js.map
