import _extends from "@babel/runtime/helpers/extends";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import * as React from 'react';
import { Component } from 'react';
import { LineChart } from 'bizcharts';
var LineCharts = /*#__PURE__*/function (_Component) {
  _inheritsLoose(LineCharts, _Component);
  function LineCharts(props) {
    var _this;
    _this = _Component.call(this, props) || this;
    _this.Demo = function () {
      var data = _this.state.data;
      return /*#__PURE__*/React.createElement(LineChart, {
        data: data,
        title: {
          visible: true,
          text: '折线图'
        },
        description: {
          visible: true,
          text: '用平滑的曲线代替折线。'
        },
        xField: "year",
        yField: "value",
        interactions: [{
          type: 'slider',
          cfg: {
            start: 0,
            end: 1
          }
        }]
      });
    };
    _this.state = _extends({}, props.data, {
      // 数据源
      data: [{
        year: '1991',
        value: 3
      }, {
        year: '1992',
        value: 4
      }, {
        year: '1993',
        value: 3.5
      }, {
        year: '1994',
        value: 5
      }, {
        year: '1995',
        value: 4.9
      }, {
        year: '1996',
        value: 6
      }, {
        year: '1997',
        value: 7
      }, {
        year: '1998',
        value: 9
      }, {
        year: '1999',
        value: 13
      }]
    });
    return _this;
  }
  var _proto = LineCharts.prototype;
  _proto.render = function render() {
    return /*#__PURE__*/React.createElement("div", null, this.Demo());
  };
  return LineCharts;
}(Component);
LineCharts.displayName = 'LineCharts';
export { LineCharts as default };