'use strict';

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

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

function candlestickPreprocessor(option) {
  if (!option || !util.isArray(option.series)) {
    return;
  }
  // Translate 'k' to 'candlestick'.
  util.each(option.series, function (seriesItem) {
    if (util.isObject(seriesItem) && seriesItem.type === 'k') {
      seriesItem.type = 'candlestick';
    }
  });
}

exports.default = candlestickPreprocessor;
