"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const prepareBoxplotData = require("./prepareBoxplotData.js");
const log = require("../../util/log.js");
const types = require("../../util/types.js");
var boxplotTransform = {
  type: "echarts:boxplot",
  transform: function transform(params) {
    var upstream = params.upstream;
    if (upstream.sourceFormat !== types.SOURCE_FORMAT_ARRAY_ROWS) {
      var errMsg = "";
      if (process.env.NODE_ENV !== "production") {
        errMsg = log.makePrintable("source data is not applicable for this boxplot transform. Expect number[][].");
      }
      log.throwError(errMsg);
    }
    var result = prepareBoxplotData.default(upstream.getRawData(), params.config);
    return [{
      dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
      data: result.boxData
    }, {
      data: result.outliers
    }];
  }
};
exports.boxplotTransform = boxplotTransform;
