"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.Pie = exports.Line = exports.Donut = exports.Bar = void 0;
var _react = _interopRequireDefault(require("react"));
var _Chart = require("../components/Chart");
var _default = {
  title: 'Design System/Chart',
  component: _Chart.Chart
};
exports.default = _default;
var Template = function Template(args) {
  return /*#__PURE__*/_react.default.createElement("div", {
    style: {
      paddingTop: '1em'
    }
  }, /*#__PURE__*/_react.default.createElement(_Chart.Chart, args));
};
var Line = Template.bind({});
exports.Line = Line;
Line.args = {
  options: {
    // high: 10,
    // low: -10,
    // chartPadding: 1,
    height: 300,
    axisX: {
      labelInterpolationFnc: function labelInterpolationFnc(value, index) {
        return index % 2 === 0 ? value : null;
      },
      showGrid: true
      // showLabel: false
    },

    axisY: {
      labelInterpolationFnc: function labelInterpolationFnc(value, index) {
        return index % 2 === 0 ? value : null;
      },
      showGrid: true
      // showLabel: false
    },

    showArea: true,
    showLine: true,
    showPoint: true,
    fullWidth: false,
    fullHeight: false
  },
  data: {
    labels: ['Mo', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Mo', 'Tue', 'Wed'],
    series: [
    // {   
    //     className: 'baseline',
    //     name: 'baseline',
    //     data: [0, -4, 7, 20, -5, -1, 2, -8, 9, 13]
    // },
    {
      className: 'uptrend',
      name: 'return',
      data: [2, 6, 2, 15, 10, 5, 18, 13, 22, 35]
    }]
  },
  type: 'Line'
};
var Bar = Template.bind({});
exports.Bar = Bar;
Bar.args = {
  options: {
    // high: 10,
    // low: -10,
    height: 300,
    axisX: {
      labelInterpolationFnc: function labelInterpolationFnc(value, index) {
        return index % 2 === 0 ? value : null;
      }
    }
  },
  data: {
    labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'],
    series: [[1, 2, 4, 8, 6, -2, -1, -4, -6, -2]]
  },
  type: 'Bar'
};
var Pie = Template.bind({});
exports.Pie = Pie;
Pie.args = {
  options: {
    height: 400
    // donut: false
  },

  data: {
    series: [{
      value: 20,
      name: "Series 1"
    }, {
      value: 40,
      name: "Series 2"
    }, {
      value: 60,
      name: "Series 3"
    }, {
      value: 60,
      name: "Series 3"
    }]
  },
  type: 'Pie'
};
var Donut = Template.bind({});
exports.Donut = Donut;
Donut.args = {
  options: {
    height: 400,
    donut: true
  },
  data: {
    series: [{
      value: 20,
      name: "Series 1"
    }, {
      value: 40,
      name: "Series 2"
    }, {
      value: 60,
      name: "Series 3"
    }, {
      value: 60,
      name: "Series 3"
    }]
  },
  type: 'Pie'
};