'use strict';

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

var createDimensions = require('../../data/helper/createDimensions.js');
var SeriesData = require('../../data/SeriesData.js');
var util = require('../../../../../../zrender@6.0.0/node_modules/zrender/lib/core/util.js');

/**
 * [Usage]:
 * (1)
 * createListSimply(seriesModel, ['value']);
 * (2)
 * createListSimply(seriesModel, {
 *     coordDimensions: ['value'],
 *     dimensionsCount: 5
 * });
 */
function createSeriesDataSimply(seriesModel, opt, nameList) {
  opt = util.isArray(opt) && {
    coordDimensions: opt
  } || util.extend({
    encodeDefine: seriesModel.getEncode()
  }, opt);
  var source = seriesModel.getSource();
  var dimensions = createDimensions.default(source, opt).dimensions;
  var list = new SeriesData.default(dimensions, seriesModel);
  list.initData(source, nameList);
  return list;
}

exports.default = createSeriesDataSimply;
