'use strict';

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

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

function installDataZoomAction(registers) {
  registers.registerAction('dataZoom', function (payload, ecModel) {
    var effectedModels = helper.findEffectedDataZooms(ecModel, payload);
    util.each(effectedModels, function (dataZoomModel) {
      dataZoomModel.setRawRange({
        start: payload.start,
        end: payload.end,
        startValue: payload.startValue,
        endValue: payload.endValue
      });
    });
  });
}

exports.default = installDataZoomAction;
