
/*
* 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.
 */

/*
* 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.
*/
import { __extends } from "tslib";
/* global Uint32Array, Float64Array, Float32Array */
import SeriesModel from '../../model/Series.js';
import createSeriesData from '../helper/createSeriesData.js';
var StrategySeriesModel = /** @class */function (_super) {
  __extends(StrategySeriesModel, _super);
  function StrategySeriesModel() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.type = StrategySeriesModel.type;
    _this.ignoreStyleOnData = true;
    return _this;
  }
  // visualStyleAccessPath = 'lineStyle';
  // visualDrawType = 'stroke' as const;
  // hasSymbolVisual = true;
  StrategySeriesModel.prototype.getInitialData = function (option) {
    if (process.env.NODE_ENV !== 'production') {
      var coordSys = option.coordinateSystem;
      if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {
        throw new Error('Strategy not support coordinateSystem besides cartesian and polar');
      }
    }
    return createSeriesData(null, this, {
      useEncodeDefaulter: true
    });
  };
  StrategySeriesModel.prototype.getZLevelKey = function () {
    // Each progressive series has individual key.
    return this.getData().count() > this.getProgressiveThreshold() ? this.id : '';
  };
  StrategySeriesModel.prototype.getResetData = function (data) {
    this.option.data = data;
    return this.option.data;
  };
  StrategySeriesModel.type = 'series.strategy';
  StrategySeriesModel.dependencies = ['grid', 'polar'];
  StrategySeriesModel.defaultOption = {
    coordinateSystem: 'cartesian2d',
    // zlevel: 0,
    z: 2,
    z2: 0,
    legendHoverLink: true,
    // Cartesian coordinate system
    xAxisIndex: 0,
    yAxisIndex: 0,
    emphasis: {
      emphasisState: {
        // hoverLayer: true,
        zlevel: 1
      }
    },
    // large: true,
    // // Available when large is true
    // largeThreshold: 600,
    clip: true
  };
  return StrategySeriesModel;
}(SeriesModel);
export default StrategySeriesModel;