import { isArray, each, isObject } from '../../../../../../zrender@6.0.0/node_modules/zrender/lib/core/util.mjs';

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

export { candlestickPreprocessor as default };
