
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*   http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied.  See the License for the
* specific language governing permissions and limitations
* under the License.
*/



/**
 * AUTO-GENERATED FILE. DO NOT MODIFY.
 */

"use strict";

exports.__esModule = true;

var zrUtil = require("zrender/lib/core/util");

var createListFromArray_1 = require("./chart/helper/createListFromArray");

var axisHelper = require("./coord/axisHelper");

var axisModelCommonMixin_1 = require("./coord/axisModelCommonMixin");

var Model_1 = require("./model/Model");

var layout_1 = require("./util/layout");

exports.getLayoutRect = layout_1.getLayoutRect;

var dataStackHelper_1 = require("./data/helper/dataStackHelper");

function createList(seriesModel) {
  return createListFromArray_1["default"](seriesModel.getSource(), seriesModel);
}

exports.createList = createList;

var createDimensions_1 = require("./data/helper/createDimensions");

exports.createDimensions = createDimensions_1["default"];
exports.dataStack = {
  isDimensionStacked: dataStackHelper_1.isDimensionStacked,
  enableDataStack: dataStackHelper_1.enableDataStack,
  getStackedDimension: dataStackHelper_1.getStackedDimension
};

var symbol_1 = require("./util/symbol");

exports.createSymbol = symbol_1.createSymbol;

function createScale(dataExtent, option) {
  var axisModel = option;

  if (!(option instanceof Model_1["default"])) {
    axisModel = new Model_1["default"](option);
  }

  var scale = axisHelper.createScaleByModel(axisModel);
  scale.setExtent(dataExtent[0], dataExtent[1]);
  axisHelper.niceScaleExtent(scale, axisModel);
  return scale;
}

exports.createScale = createScale;

function mixinAxisModelCommonMethods(Model) {
  zrUtil.mixin(Model, axisModelCommonMixin_1.AxisModelCommonMixin);
}

exports.mixinAxisModelCommonMethods = mixinAxisModelCommonMethods;