
/*
* 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 LinesPlotSeriesModel = /** @class */function (_super) {
  __extends(LinesPlotSeriesModel, _super);
  function LinesPlotSeriesModel() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.type = LinesPlotSeriesModel.type;
    _this.ignoreStyleOnData = true;
    // visualStyleAccessPath = 'lineStyle';
    // visualDrawType = 'stroke' as const;
    _this.hasSymbolVisual = true;
    return _this;
  }
  LinesPlotSeriesModel.prototype.getInitialData = function (option) {
    if (process.env.NODE_ENV !== 'production') {
      var coordSys = option.coordinateSystem;
      if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {
        throw new Error('Line not support coordinateSystem besides cartesian and polar');
      }
    }
    return createSeriesData(null, this, {
      useEncodeDefaulter: true
    });
  };
  LinesPlotSeriesModel.prototype.getZLevelKey = function () {
    var effectModel = this.getModel('effect');
    var trailLength = effectModel.get('trailLength');
    return this.getData().count() > this.getProgressiveThreshold()
    // Each progressive series has individual key.
    ? this.id : effectModel.get('show') && trailLength > 0 ? trailLength + '' : '';
  };
  LinesPlotSeriesModel.type = 'series.linesPlot';
  LinesPlotSeriesModel.dependencies = ['grid', 'polar'];
  LinesPlotSeriesModel.defaultOption = {
    coordinateSystem: 'cartesian2d',
    // zlevel: 0,
    z: 2,
    z2: 0,
    legendHoverLink: true,
    // Cartesian coordinate system
    xAxisIndex: 0,
    yAxisIndex: 0,
    symbol: 'emptyCircle',
    symbolSize: 10,
    // symbolRotate: null,
    emphasis: {
      emphasisState: {
        // hoverLayer: true,
        zlevel: 1
      }
      // scale: true,
      // itemStyle: {
      //   borderWidth: 2
      // }
    },

    // showSymbol: true,
    // `false`: follow the label interval strategy.
    // `true`: show all symbols.
    // `'auto'`: If possible, show all symbols, otherwise
    //           follow the label interval strategy.
    // showAllSymbol: 'auto',
    // Geo coordinate system
    geoIndex: 0,
    // effect: {
    //     show: false,
    //     period: 4,
    //     constantSpeed: 0,
    //     symbol: 'circle',
    //     symbolSize: 3,
    //     loop: true,
    //     trailLength: 0.2
    // },
    large: true,
    // Available when large is true
    largeThreshold: 600,
    polyline: false,
    clip: true,
    // label: {
    //     show: false,
    //     position: 'end'
    //     // distance: 5,
    //     // formatter: 标签文本格式器，同Tooltip.formatter，不支持异步回调
    // },
    lineVisible: true,
    lineStyle: {
      // opacity: 0.5
    }
  };
  return LinesPlotSeriesModel;
}(SeriesModel);
export default LinesPlotSeriesModel;