diff --git a/cmd/geth/config.go b/cmd/geth/config.go
index e6bd4d5bef41..82794b498e0e 100644
--- a/cmd/geth/config.go
+++ b/cmd/geth/config.go
@@ -28,7 +28,6 @@ import (
cli "gopkg.in/urfave/cli.v1"
"github.com/ethereum/go-ethereum/cmd/utils"
- "github.com/ethereum/go-ethereum/dashboard"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
@@ -75,11 +74,10 @@ type ethstatsConfig struct {
}
type gethConfig struct {
- Eth eth.Config
- Shh whisper.Config
- Node node.Config
- Ethstats ethstatsConfig
- Dashboard dashboard.Config
+ Eth eth.Config
+ Shh whisper.Config
+ Node node.Config
+ Ethstats ethstatsConfig
}
func loadConfig(file string, cfg *gethConfig) error {
@@ -110,10 +108,9 @@ func defaultNodeConfig() node.Config {
func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
// Load defaults.
cfg := gethConfig{
- Eth: eth.DefaultConfig,
- Shh: whisper.DefaultConfig,
- Node: defaultNodeConfig(),
- Dashboard: dashboard.DefaultConfig,
+ Eth: eth.DefaultConfig,
+ Shh: whisper.DefaultConfig,
+ Node: defaultNodeConfig(),
}
// Load config file.
@@ -135,7 +132,6 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
}
utils.SetShhConfig(ctx, stack, &cfg.Shh)
- utils.SetDashboardConfig(ctx, &cfg.Dashboard)
return stack, cfg
}
@@ -155,9 +151,6 @@ func makeFullNode(ctx *cli.Context) *node.Node {
utils.RegisterEthService(stack, &cfg.Eth)
- if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) {
- utils.RegisterDashboardService(stack, &cfg.Dashboard, gitCommit)
- }
// Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode
shhEnabled := enableWhisper(ctx)
shhAutoEnabled := !ctx.GlobalIsSet(utils.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DeveloperFlag.Name)
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 21b6d491f2e7..5916b1d82821 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -63,10 +63,6 @@ var (
utils.DataDirFlag,
utils.KeyStoreDirFlag,
utils.NoUSBFlag,
- utils.DashboardEnabledFlag,
- utils.DashboardAddrFlag,
- utils.DashboardPortFlag,
- utils.DashboardRefreshFlag,
utils.EthashCacheDirFlag,
utils.EthashCachesInMemoryFlag,
utils.EthashCachesOnDiskFlag,
@@ -207,11 +203,7 @@ func init() {
app.Before = func(ctx *cli.Context) error {
runtime.GOMAXPROCS(runtime.NumCPU())
- logdir := ""
- if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) {
- logdir = (&node.Config{DataDir: utils.MakeDataDir(ctx)}).ResolvePath("logs")
- }
- if err := debug.Setup(ctx, logdir); err != nil {
+ if err := debug.Setup(ctx, ""); err != nil {
return err
}
// Cap the cache allowance and tune the garbage collector
diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go
index 1e27d0ae8d50..b7996f26c072 100644
--- a/cmd/geth/usage.go
+++ b/cmd/geth/usage.go
@@ -22,8 +22,6 @@ import (
"io"
"sort"
- "strings"
-
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/internal/debug"
"gopkg.in/urfave/cli.v1"
@@ -101,16 +99,6 @@ var AppHelpFlagGroups = []flagGroup{
utils.EthashDatasetsOnDiskFlag,
},
},
- //{
- // Name: "DASHBOARD",
- // Flags: []cli.Flag{
- // utils.DashboardEnabledFlag,
- // utils.DashboardAddrFlag,
- // utils.DashboardPortFlag,
- // utils.DashboardRefreshFlag,
- // utils.DashboardAssetsFlag,
- // },
- //},
{
Name: "TRANSACTION POOL",
Flags: []cli.Flag{
@@ -302,9 +290,6 @@ func init() {
uncategorized := []cli.Flag{}
for _, flag := range data.(*cli.App).Flags {
if _, ok := categorized[flag.String()]; !ok {
- if strings.HasPrefix(flag.GetName(), "dashboard") {
- continue
- }
uncategorized = append(uncategorized, flag)
}
}
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index c9a936dd5f16..80023632ea8b 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -39,7 +39,6 @@ import (
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/dashboard"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/eth/downloader"
"github.com/ethereum/go-ethereum/eth/gasprice"
@@ -182,26 +181,6 @@ var (
Name: "lightkdf",
Usage: "Reduce key-derivation RAM & CPU usage at some expense of KDF strength",
}
- // Dashboard settings
- DashboardEnabledFlag = cli.BoolFlag{
- Name: metrics.DashboardEnabledFlag,
- Usage: "Enable the dashboard",
- }
- DashboardAddrFlag = cli.StringFlag{
- Name: "dashboard.addr",
- Usage: "Dashboard listening interface",
- Value: dashboard.DefaultConfig.Host,
- }
- DashboardPortFlag = cli.IntFlag{
- Name: "dashboard.host",
- Usage: "Dashboard listening port",
- Value: dashboard.DefaultConfig.Port,
- }
- DashboardRefreshFlag = cli.DurationFlag{
- Name: "dashboard.refresh",
- Usage: "Dashboard metrics collection refresh rate",
- Value: dashboard.DefaultConfig.Refresh,
- }
// Ethash settings
EthashCacheDirFlag = DirectoryFlag{
Name: "ethash.cachedir",
@@ -1207,13 +1186,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
}
}
-// SetDashboardConfig applies dashboard related command line flags to the config.
-func SetDashboardConfig(ctx *cli.Context, cfg *dashboard.Config) {
- cfg.Host = ctx.GlobalString(DashboardAddrFlag.Name)
- cfg.Port = ctx.GlobalInt(DashboardPortFlag.Name)
- cfg.Refresh = ctx.GlobalDuration(DashboardRefreshFlag.Name)
-}
-
// RegisterEthService adds an Ethereum client to the stack.
func RegisterEthService(stack *node.Node, cfg *eth.Config) {
var err error
@@ -1236,13 +1208,6 @@ func RegisterEthService(stack *node.Node, cfg *eth.Config) {
}
}
-// RegisterDashboardService adds a dashboard to the stack.
-func RegisterDashboardService(stack *node.Node, cfg *dashboard.Config, commit string) {
- stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
- return dashboard.New(cfg, commit, ctx.ResolvePath("logs")), nil
- })
-}
-
// RegisterShhService configures Whisper and adds it to the given node.
func RegisterShhService(stack *node.Node, cfg *whisper.Config) {
if err := stack.Register(func(n *node.ServiceContext) (node.Service, error) {
diff --git a/dashboard/README.md b/dashboard/README.md
deleted file mode 100644
index 641c5f44bc3f..000000000000
--- a/dashboard/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-## Go Ethereum Dashboard
-
-The dashboard is a data visualizer integrated into geth, intended to collect and visualize useful information of an Ethereum node. It consists of two parts:
-
-* The client visualizes the collected data.
-* The server collects the data, and updates the clients.
-
-The client's UI uses [React][React] with JSX syntax, which is validated by the [ESLint][ESLint] linter mostly according to the [Airbnb React/JSX Style Guide][Airbnb]. The style is defined in the `.eslintrc` configuration file. The resources are bundled into a single `bundle.js` file using [Webpack][Webpack], which relies on the `webpack.config.js`. The bundled file is referenced from `dashboard.html` and takes part in the `assets.go` too. The necessary dependencies for the module bundler are gathered by [Node.js][Node.js].
-
-### Development and bundling
-
-As the dashboard depends on certain NPM packages (which are not included in the `go-ethereum` repo), these need to be installed first:
-
-```
-$ (cd dashboard/assets && yarn install && yarn flow)
-```
-
-Normally the dashboard assets are bundled into Geth via `go-bindata` to avoid external dependencies. Rebuilding Geth after each UI modification however is not feasible from a developer perspective. Instead, we can run `yarn dev` to watch for file system changes and refresh the browser automatically.
-
-```
-$ geth --dashboard --vmodule=dashboard=5
-$ (cd dashboard/assets && yarn dev)
-```
-
-To bundle up the final UI into Geth, run `go generate`:
-
-```
-$ (cd dashboard && go generate)
-```
-
-### Static type checking
-
-Since JavaScript doesn't provide type safety, [Flow][Flow] is used to check types. These are only useful during development, so at the end of the process Babel will strip them.
-
-To take advantage of static type checking, your IDE needs to be prepared for it. In case of [Atom][Atom] a configuration guide can be found [here][Atom config]: Install the [Nuclide][Nuclide] package for Flow support, making sure it installs all of its support packages by enabling `Install Recommended Packages on Startup`, and set the path of the `flow-bin` which were installed previously by `yarn`.
-
-For more IDE support install the `linter-eslint` package too, which finds the `.eslintrc` file, and provides real-time linting. Atom warns, that these two packages are incompatible, but they seem to work well together. For third-party library errors and auto-completion [flow-typed][flow-typed] is used.
-
-### Have fun
-
-[Webpack][Webpack] offers handy tools for visualizing the bundle's dependency tree and space usage.
-
-* Generate the bundle's profile running `yarn stats`
-* For the _dependency tree_ go to [Webpack Analyze][WA], and import `stats.json`
-* For the _space usage_ go to [Webpack Visualizer][WV], and import `stats.json`
-
-[React]: https://reactjs.org/
-[ESLint]: https://eslint.org/
-[Airbnb]: https://github.com/airbnb/javascript/tree/master/react
-[Webpack]: https://webpack.github.io/
-[WA]: http://webpack.github.io/analyse/
-[WV]: http://chrisbateman.github.io/webpack-visualizer/
-[Node.js]: https://nodejs.org/en/
-[Flow]: https://flow.org/
-[Atom]: https://atom.io/
-[Atom config]: https://medium.com/@fastphrase/integrating-flow-into-a-react-project-fbbc2f130eed
-[Nuclide]: https://nuclide.io/docs/quick-start/getting-started/
-[flow-typed]: https://github.com/flowtype/flow-typed
diff --git a/dashboard/assets.go b/dashboard/assets.go
deleted file mode 100644
index f3e7cf981506..000000000000
--- a/dashboard/assets.go
+++ /dev/null
@@ -1,40818 +0,0 @@
-// Code generated by go-bindata. DO NOT EDIT.
-// sources:
-// assets/index.html
-// assets/bundle.js
-
-package dashboard
-
-import (
- "crypto/sha256"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "strings"
- "time"
-)
-
-type asset struct {
- bytes []byte
- info os.FileInfo
- digest [sha256.Size]byte
-}
-
-type bindataFileInfo struct {
- name string
- size int64
- mode os.FileMode
- modTime time.Time
-}
-
-func (fi bindataFileInfo) Name() string {
- return fi.name
-}
-func (fi bindataFileInfo) Size() int64 {
- return fi.size
-}
-func (fi bindataFileInfo) Mode() os.FileMode {
- return fi.mode
-}
-func (fi bindataFileInfo) ModTime() time.Time {
- return fi.modTime
-}
-func (fi bindataFileInfo) IsDir() bool {
- return false
-}
-func (fi bindataFileInfo) Sys() interface{} {
- return nil
-}
-
-//nolint:misspell
-var _indexHtml = []byte(`
-
-
-
-
-
-
- Go Ethereum Dashboard
-
-
-
-
-
-
-
-
-`)
-
-func indexHtmlBytes() ([]byte, error) {
- return _indexHtml, nil
-}
-
-func indexHtml() (*asset, error) {
- bytes, err := indexHtmlBytes()
- if err != nil {
- return nil, err
- }
-
- info := bindataFileInfo{name: "index.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
- a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x22, 0xc8, 0x3d, 0x86, 0x2f, 0xb4, 0x6a, 0x1f, 0xda, 0xd, 0x54, 0x14, 0xa3, 0x6e, 0x80, 0x56, 0x28, 0xea, 0x44, 0xcf, 0xf5, 0xf2, 0xe, 0xad, 0x19, 0xf5, 0x93, 0xd6, 0x8d, 0x6d, 0x2f, 0x35}}
- return a, nil
-}
-
-//nolint:misspell
-var _bundleJs = []byte((((((((((`!function(modules) {
- function __webpack_require__(moduleId) {
- if (installedModules[moduleId]) return installedModules[moduleId].exports;
- var module = installedModules[moduleId] = {
- i: moduleId,
- l: !1,
- exports: {}
- };
- return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
- module.l = !0, module.exports;
- }
- var installedModules = {};
- __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) {
- __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {
- configurable: !1,
- enumerable: !0,
- get: getter
- });
- }, __webpack_require__.n = function(module) {
- var getter = module && module.__esModule ? function() {
- return module.default;
- } : function() {
- return module;
- };
- return __webpack_require__.d(getter, "a", getter), getter;
- }, __webpack_require__.o = function(object, property) {
- return Object.prototype.hasOwnProperty.call(object, property);
- }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 375);
-}([ function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- "production" === process.env.NODE_ENV ? module.exports = __webpack_require__(376) : module.exports = __webpack_require__(377);
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- (function(process) {
- if ("production" !== process.env.NODE_ENV) {
- var REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, isValidElement = function(object) {
- return "object" == typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
- };
- module.exports = __webpack_require__(418)(isValidElement, !0);
- } else module.exports = __webpack_require__(419)();
- }).call(exports, __webpack_require__(2));
-}, function(module, exports) {
- function defaultSetTimout() {
- throw new Error("setTimeout has not been defined");
- }
- function defaultClearTimeout() {
- throw new Error("clearTimeout has not been defined");
- }
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) return setTimeout(fun, 0);
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) return cachedSetTimeout = setTimeout,
- setTimeout(fun, 0);
- try {
- return cachedSetTimeout(fun, 0);
- } catch (e) {
- try {
- return cachedSetTimeout.call(null, fun, 0);
- } catch (e) {
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) return clearTimeout(marker);
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) return cachedClearTimeout = clearTimeout,
- clearTimeout(marker);
- try {
- return cachedClearTimeout(marker);
- } catch (e) {
- try {
- return cachedClearTimeout.call(null, marker);
- } catch (e) {
- return cachedClearTimeout.call(this, marker);
- }
- }
- }
- function cleanUpNextTick() {
- draining && currentQueue && (draining = !1, currentQueue.length ? queue = currentQueue.concat(queue) : queueIndex = -1,
- queue.length && drainQueue());
- }
- function drainQueue() {
- if (!draining) {
- var timeout = runTimeout(cleanUpNextTick);
- draining = !0;
- for (var len = queue.length; len; ) {
- for (currentQueue = queue, queue = []; ++queueIndex < len; ) currentQueue && currentQueue[queueIndex].run();
- queueIndex = -1, len = queue.length;
- }
- currentQueue = null, draining = !1, runClearTimeout(timeout);
- }
- }
- function Item(fun, array) {
- this.fun = fun, this.array = array;
- }
- function noop() {}
- var cachedSetTimeout, cachedClearTimeout, process = module.exports = {};
- !function() {
- try {
- cachedSetTimeout = "function" == typeof setTimeout ? setTimeout : defaultSetTimout;
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- cachedClearTimeout = "function" == typeof clearTimeout ? clearTimeout : defaultClearTimeout;
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- }();
- var currentQueue, queue = [], draining = !1, queueIndex = -1;
- process.nextTick = function(fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) args[i - 1] = arguments[i];
- queue.push(new Item(fun, args)), 1 !== queue.length || draining || runTimeout(drainQueue);
- }, Item.prototype.run = function() {
- this.fun.apply(null, this.array);
- }, process.title = "browser", process.browser = !0, process.env = {}, process.argv = [],
- process.version = "", process.versions = {}, process.on = noop, process.addListener = noop,
- process.once = noop, process.off = noop, process.removeListener = noop, process.removeAllListeners = noop,
- process.emit = noop, process.prependListener = noop, process.prependOnceListener = noop,
- process.listeners = function(name) {
- return [];
- }, process.binding = function(name) {
- throw new Error("process.binding is not supported");
- }, process.cwd = function() {
- return "/";
- }, process.chdir = function(dir) {
- throw new Error("process.chdir is not supported");
- }, process.umask = function() {
- return 0;
- };
-}, function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
- !function() {
- "use strict";
- function classNames() {
- for (var classes = [], i = 0; i < arguments.length; i++) {
- var arg = arguments[i];
- if (arg) {
- var argType = typeof arg;
- if ("string" === argType || "number" === argType) classes.push(arg); else if (Array.isArray(arg)) classes.push(classNames.apply(null, arg)); else if ("object" === argType) for (var key in arg) hasOwn.call(arg, key) && arg[key] && classes.push(key);
- }
- }
- return classes.join(" ");
- }
- var hasOwn = {}.hasOwnProperty;
- void 0 !== module && module.exports ? module.exports = classNames : (__WEBPACK_AMD_DEFINE_ARRAY__ = [],
- void 0 !== (__WEBPACK_AMD_DEFINE_RESULT__ = function() {
- return classNames;
- }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- }();
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _toConsumableArray(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
- return arr2;
- }
- return Array.from(arr);
- }
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- }
- __webpack_require__.d(__webpack_exports__, "c", function() {
- return PRESENTATION_ATTRIBUTES;
- }), __webpack_require__.d(__webpack_exports__, "a", function() {
- return EVENT_ATTRIBUTES;
- }), __webpack_require__.d(__webpack_exports__, "d", function() {
- return SCALE_TYPES;
- }), __webpack_require__.d(__webpack_exports__, "b", function() {
- return LEGEND_TYPES;
- }), __webpack_require__.d(__webpack_exports__, "j", function() {
- return getDisplayName;
- }), __webpack_require__.d(__webpack_exports__, "h", function() {
- return findAllByType;
- }), __webpack_require__.d(__webpack_exports__, "i", function() {
- return findChildByType;
- }), __webpack_require__.d(__webpack_exports__, "k", function() {
- return getPresentationAttributes;
- }), __webpack_require__.d(__webpack_exports__, "e", function() {
- return filterEventAttributes;
- }), __webpack_require__.d(__webpack_exports__, "f", function() {
- return filterEventsOfChild;
- }), __webpack_require__.d(__webpack_exports__, "q", function() {
- return validateWidthHeight;
- }), __webpack_require__.d(__webpack_exports__, "n", function() {
- return isSsr;
- }), __webpack_require__.d(__webpack_exports__, "g", function() {
- return filterSvgElements;
- }), __webpack_require__.d(__webpack_exports__, "m", function() {
- return isChildrenEqual;
- }), __webpack_require__.d(__webpack_exports__, "p", function() {
- return renderByOrder;
- }), __webpack_require__.d(__webpack_exports__, "l", function() {
- return getReactEventByType;
- }), __webpack_require__.d(__webpack_exports__, "o", function() {
- return parseChildIndex;
- });
- var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(20), __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__), __WEBPACK_IMPORTED_MODULE_1_lodash_isString__ = __webpack_require__(173), __WEBPACK_IMPORTED_MODULE_1_lodash_isString___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isString__), __WEBPACK_IMPORTED_MODULE_2_lodash_isObject__ = __webpack_require__(32), __WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isObject__), __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__ = __webpack_require__(8), __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isFunction__), __WEBPACK_IMPORTED_MODULE_4_lodash_isArray__ = __webpack_require__(13), __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray__), __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__), __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__), __WEBPACK_IMPORTED_MODULE_7__DataUtils__ = __webpack_require__(9), __WEBPACK_IMPORTED_MODULE_8__PureRender__ = __webpack_require__(5), PRESENTATION_ATTRIBUTES = {
- alignmentBaseline: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- angle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- baselineShift: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- clip: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- clipPath: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- clipRule: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- color: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- colorInterpolation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- colorInterpolationFilters: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- colorProfile: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- colorRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- cursor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- direction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "ltr", "rtl", "inherit" ]),
- display: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- dominantBaseline: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- enableBackground: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- fill: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- fillOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number ]),
- fillRule: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "nonzero", "evenodd", "inherit" ]),
- filter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- floodColor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- floodOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number ]),
- font: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- fontFamily: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- fontSize: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- fontSizeAdjust: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- fontStretch: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "normal", "wider", "narrower", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", "inherit" ]),
- fontStyle: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "normal", "italic", "oblique", "inherit" ]),
- fontVariant: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "normal", "small-caps", "inherit" ]),
- fontWeight: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "normal", "bold", "bolder", "lighter", 100, 200, 300, 400, 500, 600, 700, 800, 900, "inherit" ]),
- glyphOrientationHorizontal: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- glyphOrientationVertical: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- imageRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "auto", "optimizeSpeed", "optimizeQuality", "inherit" ]),
- kerning: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- letterSpacing: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- lightingColor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- markerEnd: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- markerMid: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- markerStart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- mask: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- opacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- overflow: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "visible", "hidden", "scroll", "auto", "inherit" ]),
- pointerEvents: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "visiblePainted", "visibleFill", "visibleStroke", "visible", "painted", "fill", "stroke", "all", "none", "inherit" ]),
- shapeRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "auto", "optimizeSpeed", "crispEdges", "geometricPrecision", "inherit" ]),
- stopColor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- stopOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- stroke: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- strokeDasharray: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- strokeDashoffset: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- strokeLinecap: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "butt", "round", "square", "inherit" ]),
- strokeLinejoin: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "miter", "round", "bevel", "inherit" ]),
- strokeMiterlimit: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- strokeOpacity: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- strokeWidth: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- textAnchor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "start", "middle", "end", "inherit" ]),
- textDecoration: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "none", "underline", "overline", "line-through", "blink", "inherit" ]),
- textRendering: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision", "inherit" ]),
- unicodeBidi: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "normal", "embed", "bidi-override", "inherit" ]),
- visibility: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "visible", "hidden", "collapse", "inherit" ]),
- wordSpacing: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- writingMode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "lr-tb", "rl-tb", "tb-rl", "lr", "rl", "tb", "inherit" ]),
- transform: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- width: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- height: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- dx: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- dy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- x: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- y: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- r: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- radius: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.array ])
- }, EVENT_ATTRIBUTES = {
- onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseDown: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseUp: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseOver: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseMove: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseOut: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseLeave: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onTouchEnd: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onTouchMove: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onTouchStart: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onTouchCancel: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
- }, REACT_BROWSER_EVENT_MAP = {
- click: "onClick",
- mousedown: "onMouseDown",
- mouseup: "onMouseUp",
- mouseover: "onMouseOver",
- mousemove: "onMouseMove",
- mouseout: "onMouseOut",
- mouseenter: "onMouseEnter",
- mouseleave: "onMouseLeave",
- touchcancel: "onTouchCancel",
- touchend: "onTouchEnd",
- touchmove: "onTouchMove",
- touchstart: "onTouchStart"
- }, SCALE_TYPES = [ "auto", "linear", "pow", "sqrt", "log", "identity", "time", "band", "point", "ordinal", "quantile", "quantize", "utcTime", "sequential", "threshold" ], LEGEND_TYPES = [ "plainline", "line", "square", "rect", "circle", "cross", "diamond", "star", "triangle", "wye", "none" ], getDisplayName = function(Comp) {
- return Comp ? "string" == typeof Comp ? Comp : Comp.displayName || Comp.name || "Component" : "";
- }, findAllByType = function(children, type) {
- var result = [], types = [];
- return types = __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(type) ? type.map(function(t) {
- return getDisplayName(t);
- }) : [ getDisplayName(type) ], __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.forEach(children, function(child) {
- var childType = child && child.type && (child.type.displayName || child.type.name);
- -1 !== types.indexOf(childType) && result.push(child);
- }), result;
- }, findChildByType = function(children, type) {
- var result = findAllByType(children, type);
- return result && result[0];
- }, getPresentationAttributes = function(el) {
- if (!el || __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(el)) return null;
- var props = __WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(el) ? el.props : el;
- if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default()(props)) return null;
- var out = null;
- for (var i in props) ({}).hasOwnProperty.call(props, i) && PRESENTATION_ATTRIBUTES[i] && (out || (out = {}),
- out[i] = props[i]);
- return out;
- }, getEventHandlerOfElement = function(originalHandler, props) {
- return function(e) {
- return originalHandler(props, e), null;
- };
- }, filterEventAttributes = function(el, newHandler) {
- var wrapCallback = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
- if (!el || __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(el)) return null;
- var props = __WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(el) ? el.props : el;
- if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default()(props)) return null;
- var out = null;
- for (var i in props) ({}).hasOwnProperty.call(props, i) && EVENT_ATTRIBUTES[i] && (out || (out = {}),
- out[i] = newHandler || (wrapCallback ? getEventHandlerOfElement(props[i], props) : props[i]));
- return out;
- }, getEventHandlerOfChild = function(originalHandler, data, index) {
- return function(e) {
- return originalHandler(data, index, e), null;
- };
- }, filterEventsOfChild = function(props, data, index) {
- if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isObject___default()(props)) return null;
- var out = null;
- for (var i in props) ({}).hasOwnProperty.call(props, i) && EVENT_ATTRIBUTES[i] && __WEBPACK_IMPORTED_MODULE_3_lodash_isFunction___default()(props[i]) && (out || (out = {}),
- out[i] = getEventHandlerOfChild(props[i], data, index));
- return out;
- }, validateWidthHeight = function(el) {
- if (!el || !el.props) return !1;
- var _el$props = el.props, width = _el$props.width, height = _el$props.height;
- return !(!Object(__WEBPACK_IMPORTED_MODULE_7__DataUtils__.h)(width) || width <= 0 || !Object(__WEBPACK_IMPORTED_MODULE_7__DataUtils__.h)(height) || height <= 0);
- }, isSsr = function() {
- return !("undefined" != typeof window && window.document && window.document.createElement && window.setTimeout);
- }, SVG_TAGS = [ "a", "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColormatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "font", "font-face", "font-face-format", "font-face-name", "font-face-url", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "lineGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "script", "set", "stop", "style", "svg", "switch", "symbol", "text", "textPath", "title", "tref", "tspan", "use", "view", "vkern" ], isSvgElement = function(child) {
- return child && child.type && __WEBPACK_IMPORTED_MODULE_1_lodash_isString___default()(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
- }, filterSvgElements = function(children) {
- var svgElements = [];
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.forEach(children, function(entry) {
- entry && entry.type && __WEBPACK_IMPORTED_MODULE_1_lodash_isString___default()(entry.type) && SVG_TAGS.indexOf(entry.type) >= 0 && svgElements.push(entry);
- }), svgElements;
- }, isSingleChildEqual = function(nextChild, prevChild) {
- if (__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(nextChild) && __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(prevChild)) return !0;
- if (!__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(nextChild) && !__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(prevChild)) {
- var _ref = nextChild.props || {}, nextChildren = _ref.children, nextProps = _objectWithoutProperties(_ref, [ "children" ]), _ref2 = prevChild.props || {}, prevChildren = _ref2.children, prevProps = _objectWithoutProperties(_ref2, [ "children" ]);
- return nextChildren && prevChildren ? Object(__WEBPACK_IMPORTED_MODULE_8__PureRender__.b)(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren) : !nextChildren && !prevChildren && Object(__WEBPACK_IMPORTED_MODULE_8__PureRender__.b)(nextProps, prevProps);
- }
- return !1;
- }, isChildrenEqual = function isChildrenEqual(nextChildren, prevChildren) {
- if (nextChildren === prevChildren) return !0;
- if (__WEBPACK_IMPORTED_MODULE_5_react__.Children.count(nextChildren) !== __WEBPACK_IMPORTED_MODULE_5_react__.Children.count(prevChildren)) return !1;
- var count = __WEBPACK_IMPORTED_MODULE_5_react__.Children.count(nextChildren);
- if (0 === count) return !0;
- if (1 === count) return isSingleChildEqual(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(nextChildren) ? nextChildren[0] : nextChildren, __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(prevChildren) ? prevChildren[0] : prevChildren);
- for (var i = 0; i < count; i++) {
- var nextChild = nextChildren[i], prevChild = prevChildren[i];
- if (__WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(nextChild) || __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(prevChild)) {
- if (!isChildrenEqual(nextChild, prevChild)) return !1;
- } else if (!isSingleChildEqual(nextChild, prevChild)) return !1;
- }
- return !0;
- }, renderByOrder = function(children, renderMap) {
- var elements = [], record = {};
- return __WEBPACK_IMPORTED_MODULE_5_react__.Children.forEach(children, function(child, index) {
- if (child && isSvgElement(child)) elements.push(child); else if (child && renderMap[getDisplayName(child.type)]) {
- var displayName = getDisplayName(child.type), _renderMap$displayNam = renderMap[displayName], handler = _renderMap$displayNam.handler, once = _renderMap$displayNam.once;
- if (once && !record[displayName] || !once) {
- var results = handler(child, displayName, index);
- __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(results) ? elements = [ elements ].concat(_toConsumableArray(results)) : elements.push(results),
- record[displayName] = !0;
- }
- }
- }), elements;
- }, getReactEventByType = function(e) {
- var type = e && e.type;
- return type && REACT_BROWSER_EVENT_MAP[type] ? REACT_BROWSER_EVENT_MAP[type] : null;
- }, parseChildIndex = function(child, children) {
- var result = -1;
- return __WEBPACK_IMPORTED_MODULE_5_react__.Children.forEach(children, function(entry, index) {
- entry === child && (result = index);
- }), result;
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function shallowEqual(a, b) {
- for (var key in a) if ({}.hasOwnProperty.call(a, key) && (!{}.hasOwnProperty.call(b, key) || a[key] !== b[key])) return !1;
- for (var _key in b) if ({}.hasOwnProperty.call(b, _key) && !{}.hasOwnProperty.call(a, _key)) return !1;
- return !0;
- }
- function shouldComponentUpdate(props, state) {
- return !shallowEqual(props, this.props) || !shallowEqual(state, this.state);
- }
- function pureRenderDecorator(component) {
- component.prototype.shouldComponentUpdate = shouldComponentUpdate;
- }
- __webpack_exports__.b = shallowEqual, __webpack_exports__.a = pureRenderDecorator;
-}, function(module, exports, __webpack_require__) {
- "use strict";
- exports.__esModule = !0;
- var _assign = __webpack_require__(222), _assign2 = function(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }(_assign);
- exports.default = _assign2.default || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- exports.__esModule = !0, exports.default = function(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- };
-}, function(module, exports, __webpack_require__) {
- function isFunction(value) {
- if (!isObject(value)) return !1;
- var tag = baseGetTag(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
- var baseGetTag = __webpack_require__(41), isObject = __webpack_require__(32), asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
- module.exports = isFunction;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.d(__webpack_exports__, "j", function() {
- return mathSign;
- }), __webpack_require__.d(__webpack_exports__, "i", function() {
- return isPercent;
- }), __webpack_require__.d(__webpack_exports__, "h", function() {
- return isNumber;
- }), __webpack_require__.d(__webpack_exports__, "g", function() {
- return isNumOrStr;
- }), __webpack_require__.d(__webpack_exports__, "k", function() {
- return uniqueId;
- }), __webpack_require__.d(__webpack_exports__, "d", function() {
- return getPercentValue;
- }), __webpack_require__.d(__webpack_exports__, "b", function() {
- return getAnyElementOfObject;
- }), __webpack_require__.d(__webpack_exports__, "e", function() {
- return hasDuplicate;
- }), __webpack_require__.d(__webpack_exports__, "f", function() {
- return interpolateNumber;
- }), __webpack_require__.d(__webpack_exports__, "a", function() {
- return findEntryInArray;
- }), __webpack_require__.d(__webpack_exports__, "c", function() {
- return getLinearRegression;
- });
- var __WEBPACK_IMPORTED_MODULE_0_lodash_get__ = __webpack_require__(174), __WEBPACK_IMPORTED_MODULE_0_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_get__), __WEBPACK_IMPORTED_MODULE_1_lodash_isArray__ = __webpack_require__(13), __WEBPACK_IMPORTED_MODULE_1_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isArray__), __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__ = __webpack_require__(120), __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__), __WEBPACK_IMPORTED_MODULE_3_lodash_isNumber__ = __webpack_require__(272), __WEBPACK_IMPORTED_MODULE_3_lodash_isNumber___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isNumber__), __WEBPACK_IMPORTED_MODULE_4_lodash_isString__ = __webpack_require__(173), __WEBPACK_IMPORTED_MODULE_4_lodash_isString___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isString__), mathSign = function(value) {
- return 0 === value ? 0 : value > 0 ? 1 : -1;
- }, isPercent = function(value) {
- return __WEBPACK_IMPORTED_MODULE_4_lodash_isString___default()(value) && value.indexOf("%") === value.length - 1;
- }, isNumber = function(value) {
- return __WEBPACK_IMPORTED_MODULE_3_lodash_isNumber___default()(value) && !__WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default()(value);
- }, isNumOrStr = function(value) {
- return isNumber(value) || __WEBPACK_IMPORTED_MODULE_4_lodash_isString___default()(value);
- }, idCounter = 0, uniqueId = function(prefix) {
- var id = ++idCounter;
- return "" + (prefix || "") + id;
- }, getPercentValue = function(percent, totalValue) {
- var defaultValue = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0, validate = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
- if (!isNumber(percent) && !__WEBPACK_IMPORTED_MODULE_4_lodash_isString___default()(percent)) return defaultValue;
- var value = void 0;
- if (isPercent(percent)) {
- var index = percent.indexOf("%");
- value = totalValue * parseFloat(percent.slice(0, index)) / 100;
- } else value = +percent;
- return __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default()(value) && (value = defaultValue),
- validate && value > totalValue && (value = totalValue), value;
- }, getAnyElementOfObject = function(obj) {
- if (!obj) return null;
- var keys = Object.keys(obj);
- return keys && keys.length ? obj[keys[0]] : null;
- }, hasDuplicate = function(ary) {
- if (!__WEBPACK_IMPORTED_MODULE_1_lodash_isArray___default()(ary)) return !1;
- for (var len = ary.length, cache = {}, i = 0; i < len; i++) {
- if (cache[ary[i]]) return !0;
- cache[ary[i]] = !0;
- }
- return !1;
- }, interpolateNumber = function(numberA, numberB) {
- return isNumber(numberA) && isNumber(numberB) ? function(t) {
- return numberA + t * (numberB - numberA);
- } : function() {
- return numberB;
- };
- }, findEntryInArray = function(ary, specifiedKey, specifiedValue) {
- return ary && ary.length ? ary.find(function(entry) {
- return entry && __WEBPACK_IMPORTED_MODULE_0_lodash_get___default()(entry, specifiedKey) === specifiedValue;
- }) : null;
- }, getLinearRegression = function(data) {
- if (!data || !data.length) return null;
- for (var len = data.length, xsum = 0, ysum = 0, xysum = 0, xxsum = 0, xmin = 1 / 0, xmax = -1 / 0, i = 0; i < len; i++) xsum += data[i].cx,
- ysum += data[i].cy, xysum += data[i].cx * data[i].cy, xxsum += data[i].cx * data[i].cx,
- xmin = Math.min(xmin, data[i].cx), xmax = Math.max(xmax, data[i].cx);
- var a = len * xxsum != xsum * xsum ? (len * xysum - xsum * ysum) / (len * xxsum - xsum * xsum) : 0;
- return {
- xmin: xmin,
- xmax: xmax,
- a: a,
- b: (ysum - a * xsum) / len
- };
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- function getDefaultTheme() {
- return defaultTheme || (defaultTheme = (0, _createMuiTheme2.default)());
- }
- Object.defineProperty(exports, "__esModule", {
- value: !0
- }), exports.sheetsManager = void 0;
- var _keys = __webpack_require__(55), _keys2 = _interopRequireDefault(_keys), _extends2 = __webpack_require__(6), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(26), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(27), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(28), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(29), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(30), _inherits3 = _interopRequireDefault(_inherits2), _objectWithoutProperties2 = __webpack_require__(7), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _map = __webpack_require__(440), _map2 = _interopRequireDefault(_map), _minSafeInteger = __webpack_require__(456), _minSafeInteger2 = _interopRequireDefault(_minSafeInteger), _react = __webpack_require__(0), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(1), _propTypes2 = _interopRequireDefault(_propTypes), _warning = __webpack_require__(11), _warning2 = _interopRequireDefault(_warning), _hoistNonReactStatics = __webpack_require__(162), _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics), _getDisplayName = __webpack_require__(244), _getDisplayName2 = _interopRequireDefault(_getDisplayName), _wrapDisplayName = __webpack_require__(79), _wrapDisplayName2 = _interopRequireDefault(_wrapDisplayName), _contextTypes = __webpack_require__(459), _contextTypes2 = _interopRequireDefault(_contextTypes), _jss = __webpack_require__(246), _ns = __webpack_require__(245), ns = function(obj) {
- if (obj && obj.__esModule) return obj;
- var newObj = {};
- if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]);
- return newObj.default = obj, newObj;
- }(_ns), _jssPreset = __webpack_require__(481), _jssPreset2 = _interopRequireDefault(_jssPreset), _createMuiTheme = __webpack_require__(161), _createMuiTheme2 = _interopRequireDefault(_createMuiTheme), _themeListener = __webpack_require__(160), _themeListener2 = _interopRequireDefault(_themeListener), _createGenerateClassName = __webpack_require__(494), _createGenerateClassName2 = _interopRequireDefault(_createGenerateClassName), _getStylesCreator = __webpack_require__(495), _getStylesCreator2 = _interopRequireDefault(_getStylesCreator), jss = (0,
- _jss.create)((0, _jssPreset2.default)()), generateClassName = (0, _createGenerateClassName2.default)(), indexCounter = _minSafeInteger2.default, sheetsManager = exports.sheetsManager = new _map2.default(), noopTheme = {}, defaultTheme = void 0, withStyles = function(stylesOrCreator) {
- var options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- return function(Component) {
- var _options$withTheme = options.withTheme, withTheme = void 0 !== _options$withTheme && _options$withTheme, _options$flip = options.flip, flip = void 0 === _options$flip ? null : _options$flip, name = options.name, styleSheetOptions = (0,
- _objectWithoutProperties3.default)(options, [ "withTheme", "flip", "name" ]), stylesCreator = (0,
- _getStylesCreator2.default)(stylesOrCreator), listenToTheme = stylesCreator.themingEnabled || withTheme || "string" == typeof name;
- indexCounter += 1, stylesCreator.options.index = indexCounter, "production" !== process.env.NODE_ENV && (0,
- _warning2.default)(indexCounter < 0, [ "Material-UI: you might have a memory leak.", "The indexCounter is not supposed to grow that much." ].join(" "));
- var WithStyles = function(_React$Component) {
- function WithStyles(props, context) {
- (0, _classCallCheck3.default)(this, WithStyles);
- var _this = (0, _possibleConstructorReturn3.default)(this, (WithStyles.__proto__ || (0,
- _getPrototypeOf2.default)(WithStyles)).call(this, props, context));
- _this.state = {}, _this.disableStylesGeneration = !1, _this.jss = null, _this.sheetOptions = null,
- _this.sheetsManager = sheetsManager, _this.stylesCreatorSaved = null, _this.theme = null,
- _this.unsubscribeId = null, _this.jss = _this.context[ns.jss] || jss;
- var muiThemeProviderOptions = _this.context.muiThemeProviderOptions;
- return muiThemeProviderOptions && (muiThemeProviderOptions.sheetsManager && (_this.sheetsManager = muiThemeProviderOptions.sheetsManager),
- _this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration),
- _this.stylesCreatorSaved = stylesCreator, _this.sheetOptions = (0, _extends3.default)({
- generateClassName: generateClassName
- }, _this.context[ns.sheetOptions]), _this.theme = listenToTheme ? _themeListener2.default.initial(context) || getDefaultTheme() : noopTheme,
- _this;
- }
- return (0, _inherits3.default)(WithStyles, _React$Component), (0, _createClass3.default)(WithStyles, [ {
- key: "componentWillMount",
- value: function() {
- this.attach(this.theme);
- }
- }, {
- key: "componentDidMount",
- value: function() {
- var _this2 = this;
- listenToTheme && (this.unsubscribeId = _themeListener2.default.subscribe(this.context, function(theme) {
- var oldTheme = _this2.theme;
- _this2.theme = theme, _this2.attach(_this2.theme), _this2.setState({}, function() {
- _this2.detach(oldTheme);
- });
- }));
- }
- }, {
- key: "componentWillReceiveProps",
- value: function() {
- this.stylesCreatorSaved !== stylesCreator && "production" !== process.env.NODE_ENV && (this.detach(this.theme),
- this.stylesCreatorSaved = stylesCreator, this.attach(this.theme));
- }
- }, {
- key: "componentWillUnmount",
- value: function() {
- this.detach(this.theme), null !== this.unsubscribeId && _themeListener2.default.unsubscribe(this.context, this.unsubscribeId);
- }
- }, {
- key: "attach",
- value: function(theme) {
- if (!this.disableStylesGeneration) {
- var stylesCreatorSaved = this.stylesCreatorSaved, sheetManager = this.sheetsManager.get(stylesCreatorSaved);
- sheetManager || (sheetManager = new _map2.default(), this.sheetsManager.set(stylesCreatorSaved, sheetManager));
- var sheetManagerTheme = sheetManager.get(theme);
- if (sheetManagerTheme || (sheetManagerTheme = {
- refs: 0,
- sheet: null
- }, sheetManager.set(theme, sheetManagerTheme)), 0 === sheetManagerTheme.refs) {
- var styles = stylesCreatorSaved.create(theme, name), meta = name;
- "production" === process.env.NODE_ENV || meta || (meta = (0, _getDisplayName2.default)(Component));
- var sheet = this.jss.createStyleSheet(styles, (0, _extends3.default)({
- meta: meta,
- classNamePrefix: meta,
- flip: "boolean" == typeof flip ? flip : "rtl" === theme.direction,
- link: !1
- }, this.sheetOptions, stylesCreatorSaved.options, {
- name: name
- }, styleSheetOptions));
- sheetManagerTheme.sheet = sheet, sheet.attach();
- var sheetsRegistry = this.context[ns.sheetsRegistry];
- sheetsRegistry && sheetsRegistry.add(sheet);
- }
- sheetManagerTheme.refs += 1;
- }
- }
- }, {
- key: "detach",
- value: function(theme) {
- if (!this.disableStylesGeneration) {
- var stylesCreatorSaved = this.stylesCreatorSaved, sheetManager = this.sheetsManager.get(stylesCreatorSaved), sheetManagerTheme = sheetManager.get(theme);
- if (sheetManagerTheme.refs -= 1, 0 === sheetManagerTheme.refs) {
- sheetManager.delete(theme), this.jss.removeStyleSheet(sheetManagerTheme.sheet);
- var sheetsRegistry = this.context[ns.sheetsRegistry];
- sheetsRegistry && sheetsRegistry.remove(sheetManagerTheme.sheet);
- }
- }
- }
- }, {
- key: "render",
- value: function() {
- var _this3 = this, _props = this.props, classesProp = _props.classes, innerRef = _props.innerRef, other = (0,
- _objectWithoutProperties3.default)(_props, [ "classes", "innerRef" ]), classes = void 0, renderedClasses = {};
- if (!this.disableStylesGeneration) {
- var sheetManager = this.sheetsManager.get(this.stylesCreatorSaved), sheetsManagerTheme = sheetManager.get(this.theme);
- renderedClasses = sheetsManagerTheme.sheet.classes;
- }
- classes = classesProp ? (0, _extends3.default)({}, renderedClasses, (0, _keys2.default)(classesProp).reduce(function(accumulator, key) {
- return "production" !== process.env.NODE_ENV && (0, _warning2.default)(renderedClasses[key] || _this3.disableStylesGeneration, [ "Material-UI: the key ` + ("`" + `" + key + "`)) + ("`" + (` provided to the classes property is not implemented in " + (0,
- _getDisplayName2.default)(Component) + ".", "You can only override one of the following: " + (0,
- _keys2.default)(renderedClasses).join(",") ].join("\n")), "production" !== process.env.NODE_ENV && (0,
- _warning2.default)(!classesProp[key] || "string" == typeof classesProp[key], [ "Material-UI: the key ` + "`"))) + ((`" + key + "` + ("`" + ` provided to the classes property is not valid for " + (0,
- _getDisplayName2.default)(Component) + ".", "You need to provide a non empty string instead of: " + classesProp[key] + "." ].join("\n")),
- classesProp[key] && (accumulator[key] = renderedClasses[key] + " " + classesProp[key]),
- accumulator;
- }, {})) : renderedClasses;
- var more = {};
- return withTheme && (more.theme = this.theme), _react2.default.createElement(Component, (0,
- _extends3.default)({
- classes: classes
- }, more, other, {
- ref: innerRef
- }));
- }
- } ]), WithStyles;
- }(_react2.default.Component);
- return WithStyles.propTypes = "production" !== process.env.NODE_ENV ? {
- classes: _propTypes2.default.object,
- innerRef: _propTypes2.default.func
- } : {}, WithStyles.contextTypes = (0, _extends3.default)({
- muiThemeProviderOptions: _propTypes2.default.object
- }, _contextTypes2.default, listenToTheme ? _themeListener2.default.contextTypes : {}),
- "production" !== process.env.NODE_ENV && (WithStyles.displayName = (0, _wrapDisplayName2.default)(Component, "WithStyles")),
- (0, _hoistNonReactStatics2.default)(WithStyles, Component), "production" !== process.env.NODE_ENV && (WithStyles.Naked = Component,
- WithStyles.options = options), WithStyles;
- };
- };
- exports.default = withStyles;
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- var warning = function() {};
- "production" !== process.env.NODE_ENV && (warning = function(condition, format, args) {
- var len = arguments.length;
- args = new Array(len > 2 ? len - 2 : 0);
- for (var key = 2; key < len; key++) args[key - 2] = arguments[key];
- if (void 0 === format) throw new Error("`)) + ("`" + (`warning(condition, format, ...args)` + "`")))) + (((` requires a warning message argument");
- if (format.length < 10 || /^[s\W]*$/.test(format)) throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: " + format);
- if (!condition) {
- var argIndex = 0, message = "Warning: " + format.replace(/%s/g, function() {
- return args[argIndex++];
- });
- "undefined" != typeof console && console.error(message);
- try {
- throw new Error(message);
- } catch (x) {}
- }
- }), module.exports = warning;
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- "use strict";
- exports.__esModule = !0;
- var _defineProperty = __webpack_require__(154), _defineProperty2 = function(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }(_defineProperty);
- exports.default = function(obj, key, value) {
- return key in obj ? (0, _defineProperty2.default)(obj, key, {
- value: value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- };
-}, function(module, exports) {
- var isArray = Array.isArray;
- module.exports = isArray;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- }
- function Layer(props) {
- var children = props.children, className = props.className, others = _objectWithoutProperties(props, [ "children", "className" ]), layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()("recharts-layer", className);
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("g", _extends({
- className: layerClass
- }, others), children);
- }
- var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__), __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__), __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, propTypes = {
- className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node ])
- };
- Layer.propTypes = propTypes, __webpack_exports__.a = Layer;
-}, function(module, exports, __webpack_require__) {
- var global = __webpack_require__(167), core = __webpack_require__(168), hide = __webpack_require__(266), redefine = __webpack_require__(581), ctx = __webpack_require__(584), $export = function(type, name, source) {
- var key, own, out, exp, IS_FORCED = type & $export.F, IS_GLOBAL = type & $export.G, IS_STATIC = type & $export.S, IS_PROTO = type & $export.P, IS_BIND = type & $export.B, target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {}).prototype, exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), expProto = exports.prototype || (exports.prototype = {});
- IS_GLOBAL && (source = name);
- for (key in source) own = !IS_FORCED && target && void 0 !== target[key], out = (own ? target : source)[key],
- exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && "function" == typeof out ? ctx(Function.call, out) : out,
- target && redefine(target, key, out, type & $export.U), exports[key] != out && hide(exports, key, exp),
- IS_PROTO && expProto[key] != out && (expProto[key] = out);
- };
- global.core = core, $export.F = 1, $export.G = 2, $export.S = 4, $export.P = 8,
- $export.B = 16, $export.W = 32, $export.U = 64, $export.R = 128, module.exports = $export;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _defineProperty(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value: value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- function _toConsumableArray(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
- return arr2;
- }
- return Array.from(arr);
- }
- __webpack_require__.d(__webpack_exports__, "w", function() {
- return getValueByDataKey;
- }), __webpack_require__.d(__webpack_exports__, "n", function() {
- return getDomainOfDataByKey;
- }), __webpack_require__.d(__webpack_exports__, "b", function() {
- return calculateActiveTickIndex;
- }), __webpack_require__.d(__webpack_exports__, "r", function() {
- return getMainColorOfGraphicItem;
- }), __webpack_require__.d(__webpack_exports__, "q", function() {
- return getLegendProps;
- }), __webpack_require__.d(__webpack_exports__, "i", function() {
- return getBarSizeList;
- }), __webpack_require__.d(__webpack_exports__, "h", function() {
- return getBarPosition;
- }), __webpack_require__.d(__webpack_exports__, "a", function() {
- return appendOffsetOfLegend;
- }), __webpack_require__.d(__webpack_exports__, "z", function() {
- return parseErrorBarsOfAxis;
- }), __webpack_require__.d(__webpack_exports__, "o", function() {
- return getDomainOfItemsWithSameAxis;
- }), __webpack_require__.d(__webpack_exports__, "x", function() {
- return isCategorialAxis;
- }), __webpack_require__.d(__webpack_exports__, "m", function() {
- return getCoordinatesOfGrid;
- }), __webpack_require__.d(__webpack_exports__, "u", function() {
- return getTicksOfAxis;
- }), __webpack_require__.d(__webpack_exports__, "d", function() {
- return combineEventHandlers;
- }), __webpack_require__.d(__webpack_exports__, "A", function() {
- return parseScale;
- }), __webpack_require__.d(__webpack_exports__, "c", function() {
- return checkDomainOfScale;
- }), __webpack_require__.d(__webpack_exports__, "f", function() {
- return findPositionOfBar;
- }), __webpack_require__.d(__webpack_exports__, "C", function() {
- return truncateByDomain;
- }), __webpack_require__.d(__webpack_exports__, "s", function() {
- return getStackGroupsByAxisId;
- }), __webpack_require__.d(__webpack_exports__, "v", function() {
- return getTicksOfScale;
- }), __webpack_require__.d(__webpack_exports__, "l", function() {
- return getCateCoordinateOfLine;
- }), __webpack_require__.d(__webpack_exports__, "k", function() {
- return getCateCoordinateOfBar;
- }), __webpack_require__.d(__webpack_exports__, "j", function() {
- return getBaseValueOfBar;
- }), __webpack_require__.d(__webpack_exports__, "e", function() {
- return detectReferenceElementsDomain;
- }), __webpack_require__.d(__webpack_exports__, "t", function() {
- return getStackedDataOfItem;
- }), __webpack_require__.d(__webpack_exports__, "p", function() {
- return getDomainOfStackGroups;
- }), __webpack_require__.d(__webpack_exports__, "B", function() {
- return parseSpecifiedDomain;
- }), __webpack_require__.d(__webpack_exports__, "D", function() {
- return validateCoordinateInRange;
- }), __webpack_require__.d(__webpack_exports__, "g", function() {
- return getBandSizeOfAxis;
- }), __webpack_require__.d(__webpack_exports__, "y", function() {
- return parseDomainOfCategoryAxis;
- });
- var __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__ = __webpack_require__(45), __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isEqual__), __WEBPACK_IMPORTED_MODULE_1_lodash_sortBy__ = __webpack_require__(321), __WEBPACK_IMPORTED_MODULE_1_lodash_sortBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_sortBy__), __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__ = __webpack_require__(120), __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNaN__), __WEBPACK_IMPORTED_MODULE_3_lodash_isString__ = __webpack_require__(173), __WEBPACK_IMPORTED_MODULE_3_lodash_isString___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_isString__), __WEBPACK_IMPORTED_MODULE_4_lodash_max__ = __webpack_require__(841), __WEBPACK_IMPORTED_MODULE_4_lodash_max___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_max__), __WEBPACK_IMPORTED_MODULE_5_lodash_min__ = __webpack_require__(328), __WEBPACK_IMPORTED_MODULE_5_lodash_min___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_lodash_min__), __WEBPACK_IMPORTED_MODULE_6_lodash_isArray__ = __webpack_require__(13), __WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash_isArray__), __WEBPACK_IMPORTED_MODULE_7_lodash_flatMap__ = __webpack_require__(842), __WEBPACK_IMPORTED_MODULE_7_lodash_flatMap___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_lodash_flatMap__), __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction__ = __webpack_require__(8), __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash_isFunction__), __WEBPACK_IMPORTED_MODULE_9_lodash_get__ = __webpack_require__(174), __WEBPACK_IMPORTED_MODULE_9_lodash_get___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_lodash_get__), __WEBPACK_IMPORTED_MODULE_10_lodash_isNil__ = __webpack_require__(20), __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_lodash_isNil__), __WEBPACK_IMPORTED_MODULE_11_recharts_scale__ = __webpack_require__(844), __WEBPACK_IMPORTED_MODULE_12_d3_scale__ = (__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_recharts_scale__),
- __webpack_require__(331)), __WEBPACK_IMPORTED_MODULE_13_d3_shape__ = __webpack_require__(182), __WEBPACK_IMPORTED_MODULE_14__DataUtils__ = __webpack_require__(9), __WEBPACK_IMPORTED_MODULE_15__cartesian_ReferenceDot__ = __webpack_require__(364), __WEBPACK_IMPORTED_MODULE_16__cartesian_ReferenceLine__ = __webpack_require__(365), __WEBPACK_IMPORTED_MODULE_17__cartesian_ReferenceArea__ = __webpack_require__(366), __WEBPACK_IMPORTED_MODULE_18__cartesian_ErrorBar__ = __webpack_require__(95), __WEBPACK_IMPORTED_MODULE_19__component_Legend__ = __webpack_require__(180), __WEBPACK_IMPORTED_MODULE_20__ReactUtils__ = __webpack_require__(4), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, getValueByDataKey = function(obj, dataKey, defaultValue) {
- return __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(obj) || __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(dataKey) ? defaultValue : Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.g)(dataKey) ? __WEBPACK_IMPORTED_MODULE_9_lodash_get___default()(obj, dataKey, defaultValue) : __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(dataKey) ? dataKey(obj) : defaultValue;
- }, getDomainOfDataByKey = function(data, key, type, filterNil) {
- var flattenData = __WEBPACK_IMPORTED_MODULE_7_lodash_flatMap___default()(data, function(entry) {
- return getValueByDataKey(entry, key);
- });
- if ("number" === type) {
- var domain = flattenData.filter(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h);
- return [ Math.min.apply(null, domain), Math.max.apply(null, domain) ];
- }
- return (filterNil ? flattenData.filter(function(entry) {
- return !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(entry);
- }) : flattenData).map(function(entry) {
- return Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.g)(entry) ? entry : "";
- });
- }, calculateActiveTickIndex = function(coordinate, ticks, unsortedTicks, axis) {
- var index = -1, len = ticks.length;
- if (len > 1) {
- if (axis && "angleAxis" === axis.axisType && Math.abs(Math.abs(axis.range[1] - axis.range[0]) - 360) <= 1e-6) for (var range = axis.range, i = 0; i < len; i++) {
- var before = i > 0 ? unsortedTicks[i - 1].coordinate : unsortedTicks[len - 1].coordinate, cur = unsortedTicks[i].coordinate, after = i >= len - 1 ? unsortedTicks[0].coordinate : unsortedTicks[i + 1].coordinate, sameDirectionCoord = void 0;
- if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.j)(cur - before) !== Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.j)(after - cur)) {
- var diffInterval = [];
- if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.j)(after - cur) === Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.j)(range[1] - range[0])) {
- sameDirectionCoord = after;
- var curInRange = cur + range[1] - range[0];
- diffInterval[0] = Math.min(curInRange, (curInRange + before) / 2), diffInterval[1] = Math.max(curInRange, (curInRange + before) / 2);
- } else {
- sameDirectionCoord = before;
- var afterInRange = after + range[1] - range[0];
- diffInterval[0] = Math.min(cur, (afterInRange + cur) / 2), diffInterval[1] = Math.max(cur, (afterInRange + cur) / 2);
- }
- var sameInterval = [ Math.min(cur, (sameDirectionCoord + cur) / 2), Math.max(cur, (sameDirectionCoord + cur) / 2) ];
- if (coordinate > sameInterval[0] && coordinate <= sameInterval[1] || coordinate >= diffInterval[0] && coordinate <= diffInterval[1]) {
- index = unsortedTicks[i].index;
- break;
- }
- } else {
- var min = Math.min(before, after), max = Math.max(before, after);
- if (coordinate > (min + cur) / 2 && coordinate <= (max + cur) / 2) {
- index = unsortedTicks[i].index;
- break;
- }
- }
- } else for (var _i = 0; _i < len; _i++) if (0 === _i && coordinate <= (ticks[_i].coordinate + ticks[_i + 1].coordinate) / 2 || _i > 0 && _i < len - 1 && coordinate > (ticks[_i].coordinate + ticks[_i - 1].coordinate) / 2 && coordinate <= (ticks[_i].coordinate + ticks[_i + 1].coordinate) / 2 || _i === len - 1 && coordinate > (ticks[_i].coordinate + ticks[_i - 1].coordinate) / 2) {
- index = ticks[_i].index;
- break;
- }
- } else index = 0;
- return index;
- }, getMainColorOfGraphicItem = function(item) {
- var displayName = item.type.displayName, result = void 0;
- switch (displayName) {
- case "Line":
- case "Area":
- case "Radar":
- result = item.props.stroke;
- break;
-
- default:
- result = item.props.fill;
- }
- return result;
- }, getLegendProps = function(_ref) {
- var children = _ref.children, formatedGraphicalItems = _ref.formatedGraphicalItems, legendWidth = _ref.legendWidth, legendContent = _ref.legendContent, legendItem = Object(__WEBPACK_IMPORTED_MODULE_20__ReactUtils__.i)(children, __WEBPACK_IMPORTED_MODULE_19__component_Legend__.a);
- if (!legendItem) return null;
- var legendData = void 0;
- return legendData = legendItem.props && legendItem.props.payload ? legendItem.props && legendItem.props.payload : "children" === legendContent ? (formatedGraphicalItems || []).reduce(function(result, _ref2) {
- var item = _ref2.item, props = _ref2.props, data = props.sectors || props.data || [];
- return result.concat(data.map(function(entry) {
- return {
- type: legendItem.props.iconType || item.props.legendType,
- value: entry.name,
- color: entry.fill,
- payload: entry
- };
- }));
- }, []) : (formatedGraphicalItems || []).map(function(_ref3) {
- var item = _ref3.item, _item$props = item.props, dataKey = _item$props.dataKey, name = _item$props.name, legendType = _item$props.legendType;
- return {
- inactive: _item$props.hide,
- dataKey: dataKey,
- type: legendItem.props.iconType || legendType || "square",
- color: getMainColorOfGraphicItem(item),
- value: name || dataKey,
- payload: item.props
- };
- }), _extends({}, legendItem.props, __WEBPACK_IMPORTED_MODULE_19__component_Legend__.a.getWithHeight(legendItem, legendWidth), {
- payload: legendData,
- item: legendItem
- });
- }, getBarSizeList = function(_ref4) {
- var globalSize = _ref4.barSize, _ref4$stackGroups = _ref4.stackGroups, stackGroups = void 0 === _ref4$stackGroups ? {} : _ref4$stackGroups;
- if (!stackGroups) return {};
- for (var result = {}, numericAxisIds = Object.keys(stackGroups), i = 0, len = numericAxisIds.length; i < len; i++) for (var sgs = stackGroups[numericAxisIds[i]].stackGroups, stackIds = Object.keys(sgs), j = 0, sLen = stackIds.length; j < sLen; j++) {
- var _sgs$stackIds$j = sgs[stackIds[j]], items = _sgs$stackIds$j.items, cateAxisId = _sgs$stackIds$j.cateAxisId, barItems = items.filter(function(item) {
- return Object(__WEBPACK_IMPORTED_MODULE_20__ReactUtils__.j)(item.type).indexOf("Bar") >= 0;
- });
- if (barItems && barItems.length) {
- var selfSize = barItems[0].props.barSize, cateId = barItems[0].props[cateAxisId];
- result[cateId] || (result[cateId] = []), result[cateId].push({
- item: barItems[0],
- stackList: barItems.slice(1),
- barSize: __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(selfSize) ? globalSize : selfSize
- });
- }
- }
- return result;
- }, getBarPosition = function(_ref5) {
- var barGap = _ref5.barGap, barCategoryGap = _ref5.barCategoryGap, bandSize = _ref5.bandSize, _ref5$sizeList = _ref5.sizeList, sizeList = void 0 === _ref5$sizeList ? [] : _ref5$sizeList, maxBarSize = _ref5.maxBarSize, len = sizeList.length;
- if (len < 1) return null;
- var realBarGap = Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.d)(barGap, bandSize, 0, !0), result = void 0;
- if (sizeList[0].barSize === +sizeList[0].barSize) {
- var useFull = !1, fullBarSize = bandSize / len, sum = sizeList.reduce(function(res, entry) {
- return res + entry.barSize || 0;
- }, 0);
- sum += (len - 1) * realBarGap, sum >= bandSize && (sum -= (len - 1) * realBarGap,
- realBarGap = 0), sum >= bandSize && fullBarSize > 0 && (useFull = !0, fullBarSize *= .9,
- sum = len * fullBarSize);
- var offset = (bandSize - sum) / 2 >> 0, prev = {
- offset: offset - realBarGap,
- size: 0
- };
- result = sizeList.reduce(function(res, entry) {
- var newRes = [].concat(_toConsumableArray(res), [ {
- item: entry.item,
- position: {
- offset: prev.offset + prev.size + realBarGap,
- size: useFull ? fullBarSize : entry.barSize
- }
- } ]);
- return prev = newRes[newRes.length - 1].position, entry.stackList && entry.stackList.length && entry.stackList.forEach(function(item) {
- newRes.push({
- item: item,
- position: prev
- });
- }), newRes;
- }, []);
- } else {
- var _offset = Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.d)(barCategoryGap, bandSize, 0, !0);
- bandSize - 2 * _offset - (len - 1) * realBarGap <= 0 && (realBarGap = 0);
- var originalSize = (bandSize - 2 * _offset - (len - 1) * realBarGap) / len;
- originalSize > 1 && (originalSize >>= 0);
- var size = maxBarSize === +maxBarSize ? Math.min(originalSize, maxBarSize) : originalSize;
- result = sizeList.reduce(function(res, entry, i) {
- var newRes = [].concat(_toConsumableArray(res), [ {
- item: entry.item,
- position: {
- offset: _offset + (originalSize + realBarGap) * i + (originalSize - size) / 2,
- size: size
- }
- } ]);
- return entry.stackList && entry.stackList.length && entry.stackList.forEach(function(item) {
- newRes.push({
- item: item,
- position: newRes[newRes.length - 1].position
- });
- }), newRes;
- }, []);
- }
- return result;
- }, appendOffsetOfLegend = function(offset, items, props, legendBox) {
- var children = props.children, width = props.width, height = props.height, margin = props.margin, legendWidth = width - (margin.left || 0) - (margin.right || 0), legendHeight = height - (margin.top || 0) - (margin.bottom || 0), legendProps = getLegendProps({
- children: children,
- items: items,
- legendWidth: legendWidth,
- legendHeight: legendHeight
- }), newOffset = offset;
- if (legendProps) {
- var box = legendBox || {}, align = legendProps.align, verticalAlign = legendProps.verticalAlign, layout = legendProps.layout;
- ("vertical" === layout || "horizontal" === layout && "center" === verticalAlign) && Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(offset[align]) && (newOffset = _extends({}, offset, _defineProperty({}, align, newOffset[align] + (box.width || 0)))),
- ("horizontal" === layout || "vertical" === layout && "center" === align) && Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(offset[verticalAlign]) && (newOffset = _extends({}, offset, _defineProperty({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0))));
- }
- return newOffset;
- }, getDomainOfErrorBars = function(data, item, dataKey, axisType) {
- var children = item.props.children, errorBars = Object(__WEBPACK_IMPORTED_MODULE_20__ReactUtils__.h)(children, __WEBPACK_IMPORTED_MODULE_18__cartesian_ErrorBar__.a).filter(function(errorBarChild) {
- var direction = errorBarChild.props.direction;
- return !(!__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(direction) && !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(axisType)) || axisType.indexOf(direction) >= 0;
- });
- if (errorBars && errorBars.length) {
- var keys = errorBars.map(function(errorBarChild) {
- return errorBarChild.props.dataKey;
- });
- return data.reduce(function(result, entry) {
- var entryValue = getValueByDataKey(entry, dataKey, 0), mainValue = __WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default()(entryValue) ? [ __WEBPACK_IMPORTED_MODULE_5_lodash_min___default()(entryValue), __WEBPACK_IMPORTED_MODULE_4_lodash_max___default()(entryValue) ] : [ entryValue, entryValue ], errorDomain = keys.reduce(function(prevErrorArr, k) {
- var errorValue = getValueByDataKey(entry, k, 0), lowerValue = mainValue[0] - Math.abs(__WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default()(errorValue) ? errorValue[0] : errorValue), upperValue = mainValue[1] + Math.abs(__WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default()(errorValue) ? errorValue[1] : errorValue);
- return [ Math.min(lowerValue, prevErrorArr[0]), Math.max(upperValue, prevErrorArr[1]) ];
- }, [ 1 / 0, -1 / 0 ]);
- return [ Math.min(errorDomain[0], result[0]), Math.max(errorDomain[1], result[1]) ];
- }, [ 1 / 0, -1 / 0 ]);
- }
- return null;
- }, parseErrorBarsOfAxis = function(data, items, dataKey, axisType) {
- var domains = items.map(function(item) {
- return getDomainOfErrorBars(data, item, dataKey, axisType);
- }).filter(function(entry) {
- return !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(entry);
- });
- return domains && domains.length ? domains.reduce(function(result, entry) {
- return [ Math.min(result[0], entry[0]), Math.max(result[1], entry[1]) ];
- }, [ 1 / 0, -1 / 0 ]) : null;
- }, getDomainOfItemsWithSameAxis = function(data, items, type, filterNil) {
- var domains = items.map(function(item) {
- var dataKey = item.props.dataKey;
- return "number" === type && dataKey ? getDomainOfErrorBars(data, item, dataKey) || getDomainOfDataByKey(data, dataKey, type, filterNil) : getDomainOfDataByKey(data, dataKey, type, filterNil);
- });
- if ("number" === type) return domains.reduce(function(result, entry) {
- return [ Math.min(result[0], entry[0]), Math.max(result[1], entry[1]) ];
- }, [ 1 / 0, -1 / 0 ]);
- var tag = {};
- return domains.reduce(function(result, entry) {
- for (var i = 0, len = entry.length; i < len; i++) tag[entry[i]] || (tag[entry[i]] = !0,
- result.push(entry[i]));
- return result;
- }, []);
- }, isCategorialAxis = function(layout, axisType) {
- return "horizontal" === layout && "xAxis" === axisType || "vertical" === layout && "yAxis" === axisType || "centric" === layout && "angleAxis" === axisType || "radial" === layout && "radiusAxis" === axisType;
- }, getCoordinatesOfGrid = function(ticks, min, max) {
- var hasMin = void 0, hasMax = void 0, values = ticks.map(function(entry) {
- return entry.coordinate === min && (hasMin = !0), entry.coordinate === max && (hasMax = !0),
- entry.coordinate;
- });
- return hasMin || values.push(min), hasMax || values.push(max), values;
- }, getTicksOfAxis = function(axis, isGrid, isAll) {
- if (!axis) return null;
- var scale = axis.scale, duplicateDomain = axis.duplicateDomain, type = axis.type, range = axis.range, offset = (isGrid || isAll) && "category" === type && scale.bandwidth ? scale.bandwidth() / 2 : 0;
- return offset = "angleAxis" === axis.axisType ? 2 * Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.j)(range[0] - range[1]) * offset : offset,
- isGrid && (axis.ticks || axis.niceTicks) ? (axis.ticks || axis.niceTicks).map(function(entry) {
- var scaleContent = duplicateDomain ? duplicateDomain.indexOf(entry) : entry;
- return {
- coordinate: scale(scaleContent) + offset,
- value: entry,
- offset: offset
- };
- }) : axis.isCategorial && axis.categoricalDomain ? axis.categoricalDomain.map(function(entry, index) {
- return {
- coordinate: scale(entry),
- value: entry,
- index: index,
- offset: offset
- };
- }) : scale.ticks && !isAll ? scale.ticks(axis.tickCount).map(function(entry) {
- return {
- coordinate: scale(entry) + offset,
- value: entry,
- offset: offset
- };
- }) : scale.domain().map(function(entry, index) {
- return {
- coordinate: scale(entry) + offset,
- value: duplicateDomain ? duplicateDomain[entry] : entry,
- index: index,
- offset: offset
- };
- });
- }, combineEventHandlers = function(defaultHandler, parentHandler, childHandler) {
- var customizedHandler = void 0;
- return __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(childHandler) ? customizedHandler = childHandler : __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(parentHandler) && (customizedHandler = parentHandler),
- __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(defaultHandler) || customizedHandler ? function(arg1, arg2, arg3, arg4) {
- __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(defaultHandler) && defaultHandler(arg1, arg2, arg3, arg4),
- __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(customizedHandler) && customizedHandler(arg1, arg2, arg3, arg4);
- } : null;
- }, parseScale = function(axis, chartType) {
- var scale = axis.scale, type = axis.type, layout = axis.layout, axisType = axis.axisType;
- if ("auto" === scale) return "radial" === layout && "radiusAxis" === axisType ? {
- scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__.scaleBand(),
- realScaleType: "band"
- } : "radial" === layout && "angleAxis" === axisType ? {
- scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__.scaleLinear(),
- realScaleType: "linear"
- } : "category" === type && chartType && (chartType.indexOf("LineChart") >= 0 || chartType.indexOf("AreaChart") >= 0) ? {
- scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__.scalePoint(),
- realScaleType: "point"
- } : "category" === type ? {
- scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__.scaleBand(),
- realScaleType: "band"
- } : {
- scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__.scaleLinear(),
- realScaleType: "linear"
- };
- if (__WEBPACK_IMPORTED_MODULE_3_lodash_isString___default()(scale)) {
- var name = "scale" + scale.slice(0, 1).toUpperCase() + scale.slice(1);
- return {
- scale: (__WEBPACK_IMPORTED_MODULE_12_d3_scale__[name] || __WEBPACK_IMPORTED_MODULE_12_d3_scale__.scalePoint)(),
- realScaleType: __WEBPACK_IMPORTED_MODULE_12_d3_scale__[name] ? name : "point"
- };
- }
- return __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(scale) ? {
- scale: scale
- } : {
- scale: __WEBPACK_IMPORTED_MODULE_12_d3_scale__.scalePoint(),
- realScaleType: "point"
- };
- }, checkDomainOfScale = function(scale) {
- var domain = scale.domain();
- if (domain && !(domain.length <= 2)) {
- var len = domain.length, range = scale.range(), min = Math.min(range[0], range[1]) - 1e-4, max = Math.max(range[0], range[1]) + 1e-4, first = scale(domain[0]), last = scale(domain[len - 1]);
- (first < min || first > max || last < min || last > max) && scale.domain([ domain[0], domain[len - 1] ]);
- }
- }, findPositionOfBar = function(barPosition, child) {
- if (!barPosition) return null;
- for (var i = 0, len = barPosition.length; i < len; i++) if (barPosition[i].item === child) return barPosition[i].position;
- return null;
- }, truncateByDomain = function(value, domain) {
- if (!domain || 2 !== domain.length || !Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(domain[0]) || !Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(domain[1])) return value;
- var min = Math.min(domain[0], domain[1]), max = Math.max(domain[0], domain[1]), result = [ value[0], value[1] ];
- return (!Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(value[0]) || value[0] < min) && (result[0] = min),
- (!Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(value[1]) || value[1] > max) && (result[1] = max),
- result[0] > max && (result[0] = max), result[1] < min && (result[1] = min), result;
- }, offsetSign = function(series) {
- var n = series.length;
- if (!(n <= 0)) for (var j = 0, m = series[0].length; j < m; ++j) for (var positive = 0, negative = 0, i = 0; i < n; ++i) {
- var value = __WEBPACK_IMPORTED_MODULE_2_lodash_isNaN___default()(series[i][j][1]) ? series[i][j][0] : series[i][j][1];
- value >= 0 ? (series[i][j][0] = positive, series[i][j][1] = positive + value, positive = series[i][j][1]) : (series[i][j][0] = negative,
- series[i][j][1] = negative + value, negative = series[i][j][1]);
- }
- }, STACK_OFFSET_MAP = {
- sign: offsetSign,
- expand: __WEBPACK_IMPORTED_MODULE_13_d3_shape__.o,
- none: __WEBPACK_IMPORTED_MODULE_13_d3_shape__.p,
- silhouette: __WEBPACK_IMPORTED_MODULE_13_d3_shape__.q,
- wiggle: __WEBPACK_IMPORTED_MODULE_13_d3_shape__.r
- }, getStackedData = function(data, stackItems, offsetType) {
- var dataKeys = stackItems.map(function(item) {
- return item.props.dataKey;
- });
- return Object(__WEBPACK_IMPORTED_MODULE_13_d3_shape__.n)().keys(dataKeys).value(function(d, key) {
- return +getValueByDataKey(d, key, 0);
- }).order(__WEBPACK_IMPORTED_MODULE_13_d3_shape__.s).offset(STACK_OFFSET_MAP[offsetType])(data);
- }, getStackGroupsByAxisId = function(data, _items, numericAxisId, cateAxisId, offsetType, reverseStackOrder) {
- if (!data) return null;
- var items = reverseStackOrder ? _items.reverse() : _items, stackGroups = items.reduce(function(result, item) {
- var _item$props2 = item.props, stackId = _item$props2.stackId;
- if (_item$props2.hide) return result;
- var axisId = item.props[numericAxisId], parentGroup = result[axisId] || {
- hasStack: !1,
- stackGroups: {}
- };
- if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.g)(stackId)) {
- var childGroup = parentGroup.stackGroups[stackId] || {
- numericAxisId: numericAxisId,
- cateAxisId: cateAxisId,
- items: []
- };
- childGroup.items.push(item), parentGroup.hasStack = !0, parentGroup.stackGroups[stackId] = childGroup;
- } else parentGroup.stackGroups[Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.k)("_stackId_")] = {
- numericAxisId: numericAxisId,
- cateAxisId: cateAxisId,
- items: [ item ]
- };
- return _extends({}, result, _defineProperty({}, axisId, parentGroup));
- }, {});
- return Object.keys(stackGroups).reduce(function(result, axisId) {
- var group = stackGroups[axisId];
- return group.hasStack && (group.stackGroups = Object.keys(group.stackGroups).reduce(function(res, stackId) {
- var g = group.stackGroups[stackId];
- return _extends({}, res, _defineProperty({}, stackId, {
- numericAxisId: numericAxisId,
- cateAxisId: cateAxisId,
- items: g.items,
- stackedData: getStackedData(data, g.items, offsetType)
- }));
- }, {})), _extends({}, result, _defineProperty({}, axisId, group));
- }, {});
- }, calculateDomainOfTicks = function(ticks, type) {
- return "number" === type ? [ Math.min.apply(null, ticks), Math.max.apply(null, ticks) ] : ticks;
- }, getTicksOfScale = function(scale, opts) {
- var realScaleType = opts.realScaleType, type = opts.type, tickCount = opts.tickCount, originalDomain = opts.originalDomain, allowDecimals = opts.allowDecimals, scaleType = realScaleType || opts.scale;
- if ("auto" !== scaleType && "linear" !== scaleType) return null;
- if (tickCount && "number" === type && originalDomain && ("auto" === originalDomain[0] || "auto" === originalDomain[1])) {
- var domain = scale.domain(), tickValues = Object(__WEBPACK_IMPORTED_MODULE_11_recharts_scale__.getNiceTickValues)(domain, tickCount, allowDecimals);
- return scale.domain(calculateDomainOfTicks(tickValues, type)), {
- niceTicks: tickValues
- };
- }
- if (tickCount && "number" === type) {
- var _domain = scale.domain();
- return {
- niceTicks: Object(__WEBPACK_IMPORTED_MODULE_11_recharts_scale__.getTickValuesFixedDomain)(_domain, tickCount, allowDecimals)
- };
- }
- return null;
- }, getCateCoordinateOfLine = function(_ref6) {
- var axis = _ref6.axis, ticks = _ref6.ticks, bandSize = _ref6.bandSize, entry = _ref6.entry, index = _ref6.index;
- if ("category" === axis.type) {
- if (!axis.allowDuplicatedCategory && axis.dataKey && !__WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(entry[axis.dataKey])) {
- var matchedTick = Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.a)(ticks, "value", entry[axis.dataKey]);
- if (matchedTick) return matchedTick.coordinate + bandSize / 2;
- }
- return ticks[index] ? ticks[index].coordinate + bandSize / 2 : null;
- }
- var value = getValueByDataKey(entry, axis.dataKey);
- return __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(value) ? null : axis.scale(value);
- }, getCateCoordinateOfBar = function(_ref7) {
- var axis = _ref7.axis, ticks = _ref7.ticks, offset = _ref7.offset, bandSize = _ref7.bandSize, entry = _ref7.entry, index = _ref7.index;
- if ("category" === axis.type) return ticks[index] ? ticks[index].coordinate + offset : null;
- var value = getValueByDataKey(entry, axis.dataKey, axis.domain[index]);
- return __WEBPACK_IMPORTED_MODULE_10_lodash_isNil___default()(value) ? null : axis.scale(value) - bandSize / 2 + offset;
- }, getBaseValueOfBar = function(_ref8) {
- var numericAxis = _ref8.numericAxis, domain = numericAxis.scale.domain();
- if ("number" === numericAxis.type) {
- var min = Math.min(domain[0], domain[1]), max = Math.max(domain[0], domain[1]);
- return min <= 0 && max >= 0 ? 0 : max < 0 ? max : min;
- }
- return domain[0];
- }, detectReferenceElementsDomain = function(children, domain, axisId, axisType, specifiedTicks) {
- var lines = Object(__WEBPACK_IMPORTED_MODULE_20__ReactUtils__.h)(children, __WEBPACK_IMPORTED_MODULE_16__cartesian_ReferenceLine__.a), dots = Object(__WEBPACK_IMPORTED_MODULE_20__ReactUtils__.h)(children, __WEBPACK_IMPORTED_MODULE_15__cartesian_ReferenceDot__.a), elements = lines.concat(dots), areas = Object(__WEBPACK_IMPORTED_MODULE_20__ReactUtils__.h)(children, __WEBPACK_IMPORTED_MODULE_17__cartesian_ReferenceArea__.a), idKey = axisType + "Id", valueKey = axisType[0], finalDomain = domain;
- if (elements.length && (finalDomain = elements.reduce(function(result, el) {
- if (el.props[idKey] === axisId && el.props.alwaysShow && Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(el.props[valueKey])) {
- var value = el.props[valueKey];
- return [ Math.min(result[0], value), Math.max(result[1], value) ];
- }
- return result;
- }, finalDomain)), areas.length) {
- var key1 = valueKey + "1", key2 = valueKey + "2";
- finalDomain = areas.reduce(function(result, el) {
- if (el.props[idKey] === axisId && el.props.alwaysShow && Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(el.props[key1]) && Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(el.props[key2])) {
- var value1 = el.props[key1], value2 = el.props[key2];
- return [ Math.min(result[0], value1, value2), Math.max(result[1], value1, value2) ];
- }
- return result;
- }, finalDomain);
- }
- return specifiedTicks && specifiedTicks.length && (finalDomain = specifiedTicks.reduce(function(result, tick) {
- return Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(tick) ? [ Math.min(result[0], tick), Math.max(result[1], tick) ] : result;
- }, finalDomain)), finalDomain;
- }, getStackedDataOfItem = function(item, stackGroups) {
- var stackId = item.props.stackId;
- if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.g)(stackId)) {
- var group = stackGroups[stackId];
- if (group && group.items.length) {
- for (var itemIndex = -1, i = 0, len = group.items.length; i < len; i++) if (group.items[i] === item) {
- itemIndex = i;
- break;
- }
- return itemIndex >= 0 ? group.stackedData[itemIndex] : null;
- }
- }
- return null;
- }, getDomainOfSingle = function(data) {
- return data.reduce(function(result, entry) {
- return [ Math.min.apply(null, entry.concat([ result[0] ]).filter(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)), Math.max.apply(null, entry.concat([ result[1] ]).filter(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)) ];
- }, [ 1 / 0, -1 / 0 ]);
- }, getDomainOfStackGroups = function(stackGroups, startIndex, endIndex) {
- return Object.keys(stackGroups).reduce(function(result, stackId) {
- var group = stackGroups[stackId], stackedData = group.stackedData, domain = stackedData.reduce(function(res, entry) {
- var s = getDomainOfSingle(entry.slice(startIndex, endIndex + 1));
- return [ Math.min(res[0], s[0]), Math.max(res[1], s[1]) ];
- }, [ 1 / 0, -1 / 0 ]);
- return [ Math.min(domain[0], result[0]), Math.max(domain[1], result[1]) ];
- }, [ 1 / 0, -1 / 0 ]).map(function(result) {
- return result === 1 / 0 || result === -1 / 0 ? 0 : result;
- });
- }, MIN_VALUE_REG = /^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, MAX_VALUE_REG = /^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/, parseSpecifiedDomain = function(specifiedDomain, dataDomain, allowDataOverflow) {
- if (!__WEBPACK_IMPORTED_MODULE_6_lodash_isArray___default()(specifiedDomain)) return dataDomain;
- var domain = [];
- if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(specifiedDomain[0])) domain[0] = allowDataOverflow ? specifiedDomain[0] : Math.min(specifiedDomain[0], dataDomain[0]); else if (MIN_VALUE_REG.test(specifiedDomain[0])) {
- var value = +MIN_VALUE_REG.exec(specifiedDomain[0])[1];
- domain[0] = dataDomain[0] - value;
- } else __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(specifiedDomain[0]) ? domain[0] = specifiedDomain[0](dataDomain[0]) : domain[0] = dataDomain[0];
- if (Object(__WEBPACK_IMPORTED_MODULE_14__DataUtils__.h)(specifiedDomain[1])) domain[1] = allowDataOverflow ? specifiedDomain[1] : Math.max(specifiedDomain[1], dataDomain[1]); else if (MAX_VALUE_REG.test(specifiedDomain[1])) {
- var _value = +MAX_VALUE_REG.exec(specifiedDomain[1])[1];
- domain[1] = dataDomain[1] + _value;
- } else __WEBPACK_IMPORTED_MODULE_8_lodash_isFunction___default()(specifiedDomain[1]) ? domain[1] = specifiedDomain[1](dataDomain[1]) : domain[1] = dataDomain[1];
- return domain;
- }, validateCoordinateInRange = function(coordinate, scale) {
- if (!scale) return !1;
- var range = scale.range(), first = range[0], last = range[range.length - 1];
- return first <= last ? coordinate >= first && coordinate <= last : coordinate >= last && coordinate <= first;
- }, getBandSizeOfAxis = function(axis, ticks) {
- if (axis && axis.scale && axis.scale.bandwidth) return axis.scale.bandwidth();
- if (axis && ticks && ticks.length >= 2) {
- for (var orderedTicks = __WEBPACK_IMPORTED_MODULE_1_lodash_sortBy___default()(ticks, function(o) {
- return o.coordinate;
- }), bandSize = 1 / 0, i = 1, len = orderedTicks.length; i < len; i++) {
- var cur = orderedTicks[i], prev = orderedTicks[i - 1];
- bandSize = Math.min((cur.coordinate || 0) - (prev.coordinate || 0), bandSize);
- }
- return bandSize === 1 / 0 ? 0 : bandSize;
- }
- return 0;
- }, parseDomainOfCategoryAxis = function(specifiedDomain, calculatedDomain, axisChild) {
- return specifiedDomain && specifiedDomain.length ? __WEBPACK_IMPORTED_MODULE_0_lodash_isEqual___default()(specifiedDomain, __WEBPACK_IMPORTED_MODULE_9_lodash_get___default()(axisChild, "type.defaultProps.domain")) ? calculatedDomain : specifiedDomain : calculatedDomain;
- };
-}, function(module, exports) {
- var core = module.exports = {
- version: "2.5.7"
- };
- "number" == typeof __e && (__e = core);
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function newInterval(floori, offseti, count, field) {
- function interval(date) {
- return floori(date = new Date(+date)), date;
- }
- return interval.floor = interval, interval.ceil = function(date) {
- return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
- }, interval.round = function(date) {
- var d0 = interval(date), d1 = interval.ceil(date);
- return date - d0 < d1 - date ? d0 : d1;
- }, interval.offset = function(date, step) {
- return offseti(date = new Date(+date), null == step ? 1 : Math.floor(step)), date;
- }, interval.range = function(start, stop, step) {
- var previous, range = [];
- if (start = interval.ceil(start), step = null == step ? 1 : Math.floor(step), !(start < stop && step > 0)) return range;
- do {
- range.push(previous = new Date(+start)), offseti(start, step), floori(start);
- } while (previous < start && start < stop);
- return range;
- }, interval.filter = function(test) {
- return newInterval(function(date) {
- if (date >= date) for (;floori(date), !test(date); ) date.setTime(date - 1);
- }, function(date, step) {
- if (date >= date) if (step < 0) for (;++step <= 0; ) for (;offseti(date, -1), !test(date); ) ; else for (;--step >= 0; ) for (;offseti(date, 1),
- !test(date); ) ;
- });
- }, count && (interval.count = function(start, end) {
- return t0.setTime(+start), t1.setTime(+end), floori(t0), floori(t1), Math.floor(count(t0, t1));
- }, interval.every = function(step) {
- return step = Math.floor(step), isFinite(step) && step > 0 ? step > 1 ? interval.filter(field ? function(d) {
- return field(d) % step == 0;
- } : function(d) {
- return interval.count(0, d) % step == 0;
- }) : interval : null;
- }), interval;
- }
- __webpack_exports__.a = newInterval;
- var t0 = new Date(), t1 = new Date();
-}, function(module, exports, __webpack_require__) {
- var global = __webpack_require__(24), core = __webpack_require__(17), ctx = __webpack_require__(51), hide = __webpack_require__(39), has = __webpack_require__(54), $export = function(type, name, source) {
- var key, own, out, IS_FORCED = type & $export.F, IS_GLOBAL = type & $export.G, IS_STATIC = type & $export.S, IS_PROTO = type & $export.P, IS_BIND = type & $export.B, IS_WRAP = type & $export.W, exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), expProto = exports.prototype, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {}).prototype;
- IS_GLOBAL && (source = name);
- for (key in source) (own = !IS_FORCED && target && void 0 !== target[key]) && has(exports, key) || (out = own ? target[key] : source[key],
- exports[key] = IS_GLOBAL && "function" != typeof target[key] ? source[key] : IS_BIND && own ? ctx(out, global) : IS_WRAP && target[key] == out ? function(C) {
- var F = function(a, b, c) {
- if (this instanceof C) {
- switch (arguments.length) {
- case 0:
- return new C();
-
- case 1:
- return new C(a);
-
- case 2:
- return new C(a, b);
- }
- return new C(a, b, c);
- }
- return C.apply(this, arguments);
- };
- return F.prototype = C.prototype, F;
- }(out) : IS_PROTO && "function" == typeof out ? ctx(Function.call, out) : out, IS_PROTO && ((exports.virtual || (exports.virtual = {}))[key] = out,
- type & $export.R && expProto && !expProto[key] && hide(expProto, key, out)));
- };
- $export.F = 1, $export.G = 2, $export.S = 4, $export.P = 8, $export.B = 16, $export.W = 32,
- $export.U = 64, $export.R = 128, module.exports = $export;
-}, function(module, exports) {
- function isNil(value) {
- return null == value;
- }
- module.exports = isNil;
-}, function(module, exports, __webpack_require__) {
- var store = __webpack_require__(151)("wks"), uid = __webpack_require__(103), Symbol = __webpack_require__(24).Symbol, USE_SYMBOL = "function" == typeof Symbol;
- (module.exports = function(name) {
- return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)("Symbol." + name));
- }).store = store;
-}, function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(52), IE8_DOM_DEFINE = __webpack_require__(224), toPrimitive = __webpack_require__(145), dP = Object.defineProperty;
- exports.f = __webpack_require__(25) ? Object.defineProperty : function(O, P, Attributes) {
- if (anObject(O), P = toPrimitive(P, !0), anObject(Attributes), IE8_DOM_DEFINE) try {
- return dP(O, P, Attributes);
- } catch (e) {}
- if ("get" in Attributes || "set" in Attributes) throw TypeError("Accessors not supported!");
- return "value" in Attributes && (O[P] = Attributes.value), O;
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _defineProperty(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value: value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return RADIAN;
- }), __webpack_require__.d(__webpack_exports__, "e", function() {
- return polarToCartesian;
- }), __webpack_require__.d(__webpack_exports__, "c", function() {
- return getMaxRadius;
- }), __webpack_require__.d(__webpack_exports__, "b", function() {
- return formatAxisMap;
- }), __webpack_require__.d(__webpack_exports__, "d", function() {
- return inRangeOfSector;
- });
- var __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(20), __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__), __WEBPACK_IMPORTED_MODULE_1__DataUtils__ = __webpack_require__(9), __WEBPACK_IMPORTED_MODULE_2__ChartUtils__ = __webpack_require__(16), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, RADIAN = Math.PI / 180, radianToDegree = function(angleInRadian) {
- return 180 * angleInRadian / Math.PI;
- }, polarToCartesian = function(cx, cy, radius, angle) {
- return {
- x: cx + Math.cos(-RADIAN * angle) * radius,
- y: cy + Math.sin(-RADIAN * angle) * radius
- };
- }, getMaxRadius = function(width, height) {
- var offset = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- };
- return Math.min(Math.abs(width - (offset.left || 0) - (offset.right || 0)), Math.abs(height - (offset.top || 0) - (offset.bottom || 0))) / 2;
- }, formatAxisMap = function(props, axisMap, offset, axisType, chartName) {
- var width = props.width, height = props.height, startAngle = props.startAngle, endAngle = props.endAngle, cx = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__.d)(props.cx, width, width / 2), cy = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__.d)(props.cy, height, height / 2), maxRadius = getMaxRadius(width, height, offset), innerRadius = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__.d)(props.innerRadius, maxRadius, 0), outerRadius = Object(__WEBPACK_IMPORTED_MODULE_1__DataUtils__.d)(props.outerRadius, maxRadius, .8 * maxRadius);
- return Object.keys(axisMap).reduce(function(result, id) {
- var axis = axisMap[id], domain = axis.domain, reversed = axis.reversed, range = void 0;
- __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(axis.range) ? ("angleAxis" === axisType ? range = [ startAngle, endAngle ] : "radiusAxis" === axisType && (range = [ innerRadius, outerRadius ]),
- reversed && (range = [ range[1], range[0] ])) : (range = axis.range, startAngle = range[0],
- endAngle = range[1]);
- var _parseScale = Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__.A)(axis, chartName), realScaleType = _parseScale.realScaleType, scale = _parseScale.scale;
- scale.domain(domain).range(range), Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__.c)(scale);
- var ticks = Object(__WEBPACK_IMPORTED_MODULE_2__ChartUtils__.v)(scale, _extends({}, axis, {
- realScaleType: realScaleType
- })), finalAxis = _extends({}, axis, ticks, {
- range: range,
- radius: outerRadius,
- realScaleType: realScaleType,
- scale: scale,
- cx: cx,
- cy: cy,
- innerRadius: innerRadius,
- outerRadius: outerRadius,
- startAngle: startAngle,
- endAngle: endAngle
- });
- return _extends({}, result, _defineProperty({}, id, finalAxis));
- }, {});
- }, distanceBetweenPoints = function(point, anotherPoint) {
- var x1 = point.x, y1 = point.y, x2 = anotherPoint.x, y2 = anotherPoint.y;
- return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
- }, getAngleOfPoint = function(_ref, _ref2) {
- var x = _ref.x, y = _ref.y, cx = _ref2.cx, cy = _ref2.cy, radius = distanceBetweenPoints({
- x: x,
- y: y
- }, {
- x: cx,
- y: cy
- });
- if (radius <= 0) return {
- radius: radius
- };
- var cos = (x - cx) / radius, angleInRadian = Math.acos(cos);
- return y > cy && (angleInRadian = 2 * Math.PI - angleInRadian), {
- radius: radius,
- angle: radianToDegree(angleInRadian),
- angleInRadian: angleInRadian
- };
- }, formatAngleOfSector = function(_ref3) {
- var startAngle = _ref3.startAngle, endAngle = _ref3.endAngle, startCnt = Math.floor(startAngle / 360), endCnt = Math.floor(endAngle / 360), min = Math.min(startCnt, endCnt);
- return {
- startAngle: startAngle - 360 * min,
- endAngle: endAngle - 360 * min
- };
- }, reverseFormatAngleOfSetor = function(angle, _ref4) {
- var startAngle = _ref4.startAngle, endAngle = _ref4.endAngle, startCnt = Math.floor(startAngle / 360), endCnt = Math.floor(endAngle / 360);
- return angle + 360 * Math.min(startCnt, endCnt);
- }, inRangeOfSector = function(_ref5, sector) {
- var x = _ref5.x, y = _ref5.y, _getAngleOfPoint = getAngleOfPoint({
- x: x,
- y: y
- }, sector), radius = _getAngleOfPoint.radius, angle = _getAngleOfPoint.angle, innerRadius = sector.innerRadius, outerRadius = sector.outerRadius;
- if (radius < innerRadius || radius > outerRadius) return !1;
- if (0 === radius) return !0;
- var _formatAngleOfSector = formatAngleOfSector(sector), startAngle = _formatAngleOfSector.startAngle, endAngle = _formatAngleOfSector.endAngle, formatAngle = angle, inRange = void 0;
- if (startAngle <= endAngle) {
- for (;formatAngle > endAngle; ) formatAngle -= 360;
- for (;formatAngle < startAngle; ) formatAngle += 360;
- inRange = formatAngle >= startAngle && formatAngle <= endAngle;
- } else {
- for (;formatAngle > startAngle; ) formatAngle -= 360;
- for (;formatAngle < endAngle; ) formatAngle += 360;
- inRange = formatAngle >= endAngle && formatAngle <= startAngle;
- }
- return inRange ? _extends({}, sector, {
- radius: radius,
- angle: reverseFormatAngleOfSetor(formatAngle, sector)
- }) : null;
- };
-}, function(module, exports) {
- var global = module.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
- "number" == typeof __g && (__g = global);
-}, function(module, exports, __webpack_require__) {
- module.exports = !__webpack_require__(53)(function() {
- return 7 != Object.defineProperty({}, "a", {
- get: function() {
- return 7;
- }
- }).a;
- });
-}, function(module, exports, __webpack_require__) {
- module.exports = {
- default: __webpack_require__(394),
- __esModule: !0
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- exports.__esModule = !0, exports.default = function(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- exports.__esModule = !0;
- var _defineProperty = __webpack_require__(154), _defineProperty2 = function(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }(_defineProperty);
- exports.default = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), (0, _defineProperty2.default)(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }();
-}, function(module, exports, __webpack_require__) {
- "use strict";
- exports.__esModule = !0;
- var _typeof2 = __webpack_require__(105), _typeof3 = function(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }(_typeof2);
- exports.default = function(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" !== (void 0 === call ? "undefined" : (0, _typeof3.default)(call)) && "function" != typeof call ? self : call;
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- exports.__esModule = !0;
- var _setPrototypeOf = __webpack_require__(411), _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf), _create = __webpack_require__(415), _create2 = _interopRequireDefault(_create), _typeof2 = __webpack_require__(105), _typeof3 = _interopRequireDefault(_typeof2);
- exports.default = function(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === superClass ? "undefined" : (0,
- _typeof3.default)(superClass)));
- subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (_setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass);
- };
-}, function(module, exports, __webpack_require__) {
- var freeGlobal = __webpack_require__(268), freeSelf = "object" == typeof self && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function("return this")();
- module.exports = root;
-}, function(module, exports) {
- function isObject(value) {
- var type = typeof value;
- return null != value && ("object" == type || "function" == type);
- }
- module.exports = isObject;
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- Object.defineProperty(exports, "__esModule", {
- value: !0
- }), exports.translateStyle = exports.AnimateGroup = exports.configBezier = exports.configSpring = void 0;
- var _Animate = __webpack_require__(287), _Animate2 = _interopRequireDefault(_Animate), _easing = __webpack_require__(305), _util = __webpack_require__(132), _AnimateGroup = __webpack_require__(762), _AnimateGroup2 = _interopRequireDefault(_AnimateGroup);
- exports.configSpring = _easing.configSpring, exports.configBezier = _easing.configBezier,
- exports.AnimateGroup = _AnimateGroup2.default, exports.translateStyle = _util.translateStyle,
- exports.default = _Animate2.default;
-}, function(module, exports) {
- var isArray = Array.isArray;
- module.exports = isArray;
-}, function(module, exports) {
- module.exports = function(it) {
- return "object" == typeof it ? null !== it : "function" == typeof it;
- };
-}, function(module, exports, __webpack_require__) {
- var freeGlobal = __webpack_require__(292), freeSelf = "object" == typeof self && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function("return this")();
- module.exports = root;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var __WEBPACK_IMPORTED_MODULE_0__src_bisect__ = __webpack_require__(332);
- __webpack_require__.d(__webpack_exports__, "b", function() {
- return __WEBPACK_IMPORTED_MODULE_0__src_bisect__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_1__src_ascending__ = __webpack_require__(69);
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return __WEBPACK_IMPORTED_MODULE_1__src_ascending__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_2__src_bisector__ = __webpack_require__(333);
- __webpack_require__.d(__webpack_exports__, "c", function() {
- return __WEBPACK_IMPORTED_MODULE_2__src_bisector__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_18__src_quantile__ = (__webpack_require__(848), __webpack_require__(849),
- __webpack_require__(335), __webpack_require__(337), __webpack_require__(850), __webpack_require__(853),
- __webpack_require__(854), __webpack_require__(341), __webpack_require__(855), __webpack_require__(856),
- __webpack_require__(857), __webpack_require__(858), __webpack_require__(342), __webpack_require__(334),
- __webpack_require__(859), __webpack_require__(204));
- __webpack_require__.d(__webpack_exports__, "d", function() {
- return __WEBPACK_IMPORTED_MODULE_18__src_quantile__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_19__src_range__ = __webpack_require__(339);
- __webpack_require__.d(__webpack_exports__, "e", function() {
- return __WEBPACK_IMPORTED_MODULE_19__src_range__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_23__src_ticks__ = (__webpack_require__(860), __webpack_require__(861),
- __webpack_require__(862), __webpack_require__(340));
- __webpack_require__.d(__webpack_exports__, "h", function() {
- return __WEBPACK_IMPORTED_MODULE_23__src_ticks__.a;
- }), __webpack_require__.d(__webpack_exports__, "f", function() {
- return __WEBPACK_IMPORTED_MODULE_23__src_ticks__.b;
- }), __webpack_require__.d(__webpack_exports__, "g", function() {
- return __WEBPACK_IMPORTED_MODULE_23__src_ticks__.c;
- });
- __webpack_require__(343), __webpack_require__(336), __webpack_require__(863);
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.d(__webpack_exports__, "d", function() {
- return durationSecond;
- }), __webpack_require__.d(__webpack_exports__, "c", function() {
- return durationMinute;
- }), __webpack_require__.d(__webpack_exports__, "b", function() {
- return durationHour;
- }), __webpack_require__.d(__webpack_exports__, "a", function() {
- return durationDay;
- }), __webpack_require__.d(__webpack_exports__, "e", function() {
- return durationWeek;
- });
- var durationSecond = 1e3, durationMinute = 6e4, durationHour = 36e5, durationDay = 864e5, durationWeek = 6048e5;
-}, function(module, exports, __webpack_require__) {
- var dP = __webpack_require__(22), createDesc = __webpack_require__(75);
- module.exports = __webpack_require__(25) ? function(object, key, value) {
- return dP.f(object, key, createDesc(1, value));
- } : function(object, key, value) {
- return object[key] = value, object;
- };
-}, function(module, exports) {
- var g;
- g = function() {
- return this;
- }();
- try {
- g = g || Function("return this")() || (0, eval)("this");
- } catch (e) {
- "object" == typeof window && (g = window);
- }
- module.exports = g;
-}, function(module, exports, __webpack_require__) {
- function baseGetTag(value) {
- return null == value ? void 0 === value ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
- }
- var Symbol = __webpack_require__(83), getRawTag = __webpack_require__(603), objectToString = __webpack_require__(604), nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag = Symbol ? Symbol.toStringTag : void 0;
- module.exports = baseGetTag;
-}, function(module, exports) {
- function isObjectLike(value) {
- return null != value && "object" == typeof value;
- }
- module.exports = isObjectLike;
-}, function(module, exports) {
- function isObjectLike(value) {
- return null != value && "object" == typeof value;
- }
- module.exports = isObjectLike;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _toConsumableArray(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
- return arr2;
- }
- return Array.from(arr);
- }
- function Label(props) {
- var viewBox = props.viewBox, position = props.position, value = props.value, children = props.children, content = props.content, _props$className = props.className, className = void 0 === _props$className ? "" : _props$className;
- if (!viewBox || __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(value) && __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(children) && !Object(__WEBPACK_IMPORTED_MODULE_3_react__.isValidElement)(content) && !__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(content)) return null;
- if (Object(__WEBPACK_IMPORTED_MODULE_3_react__.isValidElement)(content)) return Object(__WEBPACK_IMPORTED_MODULE_3_react__.cloneElement)(content, props);
- var label = void 0;
- if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(content)) {
- if (label = content(props), Object(__WEBPACK_IMPORTED_MODULE_3_react__.isValidElement)(label)) return label;
- } else label = getLabel(props);
- var isPolarLabel = isPolar(viewBox), attrs = Object(__WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__.k)(props);
- if (isPolarLabel && ("insideStart" === position || "insideEnd" === position || "end" === position)) return renderRadialLabel(props, label, attrs);
- var positionAttrs = isPolarLabel ? getAttrsOfPolarLabel(props) : getAttrsOfCartesianLabel(props);
- return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__Text__.a, _extends({
- className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()("recharts-label", className)
- }, attrs, positionAttrs), label);
- }
- var __WEBPACK_IMPORTED_MODULE_0_lodash_isObject__ = __webpack_require__(32), __WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isObject__), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(8), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__), __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(20), __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__), __WEBPACK_IMPORTED_MODULE_3_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_3_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react__), __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__), __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__), __WEBPACK_IMPORTED_MODULE_6__Text__ = __webpack_require__(61), __WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__ = __webpack_require__(4), __WEBPACK_IMPORTED_MODULE_8__util_DataUtils__ = __webpack_require__(9), __WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__ = __webpack_require__(23), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, cartesianViewBoxShape = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({
- x: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- y: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- width: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- height: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number
- }), polarViewBoxShape = __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({
- cx: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- cy: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- innerRadius: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- outerRadius: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- startAngle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- endAngle: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number
- }), propTypes = {
- viewBox: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([ cartesianViewBoxShape, polarViewBoxShape ]),
- formatter: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
- value: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string ]),
- offset: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.number,
- position: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOf([ "top", "left", "right", "bottom", "inside", "outside", "insideLeft", "insideRight", "insideTop", "insideBottom", "insideTopLeft", "insideBottomLeft", "insideTopRight", "insideBottomRight", "insideStart", "insideEnd", "end", "center" ]),
- children: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.node ]),
- className: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
- content: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.element, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func ])
- }, defaultProps = {
- offset: 5
- }, getLabel = function(props) {
- var value = props.value, formatter = props.formatter, label = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(props.children) ? value : props.children;
- return __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(formatter) ? formatter(label) : label;
- }, getDeltaAngle = function(startAngle, endAngle) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.j)(endAngle - startAngle) * Math.min(Math.abs(endAngle - startAngle), 360);
- }, renderRadialLabel = function(labelProps, label, attrs) {
- var position = labelProps.position, viewBox = labelProps.viewBox, offset = labelProps.offset, className = labelProps.className, cx = viewBox.cx, cy = viewBox.cy, innerRadius = viewBox.innerRadius, outerRadius = viewBox.outerRadius, startAngle = viewBox.startAngle, endAngle = viewBox.endAngle, clockWise = viewBox.clockWise, radius = (innerRadius + outerRadius) / 2, deltaAngle = getDeltaAngle(startAngle, endAngle), sign = deltaAngle >= 0 ? 1 : -1, labelAngle = void 0, direction = void 0;
- "insideStart" === position ? (labelAngle = startAngle + sign * offset, direction = clockWise) : "insideEnd" === position ? (labelAngle = endAngle - sign * offset,
- direction = !clockWise) : "end" === position && (labelAngle = endAngle + sign * offset,
- direction = clockWise), direction = deltaAngle <= 0 ? direction : !direction;
- var startPoint = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__.e)(cx, cy, radius, labelAngle), endPoint = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__.e)(cx, cy, radius, labelAngle + 359 * (direction ? 1 : -1)), path = "M" + startPoint.x + "," + startPoint.y + "\n A" + radius + "," + radius + ",0,1," + (direction ? 0 : 1) + ",\n " + endPoint.x + "," + endPoint.y, id = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(labelProps.id) ? Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.k)("recharts-radial-line-") : labelProps.id;
- return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("text", _extends({}, attrs, {
- dominantBaseline: "central",
- className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()("recharts-radial-bar-label", className)
- }), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("defs", null, __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("path", {
- id: id,
- d: path
- })), __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement("textPath", {
- xlinkHref: "#" + id
- }, label));
- }, getAttrsOfPolarLabel = function(props) {
- var viewBox = props.viewBox, offset = props.offset, position = props.position, cx = viewBox.cx, cy = viewBox.cy, innerRadius = viewBox.innerRadius, outerRadius = viewBox.outerRadius, startAngle = viewBox.startAngle, endAngle = viewBox.endAngle, midAngle = (startAngle + endAngle) / 2;
- if ("outside" === position) {
- var _polarToCartesian = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__.e)(cx, cy, outerRadius + offset, midAngle), _x = _polarToCartesian.x;
- return {
- x: _x,
- y: _polarToCartesian.y,
- textAnchor: _x >= cx ? "start" : "end",
- verticalAnchor: "middle"
- };
- }
- if ("center" === position) return {
- x: cx,
- y: cy,
- textAnchor: "middle",
- verticalAnchor: "middle"
- };
- var r = (innerRadius + outerRadius) / 2, _polarToCartesian2 = Object(__WEBPACK_IMPORTED_MODULE_9__util_PolarUtils__.e)(cx, cy, r, midAngle);
- return {
- x: _polarToCartesian2.x,
- y: _polarToCartesian2.y,
- textAnchor: "middle",
- verticalAnchor: "middle"
- };
- }, getAttrsOfCartesianLabel = function(props) {
- var viewBox = props.viewBox, offset = props.offset, position = props.position, x = viewBox.x, y = viewBox.y, width = viewBox.width, height = viewBox.height, sign = height >= 0 ? 1 : -1;
- return "top" === position ? {
- x: x + width / 2,
- y: y - sign * offset,
- textAnchor: "middle",
- verticalAnchor: "end"
- } : "bottom" === position ? {
- x: x + width / 2,
- y: y + height + sign * offset,
- textAnchor: "middle",
- verticalAnchor: "start"
- } : "left" === position ? {
- x: x - offset,
- y: y + height / 2,
- textAnchor: "end",
- verticalAnchor: "middle"
- } : "right" === position ? {
- x: x + width + offset,
- y: y + height / 2,
- textAnchor: "start",
- verticalAnchor: "middle"
- } : "insideLeft" === position ? {
- x: x + offset,
- y: y + height / 2,
- textAnchor: "start",
- verticalAnchor: "middle"
- } : "insideRight" === position ? {
- x: x + width - offset,
- y: y + height / 2,
- textAnchor: "end",
- verticalAnchor: "middle"
- } : "insideTop" === position ? {
- x: x + width / 2,
- y: y + sign * offset,
- textAnchor: "middle",
- verticalAnchor: "start"
- } : "insideBottom" === position ? {
- x: x + width / 2,
- y: y + height - sign * offset,
- textAnchor: "middle",
- verticalAnchor: "end"
- } : "insideTopLeft" === position ? {
- x: x + offset,
- y: y + sign * offset,
- textAnchor: "start",
- verticalAnchor: "start"
- } : "insideTopRight" === position ? {
- x: x + width - offset,
- y: y + sign * offset,
- textAnchor: "end",
- verticalAnchor: "start"
- } : "insideBottomLeft" === position ? {
- x: x + offset,
- y: y + height - sign * offset,
- textAnchor: "start",
- verticalAnchor: "end"
- } : "insideBottomRight" === position ? {
- x: x + width - offset,
- y: y + height - sign * offset,
- textAnchor: "end",
- verticalAnchor: "end"
- } : __WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default()(position) && (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(position.x) || Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.i)(position.x)) && (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(position.y) || Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.i)(position.y)) ? {
- x: x + Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.d)(position.x, width),
- y: y + Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.d)(position.y, height),
- textAnchor: "end",
- verticalAnchor: "end"
- } : {
- x: x + width / 2,
- y: y + height / 2,
- textAnchor: "middle",
- verticalAnchor: "middle"
- };
- }, isPolar = function(viewBox) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(viewBox.cx);
- };
- Label.displayName = "Label", Label.defaultProps = defaultProps, Label.propTypes = propTypes;
- var parseViewBox = function(props) {
- var cx = props.cx, cy = props.cy, angle = props.angle, startAngle = props.startAngle, endAngle = props.endAngle, r = props.r, radius = props.radius, innerRadius = props.innerRadius, outerRadius = props.outerRadius, x = props.x, y = props.y, top = props.top, left = props.left, width = props.width, height = props.height, clockWise = props.clockWise;
- if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(width) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(height)) {
- if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(x) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(y)) return {
- x: x,
- y: y,
- width: width,
- height: height
- };
- if (Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(top) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(left)) return {
- x: top,
- y: left,
- width: width,
- height: height
- };
- }
- return Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(x) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(y) ? {
- x: x,
- y: y,
- width: 0,
- height: 0
- } : Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(cx) && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(cy) ? {
- cx: cx,
- cy: cy,
- startAngle: startAngle || angle || 0,
- endAngle: endAngle || angle || 0,
- innerRadius: innerRadius || 0,
- outerRadius: outerRadius || radius || r || 0,
- clockWise: clockWise
- } : props.viewBox ? props.viewBox : {};
- }, parseLabel = function(label, viewBox) {
- return label ? !0 === label ? __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, {
- key: "label-implicit",
- viewBox: viewBox
- }) : Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.g)(label) ? __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, {
- key: "label-implicit",
- viewBox: viewBox,
- value: label
- }) : Object(__WEBPACK_IMPORTED_MODULE_3_react__.isValidElement)(label) || __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(label) ? __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, {
- key: "label-implicit",
- content: label,
- viewBox: viewBox
- }) : __WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default()(label) ? __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(Label, _extends({
- viewBox: viewBox
- }, label, {
- key: "label-implicit"
- })) : null : null;
- }, renderCallByParent = function(parentProps, viewBox) {
- var ckeckPropsLabel = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2];
- if (!parentProps || !parentProps.children && ckeckPropsLabel && !parentProps.label) return null;
- var children = parentProps.children, parentViewBox = parseViewBox(parentProps), explicitChilren = Object(__WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__.h)(children, Label).map(function(child, index) {
- return Object(__WEBPACK_IMPORTED_MODULE_3_react__.cloneElement)(child, {
- viewBox: viewBox || parentViewBox,
- key: "label-" + index
- });
- });
- return ckeckPropsLabel ? [ parseLabel(parentProps.label, viewBox || parentViewBox) ].concat(_toConsumableArray(explicitChilren)) : explicitChilren;
- };
- Label.parseViewBox = parseViewBox, Label.renderCallByParent = renderCallByParent,
- __webpack_exports__.a = Label;
-}, function(module, exports, __webpack_require__) {
- function isEqual(value, other) {
- return baseIsEqual(value, other);
- }
- var baseIsEqual = __webpack_require__(199);
- module.exports = isEqual;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var __WEBPACK_IMPORTED_MODULE_0__src_color__ = __webpack_require__(207);
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return __WEBPACK_IMPORTED_MODULE_0__src_color__.e;
- }), __webpack_require__.d(__webpack_exports__, "f", function() {
- return __WEBPACK_IMPORTED_MODULE_0__src_color__.g;
- }), __webpack_require__.d(__webpack_exports__, "d", function() {
- return __WEBPACK_IMPORTED_MODULE_0__src_color__.f;
- });
- var __WEBPACK_IMPORTED_MODULE_1__src_lab__ = __webpack_require__(871);
- __webpack_require__.d(__webpack_exports__, "e", function() {
- return __WEBPACK_IMPORTED_MODULE_1__src_lab__.a;
- }), __webpack_require__.d(__webpack_exports__, "c", function() {
- return __WEBPACK_IMPORTED_MODULE_1__src_lab__.b;
- });
- var __WEBPACK_IMPORTED_MODULE_2__src_cubehelix__ = __webpack_require__(872);
- __webpack_require__.d(__webpack_exports__, "b", function() {
- return __WEBPACK_IMPORTED_MODULE_2__src_cubehelix__.a;
- });
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _toConsumableArray(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
- return arr2;
- }
- return Array.from(arr);
- }
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- }
- function LabelList(props) {
- var data = props.data, valueAccessor = props.valueAccessor, dataKey = props.dataKey, clockWise = props.clockWise, id = props.id, others = _objectWithoutProperties(props, [ "data", "valueAccessor", "dataKey", "clockWise", "id" ]);
- return data && data.length ? __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__container_Layer__.a, {
- className: "recharts-label-list"
- }, data.map(function(entry, index) {
- var value = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(dataKey) ? valueAccessor(entry, index) : Object(__WEBPACK_IMPORTED_MODULE_10__util_ChartUtils__.w)(entry && entry.payload, dataKey), idProps = __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(id) ? {} : {
- id: id + "-" + index
- };
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7__Label__.a, _extends({}, Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__.k)(entry), others, idProps, {
- index: index,
- value: value,
- viewBox: __WEBPACK_IMPORTED_MODULE_7__Label__.a.parseViewBox(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(clockWise) ? entry : _extends({}, entry, {
- clockWise: clockWise
- })),
- key: "label-" + index
- }));
- })) : null;
- }
- var __WEBPACK_IMPORTED_MODULE_0_lodash_isObject__ = __webpack_require__(32), __WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isObject__), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(8), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__), __WEBPACK_IMPORTED_MODULE_2_lodash_isNil__ = __webpack_require__(20), __WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_isNil__), __WEBPACK_IMPORTED_MODULE_3_lodash_last__ = __webpack_require__(922), __WEBPACK_IMPORTED_MODULE_3_lodash_last___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_last__), __WEBPACK_IMPORTED_MODULE_4_lodash_isArray__ = __webpack_require__(13), __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isArray__), __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__), __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__), __WEBPACK_IMPORTED_MODULE_7__Label__ = __webpack_require__(44), __WEBPACK_IMPORTED_MODULE_8__container_Layer__ = __webpack_require__(14), __WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__ = __webpack_require__(4), __WEBPACK_IMPORTED_MODULE_10__util_ChartUtils__ = __webpack_require__(16), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, propTypes = {
- id: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- data: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object),
- valueAccessor: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- clockWise: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- dataKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func ])
- }, defaultProps = {
- valueAccessor: function(entry) {
- return __WEBPACK_IMPORTED_MODULE_4_lodash_isArray___default()(entry.value) ? __WEBPACK_IMPORTED_MODULE_3_lodash_last___default()(entry.value) : entry.value;
- }
- };
- LabelList.propTypes = propTypes, LabelList.displayName = "LabelList";
- var parseLabelList = function(label, data) {
- return label ? !0 === label ? __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(LabelList, {
- key: "labelList-implicit",
- data: data
- }) : __WEBPACK_IMPORTED_MODULE_5_react___default.a.isValidElement(label) || __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(label) ? __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(LabelList, {
- key: "labelList-implicit",
- data: data,
- content: label
- }) : __WEBPACK_IMPORTED_MODULE_0_lodash_isObject___default()(label) ? __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(LabelList, _extends({
- data: data
- }, label, {
- key: "labelList-implicit"
- })) : null : null;
- }, renderCallByParent = function(parentProps, data) {
- var ckeckPropsLabel = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2];
- if (!parentProps || !parentProps.children && ckeckPropsLabel && !parentProps.label) return null;
- var children = parentProps.children, explicitChilren = Object(__WEBPACK_IMPORTED_MODULE_9__util_ReactUtils__.h)(children, LabelList).map(function(child, index) {
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(child, {
- data: data,
- key: "labelList-" + index
- });
- });
- return ckeckPropsLabel ? [ parseLabelList(parentProps.label, data) ].concat(_toConsumableArray(explicitChilren)) : explicitChilren;
- };
- LabelList.renderCallByParent = renderCallByParent, LabelList.defaultProps = defaultProps,
- __webpack_exports__.a = LabelList;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- }
- function _defineProperty(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value: value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- function _toConsumableArray(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
- return arr2;
- }
- return Array.from(arr);
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var __WEBPACK_IMPORTED_MODULE_0_lodash_sortBy__ = __webpack_require__(321), __WEBPACK_IMPORTED_MODULE_0_lodash_sortBy___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_sortBy__), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(8), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__), __WEBPACK_IMPORTED_MODULE_2_lodash_range__ = __webpack_require__(373), __WEBPACK_IMPORTED_MODULE_2_lodash_range___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash_range__), __WEBPACK_IMPORTED_MODULE_3_lodash_throttle__ = __webpack_require__(933), __WEBPACK_IMPORTED_MODULE_3_lodash_throttle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_throttle__), __WEBPACK_IMPORTED_MODULE_4_lodash_isNil__ = __webpack_require__(20), __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_lodash_isNil__), __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__), __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__), __WEBPACK_IMPORTED_MODULE_7_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_7_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_classnames__), __WEBPACK_IMPORTED_MODULE_8__container_Surface__ = __webpack_require__(82), __WEBPACK_IMPORTED_MODULE_9__container_Layer__ = __webpack_require__(14), __WEBPACK_IMPORTED_MODULE_10__component_Tooltip__ = __webpack_require__(125), __WEBPACK_IMPORTED_MODULE_11__component_Legend__ = __webpack_require__(180), __WEBPACK_IMPORTED_MODULE_12__shape_Curve__ = __webpack_require__(71), __WEBPACK_IMPORTED_MODULE_13__shape_Cross__ = __webpack_require__(367), __WEBPACK_IMPORTED_MODULE_14__shape_Sector__ = __webpack_require__(139), __WEBPACK_IMPORTED_MODULE_15__shape_Dot__ = __webpack_require__(63), __WEBPACK_IMPORTED_MODULE_16__shape_Rectangle__ = __webpack_require__(70), __WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__ = __webpack_require__(4), __WEBPACK_IMPORTED_MODULE_18__cartesian_CartesianAxis__ = __webpack_require__(374), __WEBPACK_IMPORTED_MODULE_19__cartesian_Brush__ = __webpack_require__(372), __WEBPACK_IMPORTED_MODULE_20__util_DOMUtils__ = __webpack_require__(198), __WEBPACK_IMPORTED_MODULE_21__util_DataUtils__ = __webpack_require__(9), __WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__ = __webpack_require__(16), __WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__ = __webpack_require__(23), __WEBPACK_IMPORTED_MODULE_24__util_PureRender__ = __webpack_require__(5), __WEBPACK_IMPORTED_MODULE_25__util_Events__ = __webpack_require__(934), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), ORIENT_MAP = {
- xAxis: [ "bottom", "top" ],
- yAxis: [ "left", "right" ]
- }, originCoordinate = {
- x: 0,
- y: 0
- }, generateCategoricalChart = function(_ref) {
- var _class, _temp, _initialiseProps, chartName = _ref.chartName, GraphicalChild = _ref.GraphicalChild, _ref$eventType = _ref.eventType, eventType = void 0 === _ref$eventType ? "axis" : _ref$eventType, axisComponents = _ref.axisComponents, legendContent = _ref.legendContent, formatAxisMap = _ref.formatAxisMap, defaultProps = _ref.defaultProps, propTypes = _ref.propTypes;
- return _temp = _class = function(_Component) {
- function CategoricalChartWrapper(props) {
- _classCallCheck(this, CategoricalChartWrapper);
- var _this = _possibleConstructorReturn(this, (CategoricalChartWrapper.__proto__ || Object.getPrototypeOf(CategoricalChartWrapper)).call(this, props));
- _initialiseProps.call(_this);
- var defaultState = _this.constructor.createDefaultState(props);
- return _this.state = _extends({}, defaultState, {
- updateId: 0
- }, _this.updateStateOfAxisMapsOffsetAndStackGroups(_extends({
- props: props
- }, defaultState, {
- updateId: 0
- }))), _this.uniqueChartId = __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(props.id) ? Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.k)("recharts") : props.id,
- props.throttleDelay && (_this.triggeredAfterMouseMove = __WEBPACK_IMPORTED_MODULE_3_lodash_throttle___default()(_this.triggeredAfterMouseMove, props.throttleDelay)),
- _this;
- }
- return _inherits(CategoricalChartWrapper, _Component), _createClass(CategoricalChartWrapper, [ {
- key: "componentDidMount",
- value: function() {
- __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(this.props.syncId) || this.addListener();
- }
- }, {
- key: "componentWillReceiveProps",
- value: function(nextProps) {
- var _props = this.props, data = _props.data, children = _props.children, width = _props.width, height = _props.height, layout = _props.layout, stackOffset = _props.stackOffset, margin = _props.margin, updateId = this.state.updateId;
- if (nextProps.data === data && nextProps.width === width && nextProps.height === height && nextProps.layout === layout && nextProps.stackOffset === stackOffset && Object(__WEBPACK_IMPORTED_MODULE_24__util_PureRender__.b)(nextProps.margin, margin)) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.m)(nextProps.children, children)) {
- var hasGlobalData = !__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(nextProps.data), newUpdateId = hasGlobalData ? updateId : updateId + 1, _state = this.state, dataStartIndex = _state.dataStartIndex, dataEndIndex = _state.dataEndIndex, _defaultState = _extends({}, this.constructor.createDefaultState(nextProps), {
- dataEndIndex: dataEndIndex,
- dataStartIndex: dataStartIndex
- });
- this.setState(_extends({}, _defaultState, {
- updateId: newUpdateId
- }, this.updateStateOfAxisMapsOffsetAndStackGroups(_extends({
- props: nextProps
- }, _defaultState, {
- updateId: newUpdateId
- }))));
- }
- } else {
- var defaultState = this.constructor.createDefaultState(nextProps);
- this.setState(_extends({}, defaultState, {
- updateId: updateId + 1
- }, this.updateStateOfAxisMapsOffsetAndStackGroups(_extends({
- props: nextProps
- }, defaultState, {
- updateId: updateId + 1
- }))));
- }
- __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(this.props.syncId) && !__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(nextProps.syncId) && this.addListener(),
- !__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(this.props.syncId) && __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(nextProps.syncId) && this.removeListener();
- }
- }, {
- key: "componentWillUnmount",
- value: function() {
- __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(this.props.syncId) || this.removeListener(),
- "function" == typeof this.triggeredAfterMouseMove.cancel && this.triggeredAfterMouseMove.cancel();
- }
- }, {
- key: "getAxisMap",
- value: function(props, _ref2) {
- var _ref2$axisType = _ref2.axisType, axisType = void 0 === _ref2$axisType ? "xAxis" : _ref2$axisType, AxisComp = _ref2.AxisComp, graphicalItems = _ref2.graphicalItems, stackGroups = _ref2.stackGroups, dataStartIndex = _ref2.dataStartIndex, dataEndIndex = _ref2.dataEndIndex, children = props.children, axisIdKey = axisType + "Id", axes = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.h)(children, AxisComp), axisMap = {};
- return axes && axes.length ? axisMap = this.getAxisMapByAxes(props, {
- axes: axes,
- graphicalItems: graphicalItems,
- axisType: axisType,
- axisIdKey: axisIdKey,
- stackGroups: stackGroups,
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex
- }) : graphicalItems && graphicalItems.length && (axisMap = this.getAxisMapByItems(props, {
- Axis: AxisComp,
- graphicalItems: graphicalItems,
- axisType: axisType,
- axisIdKey: axisIdKey,
- stackGroups: stackGroups,
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex
- })), axisMap;
- }
- }, {
- key: "getAxisMapByAxes",
- value: function(props, _ref3) {
- var _this2 = this, axes = _ref3.axes, graphicalItems = _ref3.graphicalItems, axisType = _ref3.axisType, axisIdKey = _ref3.axisIdKey, stackGroups = _ref3.stackGroups, dataStartIndex = _ref3.dataStartIndex, dataEndIndex = _ref3.dataEndIndex, layout = props.layout, children = props.children, stackOffset = props.stackOffset, isCategorial = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.x)(layout, axisType);
- return axes.reduce(function(result, child) {
- var _child$props = child.props, type = _child$props.type, dataKey = _child$props.dataKey, allowDataOverflow = _child$props.allowDataOverflow, allowDuplicatedCategory = _child$props.allowDuplicatedCategory, scale = _child$props.scale, ticks = _child$props.ticks, axisId = child.props[axisIdKey], displayedData = _this2.constructor.getDisplayedData(props, {
- graphicalItems: graphicalItems.filter(function(item) {
- return item.props[axisIdKey] === axisId;
- }),
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex
- }), len = displayedData.length;
- if (!result[axisId]) {
- var domain = void 0, duplicateDomain = void 0, categoricalDomain = void 0;
- if (dataKey) {
- if (domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.n)(displayedData, dataKey, type),
- "category" === type && isCategorial) {
- var duplicate = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.e)(domain);
- allowDuplicatedCategory && duplicate ? (duplicateDomain = domain, domain = __WEBPACK_IMPORTED_MODULE_2_lodash_range___default()(0, len)) : allowDuplicatedCategory || (domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.y)(child.props.domain, domain, child).reduce(function(finalDomain, entry) {
- return finalDomain.indexOf(entry) >= 0 ? finalDomain : [].concat(_toConsumableArray(finalDomain), [ entry ]);
- }, []));
- } else if ("category" === type) domain = allowDuplicatedCategory ? domain.filter(function(entry) {
- return "" !== entry && !__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(entry);
- }) : Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.y)(child.props.domain, domain, child).reduce(function(finalDomain, entry) {
- return finalDomain.indexOf(entry) >= 0 || "" === entry || __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(entry) ? finalDomain : [].concat(_toConsumableArray(finalDomain), [ entry ]);
- }, []); else if ("number" === type) {
- var errorBarsDomain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.z)(displayedData, graphicalItems.filter(function(item) {
- return item.props[axisIdKey] === axisId && !item.props.hide;
- }), dataKey, axisType);
- errorBarsDomain && (domain = errorBarsDomain);
- }
- !isCategorial || "number" !== type && "auto" === scale || (categoricalDomain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.n)(displayedData, dataKey, "category"));
- } else domain = isCategorial ? __WEBPACK_IMPORTED_MODULE_2_lodash_range___default()(0, len) : stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack && "number" === type ? "expand" === stackOffset ? [ 0, 1 ] : Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.p)(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex) : Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.o)(displayedData, graphicalItems.filter(function(item) {
- return item.props[axisIdKey] === axisId && !item.props.hide;
- }), type, !0);
- return "number" === type && (domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.e)(children, domain, axisId, axisType, ticks),
- child.props.domain && (domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.B)(child.props.domain, domain, allowDataOverflow))),
- _extends({}, result, _defineProperty({}, axisId, _extends({}, child.props, {
- axisType: axisType,
- domain: domain,
- categoricalDomain: categoricalDomain,
- duplicateDomain: duplicateDomain,
- originalDomain: child.props.domain,
- isCategorial: isCategorial,
- layout: layout
- })));
- }
- return result;
- }, {});
- }
- }, {
- key: "getAxisMapByItems",
- value: function(props, _ref4) {
- var graphicalItems = _ref4.graphicalItems, Axis = _ref4.Axis, axisType = _ref4.axisType, axisIdKey = _ref4.axisIdKey, stackGroups = _ref4.stackGroups, dataStartIndex = _ref4.dataStartIndex, dataEndIndex = _ref4.dataEndIndex, layout = props.layout, children = props.children, displayedData = this.constructor.getDisplayedData(props, {
- graphicalItems: graphicalItems,
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex
- }), len = displayedData.length, isCategorial = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.x)(layout, axisType), index = -1;
- return graphicalItems.reduce(function(result, child) {
- var axisId = child.props[axisIdKey];
- if (!result[axisId]) {
- index++;
- var domain = void 0;
- return isCategorial ? domain = __WEBPACK_IMPORTED_MODULE_2_lodash_range___default()(0, len) : stackGroups && stackGroups[axisId] && stackGroups[axisId].hasStack ? (domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.p)(stackGroups[axisId].stackGroups, dataStartIndex, dataEndIndex),
- domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.e)(children, domain, axisId, axisType)) : (domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.B)(Axis.defaultProps.domain, Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.o)(displayedData, graphicalItems.filter(function(item) {
- return item.props[axisIdKey] === axisId && !item.props.hide;
- }), "number"), Axis.defaultProps.allowDataOverflow), domain = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.e)(children, domain, axisId, axisType)),
- _extends({}, result, _defineProperty({}, axisId, _extends({
- axisType: axisType
- }, Axis.defaultProps, {
- hide: !0,
- orientation: ORIENT_MAP[axisType] && ORIENT_MAP[axisType][index % 2],
- domain: domain,
- originalDomain: Axis.defaultProps.domain,
- isCategorial: isCategorial,
- layout: layout
- })));
- }
- return result;
- }, {});
- }
- }, {
- key: "getActiveCoordinate",
- value: function(tooltipTicks, activeIndex, rangeObj) {
- var layout = this.props.layout, entry = tooltipTicks.find(function(tick) {
- return tick && tick.index === activeIndex;
- });
- if (entry) {
- if ("horizontal" === layout) return {
- x: entry.coordinate,
- y: rangeObj.y
- };
- if ("vertical" === layout) return {
- x: rangeObj.x,
- y: entry.coordinate
- };
- if ("centric" === layout) {
- var _angle = entry.coordinate, _radius = rangeObj.radius;
- return _extends({}, rangeObj, Object(__WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__.e)(rangeObj.cx, rangeObj.cy, _radius, _angle), {
- angle: _angle,
- radius: _radius
- });
- }
- var radius = entry.coordinate, angle = rangeObj.angle;
- return _extends({}, rangeObj, Object(__WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__.e)(rangeObj.cx, rangeObj.cy, radius, angle), {
- angle: angle,
- radius: radius
- });
- }
- return originCoordinate;
- }
- }, {
- key: "getMouseInfo",
- value: function(event) {
- if (!this.container) return null;
- var containerOffset = Object(__WEBPACK_IMPORTED_MODULE_20__util_DOMUtils__.b)(this.container), e = Object(__WEBPACK_IMPORTED_MODULE_20__util_DOMUtils__.a)(event, containerOffset), rangeObj = this.inRange(e.chartX, e.chartY);
- if (!rangeObj) return null;
- var _state2 = this.state, xAxisMap = _state2.xAxisMap, yAxisMap = _state2.yAxisMap;
- if ("axis" !== eventType && xAxisMap && yAxisMap) {
- var xScale = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(xAxisMap).scale, yScale = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(yAxisMap).scale, xValue = xScale && xScale.invert ? xScale.invert(e.chartX) : null, yValue = yScale && yScale.invert ? yScale.invert(e.chartY) : null;
- return _extends({}, e, {
- xValue: xValue,
- yValue: yValue
- });
- }
- var _state3 = this.state, ticks = _state3.orderedTooltipTicks, axis = _state3.tooltipAxis, tooltipTicks = _state3.tooltipTicks, pos = this.calculateTooltipPos(rangeObj), activeIndex = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.b)(pos, ticks, tooltipTicks, axis);
- if (activeIndex >= 0 && tooltipTicks) {
- var activeLabel = tooltipTicks[activeIndex] && tooltipTicks[activeIndex].value, activePayload = this.getTooltipContent(activeIndex, activeLabel), activeCoordinate = this.getActiveCoordinate(ticks, activeIndex, rangeObj);
- return _extends({}, e, {
- activeTooltipIndex: activeIndex,
- activeLabel: activeLabel,
- activePayload: activePayload,
- activeCoordinate: activeCoordinate
- });
- }
- return null;
- }
- }, {
- key: "getTooltipContent",
- value: function(activeIndex, activeLabel) {
- var _state4 = this.state, graphicalItems = _state4.graphicalItems, tooltipAxis = _state4.tooltipAxis, displayedData = this.constructor.getDisplayedData(this.props, this.state);
- return activeIndex < 0 || !graphicalItems || !graphicalItems.length || activeIndex >= displayedData.length ? null : graphicalItems.reduce(function(result, child) {
- if (child.props.hide) return result;
- var _child$props2 = child.props, dataKey = _child$props2.dataKey, name = _child$props2.name, unit = _child$props2.unit, formatter = _child$props2.formatter, data = _child$props2.data, payload = void 0;
- return payload = tooltipAxis.dataKey && !tooltipAxis.allowDuplicatedCategory ? Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.a)(data || displayedData, tooltipAxis.dataKey, activeLabel) : displayedData[activeIndex],
- payload ? [].concat(_toConsumableArray(result), [ _extends({}, Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.k)(child), {
- dataKey: dataKey,
- unit: unit,
- formatter: formatter,
- name: name || dataKey,
- color: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.r)(child),
- value: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.w)(payload, dataKey),
- payload: payload
- }) ]) : result;
- }, []);
- }
- }, {
- key: "getFormatItems",
- value: function(props, currentState) {
- var _this3 = this, graphicalItems = currentState.graphicalItems, stackGroups = currentState.stackGroups, offset = currentState.offset, updateId = currentState.updateId, dataStartIndex = currentState.dataStartIndex, dataEndIndex = currentState.dataEndIndex, barSize = props.barSize, layout = props.layout, barGap = props.barGap, barCategoryGap = props.barCategoryGap, globalMaxBarSize = props.maxBarSize, _getAxisNameByLayout = this.getAxisNameByLayout(layout), numericAxisName = _getAxisNameByLayout.numericAxisName, cateAxisName = _getAxisNameByLayout.cateAxisName, hasBar = this.constructor.hasBar(graphicalItems), sizeList = hasBar && Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.i)({
- barSize: barSize,
- stackGroups: stackGroups
- }), formatedItems = [];
- return graphicalItems.forEach(function(item, index) {
- var displayedData = _this3.constructor.getDisplayedData(props, {
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex
- }, item), _item$props = item.props, dataKey = _item$props.dataKey, childMaxBarSize = _item$props.maxBarSize, numericAxisId = item.props[numericAxisName + "Id"], cateAxisId = item.props[cateAxisName + "Id"], axisObj = axisComponents.reduce(function(result, entry) {
- var _extends4, axisMap = currentState[entry.axisType + "Map"], id = item.props[entry.axisType + "Id"], axis = axisMap && axisMap[id];
- return _extends({}, result, (_extends4 = {}, _defineProperty(_extends4, entry.axisType, axis),
- _defineProperty(_extends4, entry.axisType + "Ticks", Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(axis)),
- _extends4));
- }, {}), cateAxis = axisObj[cateAxisName], cateTicks = axisObj[cateAxisName + "Ticks"], stackedData = stackGroups && stackGroups[numericAxisId] && stackGroups[numericAxisId].hasStack && Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.t)(item, stackGroups[numericAxisId].stackGroups), bandSize = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.g)(cateAxis, cateTicks), maxBarSize = __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(childMaxBarSize) ? globalMaxBarSize : childMaxBarSize, barPosition = hasBar && Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.h)({
- barGap: barGap,
- barCategoryGap: barCategoryGap,
- bandSize: bandSize,
- sizeList: sizeList[cateAxisId],
- maxBarSize: maxBarSize
- }), componsedFn = item && item.type && item.type.getComposedData;
- if (componsedFn) {
- var _extends5;
- formatedItems.push({
- props: _extends({}, componsedFn(_extends({}, axisObj, {
- displayedData: displayedData,
- props: props,
- dataKey: dataKey,
- item: item,
- bandSize: bandSize,
- barPosition: barPosition,
- offset: offset,
- stackedData: stackedData,
- layout: layout,
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex,
- onItemMouseLeave: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.d)(_this3.handleItemMouseLeave, null, item.props.onMouseLeave),
- onItemMouseEnter: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.d)(_this3.handleItemMouseEnter, null, item.props.onMouseEnter)
- })), (_extends5 = {
- key: item.key || "item-" + index
- }, _defineProperty(_extends5, numericAxisName, axisObj[numericAxisName]), _defineProperty(_extends5, cateAxisName, axisObj[cateAxisName]),
- _defineProperty(_extends5, "animationId", updateId), _extends5)),
- childIndex: Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.o)(item, props.children),
- item: item
- });
- }
- }), formatedItems;
- }
- }, {
- key: "getCursorRectangle",
- value: function() {
- var layout = this.props.layout, _state5 = this.state, activeCoordinate = _state5.activeCoordinate, offset = _state5.offset, tooltipAxisBandSize = _state5.tooltipAxisBandSize, halfSize = tooltipAxisBandSize / 2;
- return {
- stroke: "none",
- fill: "#ccc",
- x: "horizontal" === layout ? activeCoordinate.x - halfSize : offset.left + .5,
- y: "horizontal" === layout ? offset.top + .5 : activeCoordinate.y - halfSize,
- width: "horizontal" === layout ? tooltipAxisBandSize : offset.width - 1,
- height: "horizontal" === layout ? offset.height - 1 : tooltipAxisBandSize
- };
- }
- }, {
- key: "getCursorPoints",
- value: function() {
- var layout = this.props.layout, _state6 = this.state, activeCoordinate = _state6.activeCoordinate, offset = _state6.offset, x1 = void 0, y1 = void 0, x2 = void 0, y2 = void 0;
- if ("horizontal" === layout) x1 = activeCoordinate.x, x2 = x1, y1 = offset.top,
- y2 = offset.top + offset.height; else if ("vertical" === layout) y1 = activeCoordinate.y,
- y2 = y1, x1 = offset.left, x2 = offset.left + offset.width; else if (!__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(activeCoordinate.cx) || !__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(activeCoordinate.cy)) {
- if ("centric" !== layout) {
- var _cx = activeCoordinate.cx, _cy = activeCoordinate.cy, radius = activeCoordinate.radius, startAngle = activeCoordinate.startAngle, endAngle = activeCoordinate.endAngle, startPoint = Object(__WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__.e)(_cx, _cy, radius, startAngle), endPoint = Object(__WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__.e)(_cx, _cy, radius, endAngle);
- return {
- points: [ startPoint, endPoint ],
- cx: _cx,
- cy: _cy,
- radius: radius,
- startAngle: startAngle,
- endAngle: endAngle
- };
- }
- var cx = activeCoordinate.cx, cy = activeCoordinate.cy, innerRadius = activeCoordinate.innerRadius, outerRadius = activeCoordinate.outerRadius, angle = activeCoordinate.angle, innerPoint = Object(__WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__.e)(cx, cy, innerRadius, angle), outerPoint = Object(__WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__.e)(cx, cy, outerRadius, angle);
- x1 = innerPoint.x, y1 = innerPoint.y, x2 = outerPoint.x, y2 = outerPoint.y;
- }
- return [ {
- x: x1,
- y: y1
- }, {
- x: x2,
- y: y2
- } ];
- }
- }, {
- key: "getAxisNameByLayout",
- value: function(layout) {
- return "horizontal" === layout ? {
- numericAxisName: "yAxis",
- cateAxisName: "xAxis"
- } : "vertical" === layout ? {
- numericAxisName: "xAxis",
- cateAxisName: "yAxis"
- } : "centric" === layout ? {
- numericAxisName: "radiusAxis",
- cateAxisName: "angleAxis"
- } : {
- numericAxisName: "angleAxis",
- cateAxisName: "radiusAxis"
- };
- }
- }, {
- key: "calculateTooltipPos",
- value: function(rangeObj) {
- var layout = this.props.layout;
- return "horizontal" === layout ? rangeObj.x : "vertical" === layout ? rangeObj.y : "centric" === layout ? rangeObj.angle : rangeObj.radius;
- }
- }, {
- key: "inRange",
- value: function(x, y) {
- var layout = this.props.layout;
- if ("horizontal" === layout || "vertical" === layout) {
- var offset = this.state.offset;
- return x >= offset.left && x <= offset.left + offset.width && y >= offset.top && y <= offset.top + offset.height ? {
- x: x,
- y: y
- } : null;
- }
- var _state7 = this.state, angleAxisMap = _state7.angleAxisMap, radiusAxisMap = _state7.radiusAxisMap;
- if (angleAxisMap && radiusAxisMap) {
- var angleAxis = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(angleAxisMap);
- return Object(__WEBPACK_IMPORTED_MODULE_23__util_PolarUtils__.d)({
- x: x,
- y: y
- }, angleAxis);
- }
- return null;
- }
- }, {
- key: "parseEventsOfWrapper",
- value: function() {
- var children = this.props.children, tooltipItem = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.i)(children, __WEBPACK_IMPORTED_MODULE_10__component_Tooltip__.a), tooltipEvents = tooltipItem && "axis" === eventType ? {
- onMouseEnter: this.handleMouseEnter,
- onMouseMove: this.handleMouseMove,
- onMouseLeave: this.handleMouseLeave,
- onTouchMove: this.handleTouchMove
- } : {}, outerEvents = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.e)(this.props, this.handleOuterEvent);
- return _extends({}, outerEvents, tooltipEvents);
- }
- }, {
- key: "updateStateOfAxisMapsOffsetAndStackGroups",
- value: function(_ref5) {
- var _this4 = this, props = _ref5.props, dataStartIndex = _ref5.dataStartIndex, dataEndIndex = _ref5.dataEndIndex, updateId = _ref5.updateId;
- if (!Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.q)({
- props: props
- })) return null;
- var children = props.children, layout = props.layout, stackOffset = props.stackOffset, data = props.data, reverseStackOrder = props.reverseStackOrder, _getAxisNameByLayout2 = this.getAxisNameByLayout(layout), numericAxisName = _getAxisNameByLayout2.numericAxisName, cateAxisName = _getAxisNameByLayout2.cateAxisName, graphicalItems = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.h)(children, GraphicalChild), stackGroups = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.s)(data, graphicalItems, numericAxisName + "Id", cateAxisName + "Id", stackOffset, reverseStackOrder), axisObj = axisComponents.reduce(function(result, entry) {
- var name = entry.axisType + "Map";
- return _extends({}, result, _defineProperty({}, name, _this4.getAxisMap(props, _extends({}, entry, {
- graphicalItems: graphicalItems,
- stackGroups: entry.axisType === numericAxisName && stackGroups,
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex
- }))));
- }, {}), offset = this.calculateOffset(_extends({}, axisObj, {
- props: props,
- graphicalItems: graphicalItems
- }));
- Object.keys(axisObj).forEach(function(key) {
- axisObj[key] = formatAxisMap(props, axisObj[key], offset, key.replace("Map", ""), chartName);
- });
- var cateAxisMap = axisObj[cateAxisName + "Map"], ticksObj = this.tooltipTicksGenerator(cateAxisMap), formatedGraphicalItems = this.getFormatItems(props, _extends({}, axisObj, {
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex,
- updateId: updateId,
- graphicalItems: graphicalItems,
- stackGroups: stackGroups,
- offset: offset
- }));
- return _extends({
- formatedGraphicalItems: formatedGraphicalItems,
- graphicalItems: graphicalItems,
- offset: offset,
- stackGroups: stackGroups
- }, ticksObj, axisObj);
- }
- }, {
- key: "addListener",
- value: function() {
- __WEBPACK_IMPORTED_MODULE_25__util_Events__.b.on(__WEBPACK_IMPORTED_MODULE_25__util_Events__.a, this.handleReceiveSyncEvent),
- __WEBPACK_IMPORTED_MODULE_25__util_Events__.b.setMaxListeners && __WEBPACK_IMPORTED_MODULE_25__util_Events__.b._maxListeners && __WEBPACK_IMPORTED_MODULE_25__util_Events__.b.setMaxListeners(__WEBPACK_IMPORTED_MODULE_25__util_Events__.b._maxListeners + 1);
- }
- }, {
- key: "removeListener",
- value: function() {
- __WEBPACK_IMPORTED_MODULE_25__util_Events__.b.removeListener(__WEBPACK_IMPORTED_MODULE_25__util_Events__.a, this.handleReceiveSyncEvent),
- __WEBPACK_IMPORTED_MODULE_25__util_Events__.b.setMaxListeners && __WEBPACK_IMPORTED_MODULE_25__util_Events__.b._maxListeners && __WEBPACK_IMPORTED_MODULE_25__util_Events__.b.setMaxListeners(__WEBPACK_IMPORTED_MODULE_25__util_Events__.b._maxListeners - 1);
- }
- }, {
- key: "calculateOffset",
- value: function(_ref6) {
- var props = _ref6.props, graphicalItems = _ref6.graphicalItems, _ref6$xAxisMap = _ref6.xAxisMap, xAxisMap = void 0 === _ref6$xAxisMap ? {} : _ref6$xAxisMap, _ref6$yAxisMap = _ref6.yAxisMap, yAxisMap = void 0 === _ref6$yAxisMap ? {} : _ref6$yAxisMap, width = props.width, height = props.height, children = props.children, margin = props.margin || {}, brushItem = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.i)(children, __WEBPACK_IMPORTED_MODULE_19__cartesian_Brush__.a), legendItem = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.i)(children, __WEBPACK_IMPORTED_MODULE_11__component_Legend__.a), offsetH = Object.keys(yAxisMap).reduce(function(result, id) {
- var entry = yAxisMap[id], orientation = entry.orientation;
- return entry.mirror || entry.hide ? result : _extends({}, result, _defineProperty({}, orientation, result[orientation] + entry.width));
- }, {
- left: margin.left || 0,
- right: margin.right || 0
- }), offsetV = Object.keys(xAxisMap).reduce(function(result, id) {
- var entry = xAxisMap[id], orientation = entry.orientation;
- return entry.mirror || entry.hide ? result : _extends({}, result, _defineProperty({}, orientation, result[orientation] + entry.height));
- }, {
- top: margin.top || 0,
- bottom: margin.bottom || 0
- }), offset = _extends({}, offsetV, offsetH), brushBottom = offset.bottom;
- if (brushItem && (offset.bottom += brushItem.props.height || __WEBPACK_IMPORTED_MODULE_19__cartesian_Brush__.a.defaultProps.height),
- legendItem && this.legendInstance) {
- var legendBox = this.legendInstance.getBBox();
- offset = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.a)(offset, graphicalItems, props, legendBox);
- }
- return _extends({
- brushBottom: brushBottom
- }, offset, {
- width: width - offset.left - offset.right,
- height: height - offset.top - offset.bottom
- });
- }
- }, {
- key: "triggerSyncEvent",
- value: function(data) {
- var syncId = this.props.syncId;
- __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(syncId) || __WEBPACK_IMPORTED_MODULE_25__util_Events__.b.emit(__WEBPACK_IMPORTED_MODULE_25__util_Events__.a, syncId, this.uniqueChartId, data);
- }
- }, {
- key: "filterFormatItem",
- value: function(item, displayName, childIndex) {
- for (var formatedGraphicalItems = this.state.formatedGraphicalItems, i = 0, len = formatedGraphicalItems.length; i < len; i++) {
- var entry = formatedGraphicalItems[i];
- if (entry.item === item || entry.props.key === item.key || displayName === Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.j)(entry.item.type) && childIndex === entry.childIndex) return entry;
- }
- return null;
- }
- }, {
- key: "renderAxis",
- value: function(axisOptions, element, displayName, index) {
- var _props2 = this.props, width = _props2.width, height = _props2.height;
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_18__cartesian_CartesianAxis__.a, _extends({}, axisOptions, {
- className: "recharts-" + axisOptions.axisType + " " + axisOptions.axisType,
- key: element.key || displayName + "-" + index,
- viewBox: {
- x: 0,
- y: 0,
- width: width,
- height: height
- },
- ticksGenerator: this.axesTicksGenerator
- }));
- }
- }, {
- key: "renderLegend",
- value: function() {
- var _this5 = this, formatedGraphicalItems = this.state.formatedGraphicalItems, _props3 = this.props, children = _props3.children, width = _props3.width, height = _props3.height, margin = this.props.margin || {}, legendWidth = width - (margin.left || 0) - (margin.right || 0), legendHeight = height - (margin.top || 0) - (margin.bottom || 0), props = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.q)({
- children: children,
- formatedGraphicalItems: formatedGraphicalItems,
- legendWidth: legendWidth,
- legendHeight: legendHeight,
- legendContent: legendContent
- });
- if (!props) return null;
- var item = props.item, otherProps = _objectWithoutProperties(props, [ "item" ]);
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(item, _extends({}, otherProps, {
- chartWidth: width,
- chartHeight: height,
- margin: margin,
- ref: function(legend) {
- _this5.legendInstance = legend;
- },
- onBBoxUpdate: this.handleLegendBBoxUpdate
- }));
- }
- }, {
- key: "renderTooltip",
- value: function() {
- var children = this.props.children, tooltipItem = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.i)(children, __WEBPACK_IMPORTED_MODULE_10__component_Tooltip__.a);
- if (!tooltipItem) return null;
- var _state8 = this.state, isTooltipActive = _state8.isTooltipActive, activeCoordinate = _state8.activeCoordinate, activePayload = _state8.activePayload, activeLabel = _state8.activeLabel, offset = _state8.offset;
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(tooltipItem, {
- viewBox: _extends({}, offset, {
- x: offset.left,
- y: offset.top
- }),
- active: isTooltipActive,
- label: activeLabel,
- payload: isTooltipActive ? activePayload : [],
- coordinate: activeCoordinate
- });
- }
- }, {
- key: "renderActiveDot",
- value: function(option, props) {
- var dot = void 0;
- return dot = Object(__WEBPACK_IMPORTED_MODULE_5_react__.isValidElement)(option) ? Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(option, props) : __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(option) ? option(props) : __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__shape_Dot__.a, props),
- __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9__container_Layer__.a, {
- className: "recharts-active-dot",
- key: props.key
- }, dot);
- }
- }, {
- key: "renderActivePoints",
- value: function(_ref7) {
- var item = _ref7.item, activePoint = _ref7.activePoint, basePoint = _ref7.basePoint, childIndex = _ref7.childIndex, isRange = _ref7.isRange, result = [], key = item.props.key, _item$item$props = item.item.props, activeDot = _item$item$props.activeDot, dataKey = _item$item$props.dataKey, dotProps = _extends({
- index: childIndex,
- dataKey: dataKey,
- cx: activePoint.x,
- cy: activePoint.y,
- r: 4,
- fill: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.r)(item.item),
- strokeWidth: 2,
- stroke: "#fff",
- payload: activePoint.payload,
- value: activePoint.value,
- key: key + "-activePoint-" + childIndex
- }, Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.k)(activeDot), Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.e)(activeDot));
- return result.push(this.renderActiveDot(activeDot, dotProps, childIndex)), basePoint ? result.push(this.renderActiveDot(activeDot, _extends({}, dotProps, {
- cx: basePoint.x,
- cy: basePoint.y,
- key: key + "-basePoint-" + childIndex
- }), childIndex)) : isRange && result.push(null), result;
- }
- }, {
- key: "render",
- value: function() {
- var _this6 = this;
- if (!Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.q)(this)) return null;
- var _props4 = this.props, children = _props4.children, className = _props4.className, width = _props4.width, height = _props4.height, style = _props4.style, compact = _props4.compact, others = _objectWithoutProperties(_props4, [ "children", "className", "width", "height", "style", "compact" ]), attrs = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.k)(others), map = {
- CartesianGrid: {
- handler: this.renderGrid,
- once: !0
- },
- ReferenceArea: {
- handler: this.renderReferenceElement
- },
- ReferenceLine: {
- handler: this.renderReferenceElement
- },
- ReferenceDot: {
- handler: this.renderReferenceElement
- },
- XAxis: {
- handler: this.renderXAxis
- },
- YAxis: {
- handler: this.renderYAxis
- },
- Brush: {
- handler: this.renderBrush,
- once: !0
- },
- Bar: {
- handler: this.renderGraphicChild
- },
- Line: {
- handler: this.renderGraphicChild
- },
- Area: {
- handler: this.renderGraphicChild
- },
- Radar: {
- handler: this.renderGraphicChild
- },
- RadialBar: {
- handler: this.renderGraphicChild
- },
- Scatter: {
- handler: this.renderGraphicChild
- },
- Pie: {
- handler: this.renderGraphicChild
- },
- Tooltip: {
- handler: this.renderCursor,
- once: !0
- },
- PolarGrid: {
- handler: this.renderPolarGrid,
- once: !0
- },
- PolarAngleAxis: {
- handler: this.renderPolarAxis
- },
- PolarRadiusAxis: {
- handler: this.renderPolarAxis
- }
- };
- if (compact) return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__container_Surface__.a, _extends({}, attrs, {
- width: width,
- height: height
- }), Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.p)(children, map));
- var events = this.parseEventsOfWrapper();
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement("div", _extends({
- className: __WEBPACK_IMPORTED_MODULE_7_classnames___default()("recharts-wrapper", className),
- style: _extends({}, style, {
- position: "relative",
- cursor: "default",
- width: width,
- height: height
- })
- }, events, {
- ref: function(node) {
- _this6.container = node;
- }
- }), __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__container_Surface__.a, _extends({}, attrs, {
- width: width,
- height: height
- }), Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.p)(children, map)), this.renderLegend(), this.renderTooltip());
- }
- } ]), CategoricalChartWrapper;
- }(__WEBPACK_IMPORTED_MODULE_5_react__.Component), _class.displayName = chartName,
- _class.propTypes = _extends({
- syncId: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number ]),
- compact: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- width: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- height: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- data: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object),
- layout: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "horizontal", "vertical" ]),
- stackOffset: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf([ "sign", "expand", "none", "wiggle", "silhouette" ]),
- throttleDelay: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- margin: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({
- top: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- right: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- bottom: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- left: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number
- }),
- barCategoryGap: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- barGap: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- barSize: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string ]),
- maxBarSize: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- className: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node ]),
- onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseLeave: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseMove: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseDown: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseUp: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- reverseStackOrder: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- id: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string
- }, propTypes), _class.defaultProps = _extends({
- layout: "horizontal",
- stackOffset: "none",
- barCategoryGap: "10%",
- barGap: 4,
- margin: {
- top: 5,
- right: 5,
- bottom: 5,
- left: 5
- },
- reverseStackOrder: !1
- }, defaultProps), _class.createDefaultState = function(props) {
- var children = props.children, brushItem = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.i)(children, __WEBPACK_IMPORTED_MODULE_19__cartesian_Brush__.a);
- return {
- chartX: 0,
- chartY: 0,
- dataStartIndex: brushItem && brushItem.props && brushItem.props.startIndex || 0,
- dataEndIndex: brushItem && brushItem.props && brushItem.props.endIndex || props.data && props.data.length - 1 || 0,
- activeTooltipIndex: -1,
- isTooltipActive: !1
- };
- }, _class.hasBar = function(graphicalItems) {
- return !(!graphicalItems || !graphicalItems.length) && graphicalItems.some(function(item) {
- var name = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.j)(item && item.type);
- return name && name.indexOf("Bar") >= 0;
- });
- }, _class.getDisplayedData = function(props, _ref8, item) {
- var graphicalItems = _ref8.graphicalItems, dataStartIndex = _ref8.dataStartIndex, dataEndIndex = _ref8.dataEndIndex, itemsData = (graphicalItems || []).reduce(function(result, child) {
- var itemData = child.props.data;
- return itemData && itemData.length ? [].concat(_toConsumableArray(result), _toConsumableArray(itemData)) : result;
- }, []);
- if (itemsData && itemsData.length > 0) return itemsData;
- if (item && item.props && item.props.data && item.props.data.length > 0) return item.props.data;
- var data = props.data;
- return data && data.length && Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(dataStartIndex) && Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(dataEndIndex) ? data.slice(dataStartIndex, dataEndIndex + 1) : [];
- }, _initialiseProps = function() {
- var _this7 = this;
- this.handleLegendBBoxUpdate = function(box) {
- if (box && _this7.legendInstance) {
- var _state9 = _this7.state, dataStartIndex = _state9.dataStartIndex, dataEndIndex = _state9.dataEndIndex, updateId = _state9.updateId;
- _this7.setState(_this7.updateStateOfAxisMapsOffsetAndStackGroups({
- props: _this7.props,
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex,
- updateId: updateId
- }));
- }
- }, this.handleReceiveSyncEvent = function(cId, chartId, data) {
- var _props5 = _this7.props, syncId = _props5.syncId, layout = _props5.layout, updateId = _this7.state.updateId;
- if (syncId === cId && chartId !== _this7.uniqueChartId) {
- var dataStartIndex = data.dataStartIndex, dataEndIndex = data.dataEndIndex;
- if (__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(data.dataStartIndex) && __WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(data.dataEndIndex)) if (__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(data.activeTooltipIndex)) _this7.setState(data); else {
- var chartX = data.chartX, chartY = data.chartY, activeTooltipIndex = data.activeTooltipIndex, _state10 = _this7.state, offset = _state10.offset, tooltipTicks = _state10.tooltipTicks;
- if (!offset) return;
- var viewBox = _extends({}, offset, {
- x: offset.left,
- y: offset.top
- }), validateChartX = Math.min(chartX, viewBox.x + viewBox.width), validateChartY = Math.min(chartY, viewBox.y + viewBox.height), activeLabel = tooltipTicks[activeTooltipIndex] && tooltipTicks[activeTooltipIndex].value, activePayload = _this7.getTooltipContent(activeTooltipIndex), activeCoordinate = tooltipTicks[activeTooltipIndex] ? {
- x: "horizontal" === layout ? tooltipTicks[activeTooltipIndex].coordinate : validateChartX,
- y: "horizontal" === layout ? validateChartY : tooltipTicks[activeTooltipIndex].coordinate
- } : originCoordinate;
- _this7.setState(_extends({}, data, {
- activeLabel: activeLabel,
- activeCoordinate: activeCoordinate,
- activePayload: activePayload
- }));
- } else _this7.setState(_extends({
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex
- }, _this7.updateStateOfAxisMapsOffsetAndStackGroups({
- props: _this7.props,
- dataStartIndex: dataStartIndex,
- dataEndIndex: dataEndIndex,
- updateId: updateId
- })));
- }
- }, this.handleBrushChange = function(_ref9) {
- var startIndex = _ref9.startIndex, endIndex = _ref9.endIndex;
- if (startIndex !== _this7.state.dataStartIndex || endIndex !== _this7.state.dataEndIndex) {
- var updateId = _this7.state.updateId;
- _this7.setState(function() {
- return _extends({
- dataStartIndex: startIndex,
- dataEndIndex: endIndex
- }, _this7.updateStateOfAxisMapsOffsetAndStackGroups({
- props: _this7.props,
- dataStartIndex: startIndex,
- dataEndIndex: endIndex,
- updateId: updateId
- }));
- }), _this7.triggerSyncEvent({
- dataStartIndex: startIndex,
- dataEndIndex: endIndex
- });
- }
- }, this.handleMouseEnter = function(e) {
- var onMouseEnter = _this7.props.onMouseEnter, mouse = _this7.getMouseInfo(e);
- if (mouse) {
- var nextState = _extends({}, mouse, {
- isTooltipActive: !0
- });
- _this7.setState(nextState), _this7.triggerSyncEvent(nextState), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(onMouseEnter) && onMouseEnter(nextState, e);
- }
- }, this.triggeredAfterMouseMove = function(e) {
- var onMouseMove = _this7.props.onMouseMove, mouse = _this7.getMouseInfo(e), nextState = mouse ? _extends({}, mouse, {
- isTooltipActive: !0
- }) : {
- isTooltipActive: !1
- };
- _this7.setState(nextState), _this7.triggerSyncEvent(nextState), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(onMouseMove) && onMouseMove(nextState, e);
- }, this.handleItemMouseEnter = function(el) {
- _this7.setState(function() {
- return {
- isTooltipActive: !0,
- activeItem: el,
- activePayload: el.tooltipPayload,
- activeCoordinate: el.tooltipPosition || {
- x: el.cx,
- y: el.cy
- }
- };
- });
- }, this.handleItemMouseLeave = function() {
- _this7.setState(function() {
- return {
- isTooltipActive: !1
- };
- });
- }, this.handleMouseMove = function(e) {
- e && __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(e.persist) && e.persist(),
- _this7.triggeredAfterMouseMove(e);
- }, this.handleMouseLeave = function(e) {
- var onMouseLeave = _this7.props.onMouseLeave, nextState = {
- isTooltipActive: !1
- };
- _this7.setState(nextState), _this7.triggerSyncEvent(nextState), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(onMouseLeave) && onMouseLeave(nextState, e);
- }, this.handleOuterEvent = function(e) {
- var eventName = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.l)(e);
- if (eventName && __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(_this7.props[eventName])) {
- var mouse = _this7.getMouseInfo(e);
- (0, _this7.props[eventName])(mouse, e);
- }
- }, this.handleClick = function(e) {
- var onClick = _this7.props.onClick;
- if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(onClick)) {
- onClick(_this7.getMouseInfo(e), e);
- }
- }, this.handleMouseDown = function(e) {
- var onMouseDown = _this7.props.onMouseDown;
- if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(onMouseDown)) {
- onMouseDown(_this7.getMouseInfo(e), e);
- }
- }, this.handleMouseUp = function(e) {
- var onMouseUp = _this7.props.onMouseUp;
- if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(onMouseUp)) {
- onMouseUp(_this7.getMouseInfo(e), e);
- }
- }, this.handleTouchMove = function(e) {
- null != e.changedTouches && e.changedTouches.length > 0 && _this7.handleMouseMove(e.changedTouches[0]);
- }, this.verticalCoordinatesGenerator = function(_ref10) {
- var xAxis = _ref10.xAxis, width = _ref10.width, height = _ref10.height, offset = _ref10.offset;
- return Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.m)(__WEBPACK_IMPORTED_MODULE_18__cartesian_CartesianAxis__.a.getTicks(_extends({}, __WEBPACK_IMPORTED_MODULE_18__cartesian_CartesianAxis__.a.defaultProps, xAxis, {
- ticks: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(xAxis, !0),
- viewBox: {
- x: 0,
- y: 0,
- width: width,
- height: height
- }
- })), offset.left, offset.left + offset.width);
- }, this.horizontalCoordinatesGenerator = function(_ref11) {
- var yAxis = _ref11.yAxis, width = _ref11.width, height = _ref11.height, offset = _ref11.offset;
- return Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.m)(__WEBPACK_IMPORTED_MODULE_18__cartesian_CartesianAxis__.a.getTicks(_extends({}, __WEBPACK_IMPORTED_MODULE_18__cartesian_CartesianAxis__.a.defaultProps, yAxis, {
- ticks: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(yAxis, !0),
- viewBox: {
- x: 0,
- y: 0,
- width: width,
- height: height
- }
- })), offset.top, offset.top + offset.height);
- }, this.axesTicksGenerator = function(axis) {
- return Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(axis, !0);
- }, this.tooltipTicksGenerator = function(axisMap) {
- var axis = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(axisMap), tooltipTicks = Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(axis, !1, !0);
- return {
- tooltipTicks: tooltipTicks,
- orderedTooltipTicks: __WEBPACK_IMPORTED_MODULE_0_lodash_sortBy___default()(tooltipTicks, function(o) {
- return o.coordinate;
- }),
- tooltipAxis: axis,
- tooltipAxisBandSize: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.g)(axis)
- };
- }, this.renderCursor = function(element) {
- var _state11 = _this7.state, isTooltipActive = _state11.isTooltipActive, activeCoordinate = _state11.activeCoordinate, activePayload = _state11.activePayload, offset = _state11.offset;
- if (!(element && element.props.cursor && isTooltipActive && activeCoordinate)) return null;
- var layout = _this7.props.layout, restProps = void 0, cursorComp = __WEBPACK_IMPORTED_MODULE_12__shape_Curve__.a;
- if ("ScatterChart" === chartName) restProps = activeCoordinate, cursorComp = __WEBPACK_IMPORTED_MODULE_13__shape_Cross__.a; else if ("BarChart" === chartName) restProps = _this7.getCursorRectangle(),
- cursorComp = __WEBPACK_IMPORTED_MODULE_16__shape_Rectangle__.a; else if ("radial" === layout) {
- var _getCursorPoints = _this7.getCursorPoints(), cx = _getCursorPoints.cx, cy = _getCursorPoints.cy, radius = _getCursorPoints.radius, startAngle = _getCursorPoints.startAngle, endAngle = _getCursorPoints.endAngle;
- restProps = {
- cx: cx,
- cy: cy,
- startAngle: startAngle,
- endAngle: endAngle,
- innerRadius: radius,
- outerRadius: radius
- }, cursorComp = __WEBPACK_IMPORTED_MODULE_14__shape_Sector__.a;
- } else restProps = {
- points: _this7.getCursorPoints()
- }, cursorComp = __WEBPACK_IMPORTED_MODULE_12__shape_Curve__.a;
- var key = element.key || "_recharts-cursor", cursorProps = _extends({
- stroke: "#ccc"
- }, offset, restProps, Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.k)(element.props.cursor), {
- payload: activePayload,
- key: key,
- className: "recharts-tooltip-cursor"
- });
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.isValidElement)(element.props.cursor) ? Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(element.props.cursor, cursorProps) : Object(__WEBPACK_IMPORTED_MODULE_5_react__.createElement)(cursorComp, cursorProps);
- }, this.renderPolarAxis = function(element, displayName, index) {
- var axisType = element.type.axisType, axisMap = _this7.state[axisType + "Map"], axisOption = axisMap[element.props[axisType + "Id"]];
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(element, _extends({}, axisOption, {
- className: axisType,
- key: element.key || displayName + "-" + index,
- ticks: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(axisOption, !0)
- }));
- }, this.renderXAxis = function(element, displayName, index) {
- var xAxisMap = _this7.state.xAxisMap, axisObj = xAxisMap[element.props.xAxisId];
- return _this7.renderAxis(axisObj, element, displayName, index);
- }, this.renderYAxis = function(element, displayName, index) {
- var yAxisMap = _this7.state.yAxisMap, axisObj = yAxisMap[element.props.yAxisId];
- return _this7.renderAxis(axisObj, element, displayName, index);
- }, this.renderGrid = function(element) {
- var _state12 = _this7.state, xAxisMap = _state12.xAxisMap, yAxisMap = _state12.yAxisMap, offset = _state12.offset, _props6 = _this7.props, width = _props6.width, height = _props6.height, xAxis = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(xAxisMap), yAxis = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(yAxisMap), props = element.props || {};
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(element, {
- key: element.key || "grid",
- x: Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(props.x) ? props.x : offset.left,
- y: Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(props.y) ? props.y : offset.top,
- width: Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(props.width) ? props.width : offset.width,
- height: Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(props.height) ? props.height : offset.height,
- xAxis: xAxis,
- yAxis: yAxis,
- offset: offset,
- chartWidth: width,
- chartHeight: height,
- verticalCoordinatesGenerator: _this7.verticalCoordinatesGenerator,
- horizontalCoordinatesGenerator: _this7.horizontalCoordinatesGenerator
- });
- }, this.renderPolarGrid = function(element) {
- var _state13 = _this7.state, radiusAxisMap = _state13.radiusAxisMap, angleAxisMap = _state13.angleAxisMap, radiusAxis = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(radiusAxisMap), angleAxis = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.b)(angleAxisMap), cx = angleAxis.cx, cy = angleAxis.cy, innerRadius = angleAxis.innerRadius, outerRadius = angleAxis.outerRadius;
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(element, {
- polarAngles: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(angleAxis, !0).map(function(entry) {
- return entry.coordinate;
- }),
- polarRadius: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.u)(radiusAxis, !0).map(function(entry) {
- return entry.coordinate;
- }),
- cx: cx,
- cy: cy,
- innerRadius: innerRadius,
- outerRadius: outerRadius,
- key: element.key || "polar-grid"
- });
- }, this.renderBrush = function(element) {
- var _props7 = _this7.props, margin = _props7.margin, data = _props7.data, _state14 = _this7.state, offset = _state14.offset, dataStartIndex = _state14.dataStartIndex, dataEndIndex = _state14.dataEndIndex, updateId = _state14.updateId;
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(element, {
- key: element.key || "_recharts-brush",
- onChange: Object(__WEBPACK_IMPORTED_MODULE_22__util_ChartUtils__.d)(_this7.handleBrushChange, null, element.props.onChange),
- data: data,
- x: Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(element.props.x) ? element.props.x : offset.left,
- y: Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(element.props.y) ? element.props.y : offset.top + offset.height + offset.brushBottom - (margin.bottom || 0),
- width: Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.h)(element.props.width) ? element.props.width : offset.width,
- startIndex: dataStartIndex,
- endIndex: dataEndIndex,
- updateId: "brush-" + updateId
- });
- }, this.renderReferenceElement = function(element, displayName, index) {
- if (!element) return null;
- var _state15 = _this7.state, xAxisMap = _state15.xAxisMap, yAxisMap = _state15.yAxisMap, offset = _state15.offset, _element$props = element.props, xAxisId = _element$props.xAxisId, yAxisId = _element$props.yAxisId;
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(element, {
- key: element.key || displayName + "-" + index,
- xAxis: xAxisMap[xAxisId],
- yAxis: yAxisMap[yAxisId],
- viewBox: {
- x: offset.left,
- y: offset.top,
- width: offset.width,
- height: offset.height
- }
- });
- }, this.renderGraphicChild = function(element, displayName, index) {
- var item = _this7.filterFormatItem(element, displayName, index);
- if (!item) return null;
- var graphicalItem = Object(__WEBPACK_IMPORTED_MODULE_5_react__.cloneElement)(element, item.props), _state16 = _this7.state, isTooltipActive = _state16.isTooltipActive, tooltipAxis = _state16.tooltipAxis, activeTooltipIndex = _state16.activeTooltipIndex, activeLabel = _state16.activeLabel, children = _this7.props.children, tooltipItem = Object(__WEBPACK_IMPORTED_MODULE_17__util_ReactUtils__.i)(children, __WEBPACK_IMPORTED_MODULE_10__component_Tooltip__.a), _item$props2 = item.props, points = _item$props2.points, isRange = _item$props2.isRange, baseLine = _item$props2.baseLine, _item$item$props2 = item.item.props, activeDot = _item$item$props2.activeDot;
- if (!_item$item$props2.hide && isTooltipActive && tooltipItem && activeDot && activeTooltipIndex >= 0) {
- var activePoint = void 0, basePoint = void 0;
- if (tooltipAxis.dataKey && !tooltipAxis.allowDuplicatedCategory ? (activePoint = Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.a)(points, "payload." + tooltipAxis.dataKey, activeLabel),
- basePoint = isRange && baseLine && Object(__WEBPACK_IMPORTED_MODULE_21__util_DataUtils__.a)(baseLine, "payload." + tooltipAxis.dataKey, activeLabel)) : (activePoint = points[activeTooltipIndex],
- basePoint = isRange && baseLine && baseLine[activeTooltipIndex]), !__WEBPACK_IMPORTED_MODULE_4_lodash_isNil___default()(activePoint)) return [ graphicalItem ].concat(_toConsumableArray(_this7.renderActivePoints({
- item: item,
- activePoint: activePoint,
- basePoint: basePoint,
- childIndex: activeTooltipIndex,
- isRange: isRange
- })));
- }
- return isRange ? [ graphicalItem, null, null ] : [ graphicalItem, null ];
- };
- }, _temp;
- };
- __webpack_exports__.a = generateCategoricalChart;
-}, function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- function invariant(condition, format, a, b, c, d, e, f) {
- if (validateFormat(format), !condition) {
- var error;
- if (void 0 === format) error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
- var args = [ a, b, c, d, e, f ], argIndex = 0;
- error = new Error(format.replace(/%s/g, function() {
- return args[argIndex++];
- })), error.name = "Invariant Violation";
- }
- throw error.framesToPop = 1, error;
- }
- }
- var validateFormat = function(format) {};
- "production" !== process.env.NODE_ENV && (validateFormat = function(format) {
- if (void 0 === format) throw new Error("invariant requires an error message argument");
- }), module.exports = invariant;
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function makeEmptyFunction(arg) {
- return function() {
- return arg;
- };
- }
- var emptyFunction = function() {};
- emptyFunction.thatReturns = makeEmptyFunction, emptyFunction.thatReturnsFalse = makeEmptyFunction(!1),
- emptyFunction.thatReturnsTrue = makeEmptyFunction(!0), emptyFunction.thatReturnsNull = makeEmptyFunction(null),
- emptyFunction.thatReturnsThis = function() {
- return this;
- }, emptyFunction.thatReturnsArgument = function(arg) {
- return arg;
- }, module.exports = emptyFunction;
-}, function(module, exports, __webpack_require__) {
- var aFunction = __webpack_require__(223);
- module.exports = function(fn, that, length) {
- if (aFunction(fn), void 0 === that) return fn;
- switch (length) {
- case 1:
- return function(a) {
- return fn.call(that, a);
- };
-
- case 2:
- return function(a, b) {
- return fn.call(that, a, b);
- };
-
- case 3:
- return function(a, b, c) {
- return fn.call(that, a, b, c);
- };
- }
- return function() {
- return fn.apply(that, arguments);
- };
- };
-}, function(module, exports, __webpack_require__) {
- var isObject = __webpack_require__(35);
- module.exports = function(it) {
- if (!isObject(it)) throw TypeError(it + " is not an object!");
- return it;
- };
-}, function(module, exports) {
- module.exports = function(exec) {
- try {
- return !!exec();
- } catch (e) {
- return !0;
- }
- };
-}, function(module, exports) {
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function(it, key) {
- return hasOwnProperty.call(it, key);
- };
-}, function(module, exports, __webpack_require__) {
- module.exports = {
- default: __webpack_require__(421),
- __esModule: !0
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- function capitalize(string) {
- if ("production" !== process.env.NODE_ENV && "string" != typeof string) throw new Error("Material-UI: capitalize(string) expects a string argument.");
- return string.charAt(0).toUpperCase() + string.slice(1);
- }
- function contains(obj, pred) {
- return (0, _keys2.default)(pred).every(function(key) {
- return obj.hasOwnProperty(key) && obj[key] === pred[key];
- });
- }
- function findIndex(arr, pred) {
- for (var predType = void 0 === pred ? "undefined" : (0, _typeof3.default)(pred), i = 0; i < arr.length; i += 1) {
- if ("function" === predType && !0 == !!pred(arr[i], i, arr)) return i;
- if ("object" === predType && contains(arr[i], pred)) return i;
- if (-1 !== [ "string", "number", "boolean" ].indexOf(predType)) return arr.indexOf(pred);
- }
- return -1;
- }
- function find(arr, pred) {
- var index = findIndex(arr, pred);
- return index > -1 ? arr[index] : void 0;
- }
- function createChainedFunction() {
- for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) funcs[_key] = arguments[_key];
- return funcs.filter(function(func) {
- return null != func;
- }).reduce(function(acc, func) {
- return "production" !== process.env.NODE_ENV && (0, _warning2.default)("function" == typeof func, "Material-UI: invalid Argument Type, must only provide functions, undefined, or null."),
- function() {
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];
- acc.apply(this, args), func.apply(this, args);
- };
- }, function() {});
- }
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- var _typeof2 = __webpack_require__(105), _typeof3 = _interopRequireDefault(_typeof2), _keys = __webpack_require__(55), _keys2 = _interopRequireDefault(_keys);
- exports.capitalize = capitalize, exports.contains = contains, exports.findIndex = findIndex,
- exports.find = find, exports.createChainedFunction = createChainedFunction;
- var _warning = __webpack_require__(11), _warning2 = _interopRequireDefault(_warning);
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : void 0;
- }
- var baseIsNative = __webpack_require__(611), getValue = __webpack_require__(614);
- module.exports = getNative;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_exports__.a = function(x) {
- return function() {
- return x;
- };
- };
-}, function(module, exports, __webpack_require__) {
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : void 0;
- }
- var baseIsNative = __webpack_require__(668), getValue = __webpack_require__(673);
- module.exports = getNative;
-}, function(module, exports, __webpack_require__) {
- function baseGetTag(value) {
- return null == value ? void 0 === value ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
- }
- var Symbol = __webpack_require__(128), getRawTag = __webpack_require__(669), objectToString = __webpack_require__(670), nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag = Symbol ? Symbol.toStringTag : void 0;
- module.exports = baseGetTag;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var _class, _temp2, __WEBPACK_IMPORTED_MODULE_0_lodash_isNil__ = __webpack_require__(20), __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isNil__), __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__), __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__), __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc__ = __webpack_require__(771), __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_reduce_css_calc__), __WEBPACK_IMPORTED_MODULE_4_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_4_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_classnames__), __WEBPACK_IMPORTED_MODULE_5__util_DataUtils__ = __webpack_require__(9), __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__ = __webpack_require__(4), __WEBPACK_IMPORTED_MODULE_7__util_DOMUtils__ = __webpack_require__(198), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), BREAKING_SPACES = /[ \f\n\r\t\v\u2028\u2029]+/, calculateWordWidths = function(props) {
- try {
- return {
- wordsWithComputedWidth: (__WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(props.children) ? [] : props.children.toString().split(BREAKING_SPACES)).map(function(word) {
- return {
- word: word,
- width: Object(__WEBPACK_IMPORTED_MODULE_7__util_DOMUtils__.c)(word, props.style).width
- };
- }),
- spaceWidth: Object(__WEBPACK_IMPORTED_MODULE_7__util_DOMUtils__.c)("Â ", props.style).width
- };
- } catch (e) {
- return null;
- }
- }, Text = (_temp2 = _class = function(_Component) {
- function Text() {
- var _ref, _temp, _this, _ret;
- _classCallCheck(this, Text);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
- return _temp = _this = _possibleConstructorReturn(this, (_ref = Text.__proto__ || Object.getPrototypeOf(Text)).call.apply(_ref, [ this ].concat(args))),
- _this.state = {
- wordsByLines: []
- }, _ret = _temp, _possibleConstructorReturn(_this, _ret);
- }
- return _inherits(Text, _Component), _createClass(Text, [ {
- key: "componentWillMount",
- value: function() {
- this.updateWordsByLines(this.props, !0);
- }
- }, {
- key: "componentWillReceiveProps",
- value: function(nextProps) {
- var needCalculate = this.props.children !== nextProps.children || this.props.style !== nextProps.style;
- this.updateWordsByLines(nextProps, needCalculate);
- }
- }, {
- key: "updateWordsByLines",
- value: function(props, needCalculate) {
- if (!props.width && !props.scaleToFit || Object(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__.n)()) this.updateWordsWithoutCalculate(props); else {
- if (needCalculate) {
- var wordWidths = calculateWordWidths(props);
- if (!wordWidths) return void this.updateWordsWithoutCalculate(props);
- var wordsWithComputedWidth = wordWidths.wordsWithComputedWidth, spaceWidth = wordWidths.spaceWidth;
- this.wordsWithComputedWidth = wordsWithComputedWidth, this.spaceWidth = spaceWidth;
- }
- var wordsByLines = this.calculateWordsByLines(this.wordsWithComputedWidth, this.spaceWidth, props.width);
- this.setState({
- wordsByLines: wordsByLines
- });
- }
- }
- }, {
- key: "updateWordsWithoutCalculate",
- value: function(props) {
- var words = __WEBPACK_IMPORTED_MODULE_0_lodash_isNil___default()(props.children) ? [] : props.children.toString().split(BREAKING_SPACES);
- this.setState({
- wordsByLines: [ {
- words: words
- } ]
- });
- }
- }, {
- key: "calculateWordsByLines",
- value: function(wordsWithComputedWidth, spaceWidth, lineWidth) {
- var scaleToFit = this.props.scaleToFit;
- return wordsWithComputedWidth.reduce(function(result, _ref2) {
- var word = _ref2.word, width = _ref2.width, currentLine = result[result.length - 1];
- if (currentLine && (null == lineWidth || scaleToFit || currentLine.width + width + spaceWidth < lineWidth)) currentLine.words.push(word),
- currentLine.width += width + spaceWidth; else {
- var newLine = {
- words: [ word ],
- width: width
- };
- result.push(newLine);
- }
- return result;
- }, []);
- }
- }, {
- key: "render",
- value: function() {
- var _props = this.props, dx = _props.dx, dy = _props.dy, textAnchor = _props.textAnchor, verticalAnchor = _props.verticalAnchor, scaleToFit = _props.scaleToFit, angle = _props.angle, lineHeight = _props.lineHeight, capHeight = _props.capHeight, className = _props.className, textProps = _objectWithoutProperties(_props, [ "dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className" ]), wordsByLines = this.state.wordsByLines;
- if (!Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__.g)(textProps.x) || !Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__.g)(textProps.y)) return null;
- var x = textProps.x + (Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__.h)(dx) ? dx : 0), y = textProps.y + (Object(__WEBPACK_IMPORTED_MODULE_5__util_DataUtils__.h)(dy) ? dy : 0), startDy = void 0;
- switch (verticalAnchor) {
- case "start":
- startDy = __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default()("calc(" + capHeight + ")");
- break;
-
- case "middle":
- startDy = __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default()("calc(" + (wordsByLines.length - 1) / 2 + " * -" + lineHeight + " + (" + capHeight + " / 2))");
- break;
-
- default:
- startDy = __WEBPACK_IMPORTED_MODULE_3_reduce_css_calc___default()("calc(" + (wordsByLines.length - 1) + " * -" + lineHeight + ")");
- }
- var transforms = [];
- if (scaleToFit) {
- var lineWidth = wordsByLines[0].width;
- transforms.push("scale(" + this.props.width / lineWidth + ")");
- }
- return angle && transforms.push("rotate(" + angle + ", " + x + ", " + y + ")"),
- transforms.length && (textProps.transform = transforms.join(" ")), __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("text", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__.k)(textProps), {
- x: x,
- y: y,
- className: __WEBPACK_IMPORTED_MODULE_4_classnames___default()("recharts-text", className),
- textAnchor: textAnchor
- }), wordsByLines.map(function(line, index) {
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tspan", {
- x: x,
- dy: 0 === index ? startDy : lineHeight,
- key: index
- }, line.words.join(" "));
- }));
- }
- } ]), Text;
- }(__WEBPACK_IMPORTED_MODULE_1_react__.Component), _class.propTypes = _extends({}, __WEBPACK_IMPORTED_MODULE_6__util_ReactUtils__.c, {
- scaleToFit: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool,
- angle: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
- textAnchor: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([ "start", "middle", "end", "inherit" ]),
- verticalAnchor: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOf([ "start", "middle", "end" ]),
- style: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object
- }), _class.defaultProps = {
- x: 0,
- y: 0,
- lineHeight: "1em",
- capHeight: "0.71em",
- scaleToFit: !1,
- textAnchor: "start",
- verticalAnchor: "end"
- }, _temp2);
- __webpack_exports__.a = Text;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return map;
- }), __webpack_require__.d(__webpack_exports__, "b", function() {
- return slice;
- });
- var array = Array.prototype, map = array.map, slice = array.slice;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var _class, _class2, _temp, __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__), __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__), __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__), __WEBPACK_IMPORTED_MODULE_3__util_PureRender__ = __webpack_require__(5), __WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__ = __webpack_require__(4), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), Dot = Object(__WEBPACK_IMPORTED_MODULE_3__util_PureRender__.a)((_temp = _class2 = function(_Component) {
- function Dot() {
- return _classCallCheck(this, Dot), _possibleConstructorReturn(this, (Dot.__proto__ || Object.getPrototypeOf(Dot)).apply(this, arguments));
- }
- return _inherits(Dot, _Component), _createClass(Dot, [ {
- key: "render",
- value: function() {
- var _props = this.props, cx = _props.cx, cy = _props.cy, r = _props.r, className = _props.className, layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()("recharts-dot", className);
- return cx === +cx && cy === +cy && r === +r ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("circle", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__.k)(this.props), Object(__WEBPACK_IMPORTED_MODULE_4__util_ReactUtils__.e)(this.props, null, !0), {
- className: layerClass,
- cx: cx,
- cy: cy,
- r: r
- })) : null;
- }
- } ]), Dot;
- }(__WEBPACK_IMPORTED_MODULE_0_react__.Component), _class2.displayName = "Dot", _class2.propTypes = {
- className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- cx: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- cy: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- r: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number
- }, _class = _temp)) || _class;
- __webpack_exports__.a = Dot;
-}, function(module, exports, __webpack_require__) {
- var IObject = __webpack_require__(146), defined = __webpack_require__(148);
- module.exports = function(it) {
- return IObject(defined(it));
- };
-}, function(module, exports, __webpack_require__) {
- var defined = __webpack_require__(148);
- module.exports = function(it) {
- return Object(defined(it));
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- var _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
- return typeof obj;
- } : function(obj) {
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), _warning = __webpack_require__(11), _warning2 = _interopRequireDefault(_warning), _toCss = __webpack_require__(163), _toCss2 = _interopRequireDefault(_toCss), _toCssValue = __webpack_require__(110), _toCssValue2 = _interopRequireDefault(_toCssValue), StyleRule = function() {
- function StyleRule(key, style, options) {
- _classCallCheck(this, StyleRule), this.type = "style", this.isProcessed = !1;
- var sheet = options.sheet, Renderer = options.Renderer, selector = options.selector;
- this.key = key, this.options = options, this.style = style, selector && (this.selectorText = selector),
- this.renderer = sheet ? sheet.renderer : new Renderer();
- }
- return _createClass(StyleRule, [ {
- key: "prop",
- value: function(name, value) {
- if (void 0 === value) return this.style[name];
- if (this.style[name] === value) return this;
- value = this.options.jss.plugins.onChangeValue(value, name, this);
- var isEmpty = null == value || !1 === value, isDefined = name in this.style;
- if (isEmpty && !isDefined) return this;
- var remove = isEmpty && isDefined;
- if (remove ? delete this.style[name] : this.style[name] = value, this.renderable) return remove ? this.renderer.removeProperty(this.renderable, name) : this.renderer.setProperty(this.renderable, name, value),
- this;
- var sheet = this.options.sheet;
- return sheet && sheet.attached && (0, _warning2.default)(!1, 'Rule is not linked. Missing sheet option "link: true".'),
- this;
- }
- }, {
- key: "applyTo",
- value: function(renderable) {
- var json = this.toJSON();
- for (var prop in json) this.renderer.setProperty(renderable, prop, json[prop]);
- return this;
- }
- }, {
- key: "toJSON",
- value: function() {
- var json = {};
- for (var prop in this.style) {
- var value = this.style[prop];
- "object" !== (void 0 === value ? "undefined" : _typeof(value)) ? json[prop] = value : Array.isArray(value) && (json[prop] = (0,
- _toCssValue2.default)(value));
- }
- return json;
- }
- }, {
- key: "toString",
- value: function(options) {
- var sheet = this.options.sheet, link = !!sheet && sheet.options.link, opts = link ? _extends({}, options, {
- allowEmpty: !0
- }) : options;
- return (0, _toCss2.default)(this.selector, this.style, opts);
- }
- }, {
- key: "selector",
- set: function(selector) {
- if (selector !== this.selectorText && (this.selectorText = selector, this.renderable)) {
- if (!this.renderer.setSelector(this.renderable, selector) && this.renderable) {
- var renderable = this.renderer.replaceRule(this.renderable, this);
- renderable && (this.renderable = renderable);
- }
- }
- },
- get: function() {
- return this.selectorText;
- }
- } ]), StyleRule;
- }();
- exports.default = StyleRule;
-}, function(module, exports, __webpack_require__) {
- function isSymbol(value) {
- return "symbol" == typeof value || isObjectLike(value) && baseGetTag(value) == symbolTag;
- }
- var baseGetTag = __webpack_require__(41), isObjectLike = __webpack_require__(42), symbolTag = "[object Symbol]";
- module.exports = isSymbol;
-}, function(module, exports) {
- function identity(value) {
- return value;
- }
- module.exports = identity;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_exports__.a = function(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var _class, _class2, _temp2, __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__), __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__), __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__), __WEBPACK_IMPORTED_MODULE_3_react_smooth__ = __webpack_require__(33), __WEBPACK_IMPORTED_MODULE_3_react_smooth___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_smooth__), __WEBPACK_IMPORTED_MODULE_4__util_PureRender__ = __webpack_require__(5), __WEBPACK_IMPORTED_MODULE_5__util_ReactUtils__ = __webpack_require__(4), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), getRectangePath = function(x, y, width, height, radius) {
- var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2), sign = height >= 0 ? 1 : -1, clockWise = height >= 0 ? 1 : 0, path = void 0;
- if (maxRadius > 0 && radius instanceof Array) {
- for (var newRadius = [], i = 0; i < 4; i++) newRadius[i] = radius[i] > maxRadius ? maxRadius : radius[i];
- path = "M" + x + "," + (y + sign * newRadius[0]), newRadius[0] > 0 && (path += "A " + newRadius[0] + "," + newRadius[0] + ",0,0," + clockWise + "," + (x + newRadius[0]) + "," + y),
- path += "L " + (x + width - newRadius[1]) + "," + y, newRadius[1] > 0 && (path += "A " + newRadius[1] + "," + newRadius[1] + ",0,0," + clockWise + ",\n " + (x + width) + "," + (y + sign * newRadius[1])),
- path += "L " + (x + width) + "," + (y + height - sign * newRadius[2]), newRadius[2] > 0 && (path += "A " + newRadius[2] + "," + newRadius[2] + ",0,0," + clockWise + ",\n " + (x + width - newRadius[2]) + "," + (y + height)),
- path += "L " + (x + newRadius[3]) + "," + (y + height), newRadius[3] > 0 && (path += "A " + newRadius[3] + "," + newRadius[3] + ",0,0," + clockWise + ",\n " + x + "," + (y + height - sign * newRadius[3])),
- path += "Z";
- } else if (maxRadius > 0 && radius === +radius && radius > 0) {
- var _newRadius = Math.min(maxRadius, radius);
- path = "M " + x + "," + (y + sign * _newRadius) + "\n A " + _newRadius + "," + _newRadius + ",0,0," + clockWise + "," + (x + _newRadius) + "," + y + "\n L " + (x + width - _newRadius) + "," + y + "\n A " + _newRadius + "," + _newRadius + ",0,0," + clockWise + "," + (x + width) + "," + (y + sign * _newRadius) + "\n L " + (x + width) + "," + (y + height - sign * _newRadius) + "\n A " + _newRadius + "," + _newRadius + ",0,0," + clockWise + "," + (x + width - _newRadius) + "," + (y + height) + "\n L " + (x + _newRadius) + "," + (y + height) + "\n A " + _newRadius + "," + _newRadius + ",0,0," + clockWise + "," + x + "," + (y + height - sign * _newRadius) + " Z";
- } else path = "M " + x + "," + y + " h " + width + " v " + height + " h " + -width + " Z";
- return path;
- }, Rectangle = Object(__WEBPACK_IMPORTED_MODULE_4__util_PureRender__.a)((_temp2 = _class2 = function(_Component) {
- function Rectangle() {
- var _ref, _temp, _this, _ret;
- _classCallCheck(this, Rectangle);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
- return _temp = _this = _possibleConstructorReturn(this, (_ref = Rectangle.__proto__ || Object.getPrototypeOf(Rectangle)).call.apply(_ref, [ this ].concat(args))),
- _this.state = {
- totalLength: -1
- }, _ret = _temp, _possibleConstructorReturn(_this, _ret);
- }
- return _inherits(Rectangle, _Component), _createClass(Rectangle, [ {
- key: "componentDidMount",
- value: function() {
- if (this.node && this.node.getTotalLength) try {
- var totalLength = this.node.getTotalLength();
- totalLength && this.setState({
- totalLength: totalLength
- });
- } catch (err) {}
- }
- }, {
- key: "render",
- value: function() {
- var _this2 = this, _props = this.props, x = _props.x, y = _props.y, width = _props.width, height = _props.height, radius = _props.radius, className = _props.className, totalLength = this.state.totalLength, _props2 = this.props, animationEasing = _props2.animationEasing, animationDuration = _props2.animationDuration, animationBegin = _props2.animationBegin, isAnimationActive = _props2.isAnimationActive, isUpdateAnimationActive = _props2.isUpdateAnimationActive;
- if (x !== +x || y !== +y || width !== +width || height !== +height || 0 === width || 0 === height) return null;
- var layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()("recharts-rectangle", className);
- return isUpdateAnimationActive ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_react_smooth___default.a, {
- canBegin: totalLength > 0,
- from: {
- width: width,
- height: height,
- x: x,
- y: y
- },
- to: {
- width: width,
- height: height,
- x: x,
- y: y
- },
- duration: animationDuration,
- animationEasing: animationEasing,
- isActive: isUpdateAnimationActive
- }, function(_ref2) {
- var currWidth = _ref2.width, currHeight = _ref2.height, currX = _ref2.x, currY = _ref2.y;
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_react_smooth___default.a, {
- canBegin: totalLength > 0,
- from: "0px " + (-1 === totalLength ? 1 : totalLength) + "px",
- to: totalLength + "px 0px",
- attributeName: "strokeDasharray",
- begin: animationBegin,
- duration: animationDuration,
- isActive: isAnimationActive,
- easing: animationEasing
- }, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_5__util_ReactUtils__.k)(_this2.props), Object(__WEBPACK_IMPORTED_MODULE_5__util_ReactUtils__.e)(_this2.props), {
- className: layerClass,
- d: getRectangePath(currX, currY, currWidth, currHeight, radius),
- ref: function(node) {
- _this2.node = node;
- }
- })));
- }) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_5__util_ReactUtils__.k)(this.props), Object(__WEBPACK_IMPORTED_MODULE_5__util_ReactUtils__.e)(this.props), {
- className: layerClass,
- d: getRectangePath(x, y, width, height, radius)
- }));
- }
- } ]), Rectangle;
- }(__WEBPACK_IMPORTED_MODULE_0_react__.Component), _class2.displayName = "Rectangle",
- _class2.propTypes = _extends({}, __WEBPACK_IMPORTED_MODULE_5__util_ReactUtils__.c, __WEBPACK_IMPORTED_MODULE_5__util_ReactUtils__.a, {
- className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- x: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- y: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- radius: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array ]),
- isAnimationActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- isUpdateAnimationActive: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- animationBegin: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- animationDuration: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- animationEasing: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "ease", "ease-in", "ease-out", "ease-in-out", "linear" ])
- }), _class2.defaultProps = {
- x: 0,
- y: 0,
- width: 0,
- height: 0,
- radius: 0,
- isAnimationActive: !1,
- isUpdateAnimationActive: !1,
- animationBegin: 0,
- animationDuration: 1500,
- animationEasing: "ease"
- }, _class = _temp2)) || _class;
- __webpack_exports__.a = Rectangle;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var _class, _class2, _temp, __WEBPACK_IMPORTED_MODULE_0_lodash_isArray__ = __webpack_require__(13), __WEBPACK_IMPORTED_MODULE_0_lodash_isArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_isArray__), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__ = __webpack_require__(8), __WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction__), __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__), __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__), __WEBPACK_IMPORTED_MODULE_4_d3_shape__ = __webpack_require__(182), __WEBPACK_IMPORTED_MODULE_5_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_5_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_classnames__), __WEBPACK_IMPORTED_MODULE_6__util_PureRender__ = __webpack_require__(5), __WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__ = __webpack_require__(4), __WEBPACK_IMPORTED_MODULE_8__util_DataUtils__ = __webpack_require__(9), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), CURVE_FACTORIES = {
- curveBasisClosed: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.c,
- curveBasisOpen: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.d,
- curveBasis: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.b,
- curveLinearClosed: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.f,
- curveLinear: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.e,
- curveMonotoneX: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.g,
- curveMonotoneY: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.h,
- curveNatural: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.i,
- curveStep: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.j,
- curveStepAfter: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.k,
- curveStepBefore: __WEBPACK_IMPORTED_MODULE_4_d3_shape__.l
- }, defined = function(p) {
- return p.x === +p.x && p.y === +p.y;
- }, getX = function(p) {
- return p.x;
- }, getY = function(p) {
- return p.y;
- }, getCurveFactory = function(type, layout) {
- if (__WEBPACK_IMPORTED_MODULE_1_lodash_isFunction___default()(type)) return type;
- var name = "curve" + type.slice(0, 1).toUpperCase() + type.slice(1);
- return "curveMonotone" === name && layout ? CURVE_FACTORIES[name + ("vertical" === layout ? "Y" : "X")] : CURVE_FACTORIES[name] || __WEBPACK_IMPORTED_MODULE_4_d3_shape__.e;
- }, Curve = Object(__WEBPACK_IMPORTED_MODULE_6__util_PureRender__.a)((_temp = _class2 = function(_Component) {
- function Curve() {
- return _classCallCheck(this, Curve), _possibleConstructorReturn(this, (Curve.__proto__ || Object.getPrototypeOf(Curve)).apply(this, arguments));
- }
- return _inherits(Curve, _Component), _createClass(Curve, [ {
- key: "getPath",
- value: function() {
- var _props = this.props, type = _props.type, points = _props.points, baseLine = _props.baseLine, layout = _props.layout, connectNulls = _props.connectNulls, curveFactory = getCurveFactory(type, layout), formatPoints = connectNulls ? points.filter(function(entry) {
- return defined(entry);
- }) : points, lineFunction = void 0;
- if (__WEBPACK_IMPORTED_MODULE_0_lodash_isArray___default()(baseLine)) {
- var areaPoints = formatPoints.map(function(entry, index) {
- return _extends({}, entry, {
- base: baseLine[index]
- });
- });
- return lineFunction = "vertical" === layout ? Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__.a)().y(getY).x1(getX).x0(function(d) {
- return d.base.x;
- }) : Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__.a)().x(getX).y1(getY).y0(function(d) {
- return d.base.y;
- }), lineFunction.defined(defined).curve(curveFactory), lineFunction(areaPoints);
- }
- return lineFunction = "vertical" === layout && Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(baseLine) ? Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__.a)().y(getY).x1(getX).x0(baseLine) : Object(__WEBPACK_IMPORTED_MODULE_8__util_DataUtils__.h)(baseLine) ? Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__.a)().x(getX).y1(getY).y0(baseLine) : Object(__WEBPACK_IMPORTED_MODULE_4_d3_shape__.m)().x(getX).y(getY),
- lineFunction.defined(defined).curve(curveFactory), lineFunction(formatPoints);
- }
- }, {
- key: "render",
- value: function() {
- var _props2 = this.props, className = _props2.className, points = _props2.points, path = _props2.path, pathRef = _props2.pathRef;
- if (!(points && points.length || path)) return null;
- var realPath = points && points.length ? this.getPath() : path;
- return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("path", _extends({}, Object(__WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__.k)(this.props), Object(__WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__.e)(this.props, null, !0), {
- className: __WEBPACK_IMPORTED_MODULE_5_classnames___default()("recharts-curve", className),
- d: realPath,
- ref: pathRef
- }));
- }
- } ]), Curve;
- }(__WEBPACK_IMPORTED_MODULE_2_react__.Component), _class2.displayName = "Curve",
- _class2.propTypes = _extends({}, __WEBPACK_IMPORTED_MODULE_7__util_ReactUtils__.c, {
- className: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
- type: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf([ "basis", "basisClosed", "basisOpen", "linear", "linearClosed", "natural", "monotoneX", "monotoneY", "monotone", "step", "stepBefore", "stepAfter" ]), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func ]),
- layout: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOf([ "horizontal", "vertical" ]),
- baseLine: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.array ]),
- points: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object),
- connectNulls: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
- path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
- pathRef: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func
- }), _class2.defaultProps = {
- type: "linear",
- points: [],
- connectNulls: !1
- }, _class = _temp)) || _class;
- __webpack_exports__.a = Curve;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var _class, _class2, _temp, __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_1_prop_types__ = (__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),
- __webpack_require__(1)), __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__), __WEBPACK_IMPORTED_MODULE_2__util_PureRender__ = __webpack_require__(5), __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(4), _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), XAxis = Object(__WEBPACK_IMPORTED_MODULE_2__util_PureRender__.a)((_temp = _class2 = function(_Component) {
- function XAxis() {
- return _classCallCheck(this, XAxis), _possibleConstructorReturn(this, (XAxis.__proto__ || Object.getPrototypeOf(XAxis)).apply(this, arguments));
- }
- return _inherits(XAxis, _Component), _createClass(XAxis, [ {
- key: "render",
- value: function() {
- return null;
- }
- } ]), XAxis;
- }(__WEBPACK_IMPORTED_MODULE_0_react__.Component), _class2.displayName = "XAxis",
- _class2.propTypes = {
- allowDecimals: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- allowDuplicatedCategory: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- hide: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number ]),
- unit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number ]),
- xAxisId: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number ]),
- domain: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "auto", "dataMin", "dataMax" ]) ])),
- dataKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func ]),
- width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- mirror: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- orientation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "top", "bottom" ]),
- type: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "number", "category" ]),
- ticks: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
- tickCount: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- tickFormatter: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- padding: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- left: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- right: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number
- }),
- allowDataOverflow: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- scale: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__.d), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func ]),
- tick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.element ]),
- axisLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object ]),
- tickLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object ]),
- minTickGap: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- tickSize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- interval: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "preserveStart", "preserveEnd", "preserveStartEnd" ]) ]),
- reversed: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool
- }, _class2.defaultProps = {
- allowDecimals: !0,
- hide: !1,
- orientation: "bottom",
- width: 0,
- height: 30,
- mirror: !1,
- xAxisId: 0,
- tickCount: 5,
- type: "category",
- domain: [ 0, "auto" ],
- padding: {
- left: 0,
- right: 0
- },
- allowDataOverflow: !1,
- scale: "auto",
- reversed: !1,
- allowDuplicatedCategory: !0
- }, _class = _temp)) || _class;
- __webpack_exports__.a = XAxis;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var _class, _class2, _temp, __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_1_prop_types__ = (__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),
- __webpack_require__(1)), __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__), __WEBPACK_IMPORTED_MODULE_2__util_PureRender__ = __webpack_require__(5), _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), YAxis = Object(__WEBPACK_IMPORTED_MODULE_2__util_PureRender__.a)((_temp = _class2 = function(_Component) {
- function YAxis() {
- return _classCallCheck(this, YAxis), _possibleConstructorReturn(this, (YAxis.__proto__ || Object.getPrototypeOf(YAxis)).apply(this, arguments));
- }
- return _inherits(YAxis, _Component), _createClass(YAxis, [ {
- key: "render",
- value: function() {
- return null;
- }
- } ]), YAxis;
- }(__WEBPACK_IMPORTED_MODULE_0_react__.Component), _class2.displayName = "YAxis",
- _class2.propTypes = {
- allowDecimals: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- allowDuplicatedCategory: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- hide: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number ]),
- unit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number ]),
- yAxisId: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number ]),
- domain: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "auto", "dataMin", "dataMax" ]) ])),
- dataKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func ]),
- ticks: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
- tickCount: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- tickFormatter: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- mirror: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- orientation: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "left", "right" ]),
- type: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "number", "category" ]),
- padding: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- top: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- bottom: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number
- }),
- allowDataOverflow: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
- scale: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "auto", "linear", "pow", "sqrt", "log", "identity", "time", "band", "point", "ordinal", "quantile", "quantize", "utcTime", "sequential", "threshold" ]), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func ]),
- tick: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.element ]),
- axisLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object ]),
- tickLine: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object ]),
- minTickGap: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- tickSize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- interval: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOf([ "preserveStart", "preserveEnd", "preserveStartEnd" ]) ]),
- reversed: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool
- }, _class2.defaultProps = {
- allowDuplicatedCategory: !0,
- allowDecimals: !0,
- hide: !1,
- orientation: "left",
- width: 60,
- height: 0,
- mirror: !1,
- yAxisId: 0,
- tickCount: 5,
- type: "number",
- domain: [ 0, "auto" ],
- padding: {
- top: 0,
- bottom: 0
- },
- allowDataOverflow: !1,
- scale: "auto",
- reversed: !1
- }, _class = _temp)) || _class;
- __webpack_exports__.a = YAxis;
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function toObject(val) {
- if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined");
- return Object(val);
- }
- var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
- module.exports = function() {
- try {
- if (!Object.assign) return !1;
- var test1 = new String("abc");
- if (test1[5] = "de", "5" === Object.getOwnPropertyNames(test1)[0]) return !1;
- for (var test2 = {}, i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
- if ("0123456789" !== Object.getOwnPropertyNames(test2).map(function(n) {
- return test2[n];
- }).join("")) return !1;
- var test3 = {};
- return "abcdefghijklmnopqrst".split("").forEach(function(letter) {
- test3[letter] = letter;
- }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, test3)).join("");
- } catch (err) {
- return !1;
- }
- }() ? Object.assign : function(target, source) {
- for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
- for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]);
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]);
- }
- }
- return to;
- };
-}, function(module, exports) {
- module.exports = function(bitmap, value) {
- return {
- enumerable: !(1 & bitmap),
- configurable: !(2 & bitmap),
- writable: !(4 & bitmap),
- value: value
- };
- };
-}, function(module, exports, __webpack_require__) {
- var $keys = __webpack_require__(226), enumBugKeys = __webpack_require__(152);
- module.exports = Object.keys || function(O) {
- return $keys(O, enumBugKeys);
- };
-}, function(module, exports) {
- module.exports = {};
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- function createBreakpoints(breakpoints) {
- function up(key) {
- return "@media (min-width:" + ("number" == typeof values[key] ? values[key] : key) + unit + ")";
- }
- function down(key) {
- var endIndex = keys.indexOf(key) + 1, upperbound = values[keys[endIndex]];
- return endIndex === keys.length ? up("xs") : "@media (max-width:" + (("number" == typeof upperbound && endIndex > 0 ? upperbound : key) - step / 100) + unit + ")";
- }
- function between(start, end) {
- var endIndex = keys.indexOf(end) + 1;
- return endIndex === keys.length ? up(start) : "@media (min-width:" + values[start] + unit + ") and (max-width:" + (values[keys[endIndex]] - step / 100) + unit + ")";
- }
- function only(key) {
- return between(key, key);
- }
- function width(key) {
- return values[key];
- }
- var _breakpoints$values = breakpoints.values, values = void 0 === _breakpoints$values ? {
- xs: 0,
- sm: 600,
- md: 960,
- lg: 1280,
- xl: 1920
- } : _breakpoints$values, _breakpoints$unit = breakpoints.unit, unit = void 0 === _breakpoints$unit ? "px" : _breakpoints$unit, _breakpoints$step = breakpoints.step, step = void 0 === _breakpoints$step ? 5 : _breakpoints$step, other = (0,
- _objectWithoutProperties3.default)(breakpoints, [ "values", "unit", "step" ]);
- return (0, _extends3.default)({
- keys: keys,
- values: values,
- up: up,
- down: down,
- between: between,
- only: only,
- width: width
- }, other);
- }
- Object.defineProperty(exports, "__esModule", {
- value: !0
- }), exports.keys = void 0;
- var _extends2 = __webpack_require__(6), _extends3 = _interopRequireDefault(_extends2), _objectWithoutProperties2 = __webpack_require__(7), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- exports.default = createBreakpoints;
- var keys = exports.keys = [ "xs", "sm", "md", "lg", "xl" ];
-}, function(module, exports, __webpack_require__) {
- "use strict";
- exports.__esModule = !0;
- var _getDisplayName = __webpack_require__(244), _getDisplayName2 = function(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }(_getDisplayName), wrapDisplayName = function(BaseComponent, hocName) {
- return hocName + "(" + (0, _getDisplayName2.default)(BaseComponent) + ")";
- };
- exports.default = wrapDisplayName;
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- var _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), _createRule = __webpack_require__(111), _createRule2 = _interopRequireDefault(_createRule), _linkRule = __webpack_require__(249), _linkRule2 = _interopRequireDefault(_linkRule), _StyleRule = __webpack_require__(66), _StyleRule2 = _interopRequireDefault(_StyleRule), _escape = __webpack_require__(467), _escape2 = _interopRequireDefault(_escape), RuleList = function() {
- function RuleList(options) {
- _classCallCheck(this, RuleList), this.map = {}, this.raw = {}, this.index = [],
- this.options = options, this.classes = options.classes;
- }
- return _createClass(RuleList, [ {
- key: "add",
- value: function(name, decl, options) {
- var _options = this.options, parent = _options.parent, sheet = _options.sheet, jss = _options.jss, Renderer = _options.Renderer, generateClassName = _options.generateClassName;
- options = _extends({
- classes: this.classes,
- parent: parent,
- sheet: sheet,
- jss: jss,
- Renderer: Renderer,
- generateClassName: generateClassName
- }, options), !options.selector && this.classes[name] && (options.selector = "." + (0,
- _escape2.default)(this.classes[name])), this.raw[name] = decl;
- var rule = (0, _createRule2.default)(name, decl, options), className = void 0;
- !options.selector && rule instanceof _StyleRule2.default && (className = generateClassName(rule, sheet),
- rule.selector = "." + (0, _escape2.default)(className)), this.register(rule, className);
- var index = void 0 === options.index ? this.index.length : options.index;
- return this.index.splice(index, 0, rule), rule;
- }
- }, {
- key: "get",
- value: function(name) {
- return this.map[name];
- }
- }, {
- key: "remove",
- value: function(rule) {
- this.unregister(rule), this.index.splice(this.indexOf(rule), 1);
- }
- }, {
- key: "indexOf",
- value: function(rule) {
- return this.index.indexOf(rule);
- }
- }, {
- key: "process",
- value: function() {
- var plugins = this.options.jss.plugins;
- this.index.slice(0).forEach(plugins.onProcessRule, plugins);
- }
- }, {
- key: "register",
- value: function(rule, className) {
- this.map[rule.key] = rule, rule instanceof _StyleRule2.default && (this.map[rule.selector] = rule,
- className && (this.classes[rule.key] = className));
- }
- }, {
- key: "unregister",
- value: function(rule) {
- delete this.map[rule.key], rule instanceof _StyleRule2.default && (delete this.map[rule.selector],
- delete this.classes[rule.key]);
- }
- }, {
- key: "update",
- value: function(name, data) {
- var _options2 = this.options, plugins = _options2.jss.plugins, sheet = _options2.sheet;
- if ("string" == typeof name) return void plugins.onUpdate(data, this.get(name), sheet);
- for (var index = 0; index < this.index.length; index++) plugins.onUpdate(name, this.index[index], sheet);
- }
- }, {
- key: "link",
- value: function(cssRules) {
- for (var map = this.options.sheet.renderer.getUnescapedKeysMap(this.index), i = 0; i < cssRules.length; i++) {
- var cssRule = cssRules[i], _key = this.options.sheet.renderer.getKey(cssRule);
- map[_key] && (_key = map[_key]);
- var rule = this.map[_key];
- rule && (0, _linkRule2.default)(rule, cssRule);
- }
- }
- }, {
- key: "toString",
- value: function(options) {
- for (var str = "", sheet = this.options.sheet, link = !!sheet && sheet.options.link, index = 0; index < this.index.length; index++) {
- var rule = this.index[index], css = rule.toString(options);
- (css || link) && (str && (str += "\n"), str += css);
- }
- return str;
- }
- } ]), RuleList;
- }();
- exports.default = RuleList;
-}, function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: !0
- });
- var _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, menuSkeletons = [ {
- id: "home",
- menu: {
- title: "Home",
- icon: "home"
- }
- }, {
- id: "chain",
- menu: {
- title: "Chain",
- icon: "link"
- }
- }, {
- id: "txpool",
- menu: {
- title: "TxPool",
- icon: "credit-card"
- }
- }, {
- id: "network",
- menu: {
- title: "Network",
- icon: "globe"
- }
- }, {
- id: "system",
- menu: {
- title: "System",
- icon: "tachometer"
- }
- }, {
- id: "logs",
- menu: {
- title: "Logs",
- icon: "list"
- }
- } ];
- exports.MENU = new Map(menuSkeletons.map(function(_ref) {
- var id = _ref.id, menu = _ref.menu;
- return [ id, _extends({
- id: id
- }, menu) ];
- })), exports.DURATION = 200, exports.styles = {
- light: {
- color: "rgba(255, 255, 255, 0.54)"
- }
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- }
- function Surface(props) {
- var children = props.children, width = props.width, height = props.height, viewBox = props.viewBox, className = props.className, style = props.style, others = _objectWithoutProperties(props, [ "children", "width", "height", "viewBox", "className", "style" ]), svgView = viewBox || {
- width: width,
- height: height,
- x: 0,
- y: 0
- }, layerClass = __WEBPACK_IMPORTED_MODULE_2_classnames___default()("recharts-surface", className), attrs = Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__.k)(others);
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({}, attrs, {
- className: layerClass,
- width: width,
- height: height,
- style: style,
- viewBox: svgView.x + " " + svgView.y + " " + svgView.width + " " + svgView.height,
- version: "1.1"
- }), children);
- }
- var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__), __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__), __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(3), __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__), __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(4), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, propTypes = {
- width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,
- height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,
- viewBox: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
- x: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- y: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- height: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number
- }),
- className: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- style: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node), __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node ])
- };
- Surface.propTypes = propTypes, __webpack_exports__.a = Surface;
-}, function(module, exports, __webpack_require__) {
- var root = __webpack_require__(31), Symbol = root.Symbol;
- module.exports = Symbol;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var __WEBPACK_IMPORTED_MODULE_0__src_path__ = __webpack_require__(633);
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return __WEBPACK_IMPORTED_MODULE_0__src_path__.a;
- });
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function acos(x) {
- return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
- }
- function asin(x) {
- return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
- }
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return abs;
- }), __webpack_require__.d(__webpack_exports__, "d", function() {
- return atan2;
- }), __webpack_require__.d(__webpack_exports__, "e", function() {
- return cos;
- }), __webpack_require__.d(__webpack_exports__, "h", function() {
- return max;
- }), __webpack_require__.d(__webpack_exports__, "i", function() {
- return min;
- }), __webpack_require__.d(__webpack_exports__, "k", function() {
- return sin;
- }), __webpack_require__.d(__webpack_exports__, "l", function() {
- return sqrt;
- }), __webpack_require__.d(__webpack_exports__, "f", function() {
- return epsilon;
- }), __webpack_require__.d(__webpack_exports__, "j", function() {
- return pi;
- }), __webpack_require__.d(__webpack_exports__, "g", function() {
- return halfPi;
- }), __webpack_require__.d(__webpack_exports__, "m", function() {
- return tau;
- }), __webpack_exports__.b = acos, __webpack_exports__.c = asin;
- var abs = Math.abs, atan2 = Math.atan2, cos = Math.cos, max = Math.max, min = Math.min, sin = Math.sin, sqrt = Math.sqrt, epsilon = 1e-12, pi = Math.PI, halfPi = pi / 2, tau = 2 * pi;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_exports__.a = function(series, order) {
- if ((n = series.length) > 1) for (var j, s0, n, i = 1, s1 = series[order[0]], m = s1.length; i < n; ++i) for (s0 = s1,
- s1 = series[order[i]], j = 0; j < m; ++j) s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_exports__.a = function(series) {
- for (var n = series.length, o = new Array(n); --n >= 0; ) o[n] = n;
- return o;
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function Cell() {
- return null;
- }
- var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_1__util_ReactUtils__ = (__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),
- __webpack_require__(4)), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- };
- Cell.propTypes = _extends({}, __WEBPACK_IMPORTED_MODULE_1__util_ReactUtils__.c),
- Cell.displayName = "Cell", __webpack_exports__.a = Cell;
-}, function(module, exports, __webpack_require__) {
- function baseIteratee(value) {
- return "function" == typeof value ? value : null == value ? identity : "object" == typeof value ? isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value) : property(value);
- }
- var baseMatches = __webpack_require__(815), baseMatchesProperty = __webpack_require__(818), identity = __webpack_require__(68), isArray = __webpack_require__(13), property = __webpack_require__(822);
- module.exports = baseIteratee;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_exports__.a = function(x) {
- return null === x ? NaN : +x;
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function linearish(scale) {
- var domain = scale.domain;
- return scale.ticks = function(count) {
- var d = domain();
- return Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__.h)(d[0], d[d.length - 1], null == count ? 10 : count);
- }, scale.tickFormat = function(count, specifier) {
- return Object(__WEBPACK_IMPORTED_MODULE_3__tickFormat__.a)(domain(), count, specifier);
- }, scale.nice = function(count) {
- null == count && (count = 10);
- var step, d = domain(), i0 = 0, i1 = d.length - 1, start = d[i0], stop = d[i1];
- return stop < start && (step = start, start = stop, stop = step, step = i0, i0 = i1,
- i1 = step), step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__.f)(start, stop, count),
- step > 0 ? (start = Math.floor(start / step) * step, stop = Math.ceil(stop / step) * step,
- step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__.f)(start, stop, count)) : step < 0 && (start = Math.ceil(start * step) / step,
- stop = Math.floor(stop * step) / step, step = Object(__WEBPACK_IMPORTED_MODULE_0_d3_array__.f)(start, stop, count)),
- step > 0 ? (d[i0] = Math.floor(start / step) * step, d[i1] = Math.ceil(stop / step) * step,
- domain(d)) : step < 0 && (d[i0] = Math.ceil(start * step) / step, d[i1] = Math.floor(stop * step) / step,
- domain(d)), scale;
- }, scale;
- }
- function linear() {
- var scale = Object(__WEBPACK_IMPORTED_MODULE_2__continuous__.b)(__WEBPACK_IMPORTED_MODULE_2__continuous__.c, __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__.c);
- return scale.copy = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_2__continuous__.a)(scale, linear());
- }, linearish(scale);
- }
- __webpack_exports__.b = linearish, __webpack_exports__.a = linear;
- var __WEBPACK_IMPORTED_MODULE_0_d3_array__ = __webpack_require__(37), __WEBPACK_IMPORTED_MODULE_1_d3_interpolate__ = __webpack_require__(92), __WEBPACK_IMPORTED_MODULE_2__continuous__ = __webpack_require__(137), __WEBPACK_IMPORTED_MODULE_3__tickFormat__ = __webpack_require__(883);
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- var __WEBPACK_IMPORTED_MODULE_0__src_value__ = __webpack_require__(206);
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return __WEBPACK_IMPORTED_MODULE_0__src_value__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_5__src_number__ = (__webpack_require__(349), __webpack_require__(209),
- __webpack_require__(347), __webpack_require__(350), __webpack_require__(136));
- __webpack_require__.d(__webpack_exports__, "c", function() {
- return __WEBPACK_IMPORTED_MODULE_5__src_number__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_7__src_round__ = (__webpack_require__(351), __webpack_require__(873));
- __webpack_require__.d(__webpack_exports__, "d", function() {
- return __WEBPACK_IMPORTED_MODULE_7__src_round__.a;
- });
- var __WEBPACK_IMPORTED_MODULE_15__src_cubehelix__ = (__webpack_require__(352), __webpack_require__(874),
- __webpack_require__(877), __webpack_require__(346), __webpack_require__(878), __webpack_require__(879),
- __webpack_require__(880), __webpack_require__(881));
- __webpack_require__.d(__webpack_exports__, "b", function() {
- return __WEBPACK_IMPORTED_MODULE_15__src_cubehelix__.a;
- });
- __webpack_require__(882);
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function linear(a, d) {
- return function(t) {
- return a + t * d;
- };
- }
- function exponential(a, b, y) {
- return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
- return Math.pow(a + t * b, y);
- };
- }
- function hue(a, b) {
- var d = b - a;
- return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant__.a)(isNaN(a) ? b : a);
- }
- function gamma(y) {
- return 1 == (y = +y) ? nogamma : function(a, b) {
- return b - a ? exponential(a, b, y) : Object(__WEBPACK_IMPORTED_MODULE_0__constant__.a)(isNaN(a) ? b : a);
- };
- }
- function nogamma(a, b) {
- var d = b - a;
- return d ? linear(a, d) : Object(__WEBPACK_IMPORTED_MODULE_0__constant__.a)(isNaN(a) ? b : a);
- }
- __webpack_exports__.c = hue, __webpack_exports__.b = gamma, __webpack_exports__.a = nogamma;
- var __WEBPACK_IMPORTED_MODULE_0__constant__ = __webpack_require__(348);
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_exports__.a = function(s) {
- return s.match(/.{6}/g).map(function(x) {
- return "#" + x;
- });
- };
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _objectWithoutProperties(obj, keys) {
- var target = {};
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
- return target;
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
- }
- function _possibleConstructorReturn(self, call) {
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
- }
- function _inherits(subClass, superClass) {
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
- }
- var _class, _temp, __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0), __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__), __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(1), __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__), __WEBPACK_IMPORTED_MODULE_2__container_Layer__ = __webpack_require__(14), __WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__ = __webpack_require__(4), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
- Constructor;
- };
- }(), ErrorBar = (_temp = _class = function(_Component) {
- function ErrorBar() {
- return _classCallCheck(this, ErrorBar), _possibleConstructorReturn(this, (ErrorBar.__proto__ || Object.getPrototypeOf(ErrorBar)).apply(this, arguments));
- }
- return _inherits(ErrorBar, _Component), _createClass(ErrorBar, [ {
- key: "renderErrorBars",
- value: function() {
- var _props = this.props, offset = _props.offset, layout = _props.layout, width = _props.width, dataKey = _props.dataKey, data = _props.data, dataPointFormatter = _props.dataPointFormatter, xAxis = _props.xAxis, yAxis = _props.yAxis, others = _objectWithoutProperties(_props, [ "offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis" ]), props = Object(__WEBPACK_IMPORTED_MODULE_3__util_ReactUtils__.k)(others);
- return data.map(function(entry, i) {
- var _dataPointFormatter = dataPointFormatter(entry, dataKey), x = _dataPointFormatter.x, y = _dataPointFormatter.y, value = _dataPointFormatter.value, errorVal = _dataPointFormatter.errorVal;
- if (!errorVal) return null;
- var xMid = void 0, yMid = void 0, xMin = void 0, yMin = void 0, xMax = void 0, yMax = void 0, scale = void 0, coordsTop = void 0, coordsMid = void 0, coordsBot = void 0, lowBound = void 0, highBound = void 0;
- return Array.isArray(errorVal) ? (lowBound = errorVal[0], highBound = errorVal[1]) : (lowBound = errorVal,
- highBound = errorVal), "vertical" === layout ? (scale = xAxis.scale, xMid = value,
- yMid = y + offset, xMin = scale(xMid - lowBound), yMin = yMid + width, xMax = scale(xMid + highBound),
- yMax = yMid - width, coordsTop = {
- x1: xMax,
- y1: yMin,
- x2: xMax,
- y2: yMax
- }, coordsMid = {
- x1: xMin,
- y1: yMid,
- x2: xMax,
- y2: yMid
- }, coordsBot = {
- x1: xMin,
- y1: yMin,
- x2: xMin,
- y2: yMax
- }) : "horizontal" === layout && (scale = yAxis.scale, xMid = x + offset, yMid = value,
- xMin = xMid - width, xMax = xMid + width, yMin = scale(yMid - lowBound), yMax = scale(yMid + highBound),
- coordsTop = {
- x1: xMin,
- y1: yMax,
- x2: xMax,
- y2: yMax
- }, coordsMid = {
- x1: xMid,
- y1: yMin,
- x2: xMid,
- y2: yMax
- }, coordsBot = {
- x1: xMin,
- y1: yMin,
- x2: xMax,
- y2: yMin
- }), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__container_Layer__.a, _extends({
- className: "recharts-errorBar",
- key: i
- }, props), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("line", coordsTop), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("line", coordsMid), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("line", coordsBot));
- });
- }
- }, {
- key: "render",
- value: function() {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__container_Layer__.a, {
- className: "recharts-errorBars"
- }, this.renderErrorBars());
- }
- } ]), ErrorBar;
- }(__WEBPACK_IMPORTED_MODULE_0_react__.Component), _class.propTypes = {
- dataKey: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([ __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func ]).isRequired,
- data: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.array,
- xAxis: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- yAxis: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- layout: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- dataPointFormatter: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- stroke: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
- strokeWidth: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- width: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,
- offset: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number
- }, _class.defaultProps = {
- stroke: "black",
- strokeWidth: 1.5,
- width: 5,
- offset: 0,
- layout: "horizontal"
- }, _temp);
- __webpack_exports__.a = ErrorBar;
-}, function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- function _defineProperty(obj, key, value) {
- return key in obj ? Object.defineProperty(obj, key, {
- value: value,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : obj[key] = value, obj;
- }
- __webpack_require__.d(__webpack_exports__, "a", function() {
- return formatAxisMap;
- });
- var __WEBPACK_IMPORTED_MODULE_0__ChartUtils__ = __webpack_require__(16), _extends = Object.assign || function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
- }
- return target;
- }, formatAxisMap = function(props, axisMap, offset, axisType, chartName) {
- var width = props.width, height = props.height, layout = props.layout, ids = Object.keys(axisMap), steps = {
- left: offset.left,
- leftMirror: offset.left,
- right: width - offset.right,
- rightMirror: width - offset.right,
- top: offset.top,
- topMirror: offset.top,
- bottom: height - offset.bottom,
- bottomMirror: height - offset.bottom
- };
- return ids.reduce(function(result, id) {
- var axis = axisMap[id], orientation = axis.orientation, domain = axis.domain, _axis$padding = axis.padding, padding = void 0 === _axis$padding ? {} : _axis$padding, mirror = axis.mirror, reversed = axis.reversed, offsetKey = orientation + (mirror ? "Mirror" : ""), range = void 0, x = void 0, y = void 0, needSpace = void 0;
- range = "xAxis" === axisType ? [ offset.left + (padding.left || 0), offset.left + offset.width - (padding.right || 0) ] : "yAxis" === axisType ? "horizontal" === layout ? [ offset.top + offset.height - (padding.bottom || 0), offset.top + (padding.top || 0) ] : [ offset.top + (padding.top || 0), offset.top + offset.height - (padding.bottom || 0) ] : axis.range,
- reversed && (range = [ range[1], range[0] ]);
- var _parseScale = Object(__WEBPACK_IMPORTED_MODULE_0__ChartUtils__.A)(axis, chartName), scale = _parseScale.scale, realScaleType = _parseScale.realScaleType;
- scale.domain(domain).range(range), Object(__WEBPACK_IMPORTED_MODULE_0__ChartUtils__.c)(scale);
- var ticks = Object(__WEBPACK_IMPORTED_MODULE_0__ChartUtils__.v)(scale, _extends({}, axis, {
- realScaleType: realScaleType
- }));
- "xAxis" === axisType ? (needSpace = "top" === orientation && !mirror || "bottom" === orientation && mirror,
- x = offset.left, y = steps[offsetKey] - needSpace * axis.height) : "yAxis" === axisType && (needSpace = "left" === orientation && !mirror || "right" === orientation && mirror,
- x = steps[offsetKey] - needSpace * axis.width, y = offset.top);
- var finalAxis = _extends({}, axis, ticks, {
- realScaleType: realScaleType,
- x: x,
- y: y,
- scale: scale,
- width: "xAxis" === axisType ? offset.width : axis.width,
- height: "yAxis" === axisType ? offset.height : axis.height
- });
- return finalAxis.bandSize = Object(__WEBPACK_IMPORTED_MODULE_0__ChartUtils__.g)(finalAxis, ticks),
- axis.hide || "xAxis" !== axisType ? axis.hide || (steps[offsetKey] += (needSpace ? -1 : 1) * finalAxis.width) : steps[offsetKey] += (needSpace ? -1 : 1) * finalAxis.height,
- _extends({}, result, _defineProperty({}, id, finalAxis));
- }, {});
- };
-}, function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- var emptyObject = {};
- "production" !== process.env.NODE_ENV && Object.freeze(emptyObject), module.exports = emptyObject;
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- var emptyFunction = __webpack_require__(50), warning = emptyFunction;
- if ("production" !== process.env.NODE_ENV) {
- var printWarning = function(format) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
- var argIndex = 0, message = "Warning: " + format.replace(/%s/g, function() {
- return args[argIndex++];
- });
- "undefined" != typeof console && console.error(message);
- try {
- throw new Error(message);
- } catch (x) {}
- };
- warning = function(condition, format) {
- if (void 0 === format) throw new Error("` + ("`" + `warning(condition, format, ...args)`)) + ("`" + (` requires a warning message argument");
- if (0 !== format.indexOf("Failed Composite propType: ") && !condition) {
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) args[_key2 - 2] = arguments[_key2];
- printWarning.apply(void 0, [ format ].concat(args));
- }
- };
- }
- module.exports = warning;
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- "use strict";
- (function(process) {
- function checkDCE() {
- if ("undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE) {
- if ("production" !== process.env.NODE_ENV) throw new Error("^_^");
- try {
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
- } catch (err) {
- console.error(err);
- }
- }
- }
- "production" === process.env.NODE_ENV ? (checkDCE(), module.exports = __webpack_require__(378)) : module.exports = __webpack_require__(381);
- }).call(exports, __webpack_require__(2));
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function is(x, y) {
- return x === y ? 0 !== x || 0 !== y || 1 / x == 1 / y : x !== x && y !== y;
- }
- function shallowEqual(objA, objB) {
- if (is(objA, objB)) return !0;
- if ("object" != typeof objA || null === objA || "object" != typeof objB || null === objB) return !1;
- var keysA = Object.keys(objA), keysB = Object.keys(objB);
- if (keysA.length !== keysB.length) return !1;
- for (var i = 0; i < keysA.length; i++) if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) return !1;
- return !0;
- }
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- module.exports = shallowEqual;
-}, function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(149), min = Math.min;
- module.exports = function(it) {
- return it > 0 ? min(toInteger(it), 9007199254740991) : 0;
- };
-}, function(module, exports) {
- module.exports = !0;
-}, function(module, exports) {
- var id = 0, px = Math.random();
- module.exports = function(key) {
- return "Symbol(".concat(void 0 === key ? "" : key, ")_", (++id + px).toString(36));
- };
-}, function(module, exports) {
- exports.f = {}.propertyIsEnumerable;
-}, function(module, exports, __webpack_require__) {
- "use strict";
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule ? obj : {
- default: obj
- };
- }
- exports.__esModule = !0;
- var _iterator = __webpack_require__(396), _iterator2 = _interopRequireDefault(_iterator), _symbol = __webpack_require__(404), _symbol2 = _interopRequireDefault(_symbol), _typeof = "function" == typeof _symbol2.default && "symbol" == typeof _iterator2.default ? function(obj) {
- return typeof obj;
- } : function(obj) {
- return obj && "function" == typeof _symbol2.default && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj;
- };
- exports.default = "function" == typeof _symbol2.default && "symbol" === _typeof(_iterator2.default) ? function(obj) {
- return void 0 === obj ? "undefined" : _typeof(obj);
- } : function(obj) {
- return obj && "function" == typeof _symbol2.default && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : void 0 === obj ? "undefined" : _typeof(obj);
- };
-}, function(module, exports, __webpack_require__) {
- var anObject = __webpack_require__(52), dPs = __webpack_require__(400), enumBugKeys = __webpack_require__(152), IE_PROTO = __webpack_require__(150)("IE_PROTO"), Empty = function() {}, createDict = function() {
- var iframeDocument, iframe = __webpack_require__(225)("iframe"), i = enumBugKeys.length;
- for (iframe.style.display = "none", __webpack_require__(401).appendChild(iframe),
- iframe.src = "javascript:", iframeDocument = iframe.contentWindow.document, iframeDocument.open(),
- iframeDocument.write("
-