victory 37.1.1 → 37.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/victory.js +622 -48
- package/dist/victory.min.js +1 -1
- package/package.json +28 -28
package/dist/victory.js
CHANGED
|
@@ -15443,31 +15443,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15443
15443
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15444
15444
|
/* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
|
|
15445
15445
|
/* harmony export */ });
|
|
15446
|
-
/* harmony import */ var
|
|
15447
|
-
/* harmony import */ var
|
|
15448
|
-
/* harmony import */ var
|
|
15449
|
-
/* harmony import */ var
|
|
15450
|
-
/* harmony import */ var
|
|
15451
|
-
/* harmony import */ var
|
|
15452
|
-
/* harmony import */ var
|
|
15446
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
15447
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__);
|
|
15448
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
15449
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
15450
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
15451
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
15452
|
+
/* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
|
|
15453
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
15454
|
+
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
15455
|
+
|
|
15453
15456
|
|
|
15454
15457
|
|
|
15455
15458
|
|
|
15456
15459
|
|
|
15457
15460
|
|
|
15458
15461
|
const defaultProps = {
|
|
15459
|
-
groupComponent: /*#__PURE__*/
|
|
15462
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("g", null)
|
|
15460
15463
|
};
|
|
15461
15464
|
const VictoryPortal = initialProps => {
|
|
15462
15465
|
const props = {
|
|
15463
15466
|
...defaultProps,
|
|
15464
15467
|
...initialProps
|
|
15465
15468
|
};
|
|
15466
|
-
const id =
|
|
15467
|
-
const portalContext = (0,
|
|
15469
|
+
const id = lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default()();
|
|
15470
|
+
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
|
|
15468
15471
|
if (!portalContext) {
|
|
15469
15472
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
15470
|
-
|
|
15473
|
+
_victory_util_log__WEBPACK_IMPORTED_MODULE_4__.warn(msg);
|
|
15471
15474
|
}
|
|
15472
15475
|
const children = Array.isArray(props.children) ? props.children[0] : props.children;
|
|
15473
15476
|
const {
|
|
@@ -15478,15 +15481,15 @@ const VictoryPortal = initialProps => {
|
|
|
15478
15481
|
groupComponent,
|
|
15479
15482
|
standalone: false
|
|
15480
15483
|
} : {};
|
|
15481
|
-
const newProps =
|
|
15484
|
+
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
|
|
15482
15485
|
key: childProps.key ?? id
|
|
15483
15486
|
});
|
|
15484
|
-
const child = children && /*#__PURE__*/
|
|
15485
|
-
|
|
15487
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(children, newProps);
|
|
15488
|
+
react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
|
|
15486
15489
|
portalContext?.addChild(id, child);
|
|
15487
15490
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15488
15491
|
}, [props.children]);
|
|
15489
|
-
|
|
15492
|
+
react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
|
|
15490
15493
|
return () => portalContext?.removeChild(id);
|
|
15491
15494
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15492
15495
|
}, []);
|
|
@@ -16305,6 +16308,477 @@ const Whisker = initialProps => {
|
|
|
16305
16308
|
|
|
16306
16309
|
/***/ }),
|
|
16307
16310
|
|
|
16311
|
+
/***/ "../../victory-core/es/victory-theme/clean.js":
|
|
16312
|
+
/*!****************************************************!*\
|
|
16313
|
+
!*** ../../victory-core/es/victory-theme/clean.js ***!
|
|
16314
|
+
\****************************************************/
|
|
16315
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
16316
|
+
|
|
16317
|
+
"use strict";
|
|
16318
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16319
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16320
|
+
/* harmony export */ "clean": function() { return /* binding */ clean; }
|
|
16321
|
+
/* harmony export */ });
|
|
16322
|
+
// *
|
|
16323
|
+
// * Colors
|
|
16324
|
+
// *
|
|
16325
|
+
|
|
16326
|
+
const gray = {
|
|
16327
|
+
white: "#FFFFFF",
|
|
16328
|
+
"50": "#FAFAFA",
|
|
16329
|
+
"100": "#F2F2F2",
|
|
16330
|
+
"200": "#E8E8E8",
|
|
16331
|
+
"300": "#E0E0E0",
|
|
16332
|
+
"400": "#D1D1D1",
|
|
16333
|
+
"500": "#757575",
|
|
16334
|
+
"600": "#5C5C5C",
|
|
16335
|
+
"700": "#424242",
|
|
16336
|
+
"800": "#333333",
|
|
16337
|
+
"900": "#292929",
|
|
16338
|
+
black: "#0F0F0F"
|
|
16339
|
+
};
|
|
16340
|
+
const yellow = {
|
|
16341
|
+
"100": "#FFEAB6",
|
|
16342
|
+
"300": "#FFD66E",
|
|
16343
|
+
"500": "#FCB400",
|
|
16344
|
+
"900": "#B87503"
|
|
16345
|
+
};
|
|
16346
|
+
const orange = {
|
|
16347
|
+
"100": "#FEE2D5",
|
|
16348
|
+
"300": "#FFA981",
|
|
16349
|
+
"500": "#FF6F2C",
|
|
16350
|
+
"900": "#D74D26"
|
|
16351
|
+
};
|
|
16352
|
+
const red = {
|
|
16353
|
+
"100": "#FFDCE5",
|
|
16354
|
+
"300": "#FF9EB7",
|
|
16355
|
+
"500": "#F82B60",
|
|
16356
|
+
"900": "#BA1E45"
|
|
16357
|
+
};
|
|
16358
|
+
const pink = {
|
|
16359
|
+
"100": "#FFDAF6",
|
|
16360
|
+
"300": "#F99DE2",
|
|
16361
|
+
"500": "#FF08C2",
|
|
16362
|
+
"900": "#B2158B"
|
|
16363
|
+
};
|
|
16364
|
+
const purple = {
|
|
16365
|
+
"100": "#EDE3FE",
|
|
16366
|
+
"300": "#CDB0FF",
|
|
16367
|
+
"500": "#8B46FF",
|
|
16368
|
+
"900": "#6B1CB0"
|
|
16369
|
+
};
|
|
16370
|
+
const blue = {
|
|
16371
|
+
"100": "#CFDFFF",
|
|
16372
|
+
"300": "#9CC7FF",
|
|
16373
|
+
"500": "#2D7FF9",
|
|
16374
|
+
"900": "#2750AE"
|
|
16375
|
+
};
|
|
16376
|
+
const cyan = {
|
|
16377
|
+
"100": "#D0F0FD",
|
|
16378
|
+
"300": "#77D1F3",
|
|
16379
|
+
"500": "#18BFFF",
|
|
16380
|
+
"900": "#0B76B7"
|
|
16381
|
+
};
|
|
16382
|
+
const teal = {
|
|
16383
|
+
"100": "#C2F5E9",
|
|
16384
|
+
"300": "#72DDC3",
|
|
16385
|
+
"500": "#20D9D2",
|
|
16386
|
+
"900": "#06A09B"
|
|
16387
|
+
};
|
|
16388
|
+
const green = {
|
|
16389
|
+
"100": "#D1F7C4",
|
|
16390
|
+
"300": "#93E088",
|
|
16391
|
+
"500": "#20C933",
|
|
16392
|
+
"900": "#338A17"
|
|
16393
|
+
};
|
|
16394
|
+
const colors = {
|
|
16395
|
+
blue: blue["500"],
|
|
16396
|
+
pink: pink["500"],
|
|
16397
|
+
teal: teal["500"],
|
|
16398
|
+
purple: purple["500"],
|
|
16399
|
+
green: green["500"],
|
|
16400
|
+
orange: orange["500"],
|
|
16401
|
+
cyan: cyan["500"],
|
|
16402
|
+
red: red["500"],
|
|
16403
|
+
yellow: yellow["500"]
|
|
16404
|
+
};
|
|
16405
|
+
const colorScale = Object.values(colors);
|
|
16406
|
+
const grayscale = [gray["200"], gray["400"], gray["600"], gray["900"]];
|
|
16407
|
+
const warm = [yellow["500"], orange["500"], red["500"], pink["500"]];
|
|
16408
|
+
const cool = [cyan["500"], teal["500"], blue["500"], purple["500"]];
|
|
16409
|
+
const heatmap = [green["500"], yellow["500"], red["500"]];
|
|
16410
|
+
const redPalette = [red["500"], red["300"], red["100"]];
|
|
16411
|
+
const greenPalette = [green["500"], green["300"], green["100"]];
|
|
16412
|
+
const bluePalette = [blue["500"], blue["300"], blue["100"]];
|
|
16413
|
+
|
|
16414
|
+
// *
|
|
16415
|
+
// * Typography
|
|
16416
|
+
// *
|
|
16417
|
+
const sansSerif = "'Inter', 'Helvetica Neue', 'Seravek', 'Helvetica', sans-serif";
|
|
16418
|
+
const letterSpacing = "normal";
|
|
16419
|
+
const fontSize = 12;
|
|
16420
|
+
// *
|
|
16421
|
+
// * Layout
|
|
16422
|
+
// *
|
|
16423
|
+
const padding = 8;
|
|
16424
|
+
const baseProps = {
|
|
16425
|
+
width: 450,
|
|
16426
|
+
height: 300,
|
|
16427
|
+
padding: 50,
|
|
16428
|
+
colorScale
|
|
16429
|
+
};
|
|
16430
|
+
// *
|
|
16431
|
+
// * Labels
|
|
16432
|
+
// *
|
|
16433
|
+
const baseLabelStyles = {
|
|
16434
|
+
fontFamily: sansSerif,
|
|
16435
|
+
fontSize,
|
|
16436
|
+
fontWeight: 300,
|
|
16437
|
+
letterSpacing,
|
|
16438
|
+
padding,
|
|
16439
|
+
fill: gray["900"],
|
|
16440
|
+
stroke: "transparent"
|
|
16441
|
+
};
|
|
16442
|
+
const centeredLabelStyles = Object.assign({
|
|
16443
|
+
textAnchor: "middle"
|
|
16444
|
+
}, baseLabelStyles);
|
|
16445
|
+
|
|
16446
|
+
// *
|
|
16447
|
+
// * Strokes
|
|
16448
|
+
// *
|
|
16449
|
+
const strokeDasharray = "10, 5";
|
|
16450
|
+
const strokeLinecap = "round";
|
|
16451
|
+
const strokeLinejoin = "round";
|
|
16452
|
+
const borderRadius = 1;
|
|
16453
|
+
// *
|
|
16454
|
+
// * Theme
|
|
16455
|
+
// *
|
|
16456
|
+
const clean = {
|
|
16457
|
+
palette: {
|
|
16458
|
+
colors,
|
|
16459
|
+
grayscale,
|
|
16460
|
+
qualitative: colorScale,
|
|
16461
|
+
heatmap,
|
|
16462
|
+
warm,
|
|
16463
|
+
cool,
|
|
16464
|
+
red: redPalette,
|
|
16465
|
+
green: greenPalette,
|
|
16466
|
+
blue: bluePalette
|
|
16467
|
+
},
|
|
16468
|
+
area: Object.assign({
|
|
16469
|
+
style: {
|
|
16470
|
+
data: {
|
|
16471
|
+
fill: blue["500"],
|
|
16472
|
+
strokeWidth: 2,
|
|
16473
|
+
fillOpacity: 0.5
|
|
16474
|
+
},
|
|
16475
|
+
labels: baseLabelStyles
|
|
16476
|
+
}
|
|
16477
|
+
}, baseProps),
|
|
16478
|
+
axis: Object.assign({
|
|
16479
|
+
style: {
|
|
16480
|
+
axis: {
|
|
16481
|
+
fill: "transparent",
|
|
16482
|
+
stroke: gray["500"],
|
|
16483
|
+
strokeWidth: 1,
|
|
16484
|
+
strokeLinecap,
|
|
16485
|
+
strokeLinejoin
|
|
16486
|
+
},
|
|
16487
|
+
axisLabel: Object.assign({}, centeredLabelStyles, {
|
|
16488
|
+
padding,
|
|
16489
|
+
stroke: "transparent"
|
|
16490
|
+
}),
|
|
16491
|
+
grid: {
|
|
16492
|
+
fill: "none",
|
|
16493
|
+
stroke: "none",
|
|
16494
|
+
painterEvents: "painted"
|
|
16495
|
+
},
|
|
16496
|
+
ticks: {
|
|
16497
|
+
fill: "transparent",
|
|
16498
|
+
size: 5,
|
|
16499
|
+
stroke: "transparent"
|
|
16500
|
+
},
|
|
16501
|
+
tickLabels: baseLabelStyles
|
|
16502
|
+
}
|
|
16503
|
+
}, baseProps),
|
|
16504
|
+
polarAxis: Object.assign({
|
|
16505
|
+
style: {
|
|
16506
|
+
axis: {
|
|
16507
|
+
stroke: gray["500"]
|
|
16508
|
+
},
|
|
16509
|
+
grid: {
|
|
16510
|
+
stroke: gray["400"],
|
|
16511
|
+
strokeDasharray,
|
|
16512
|
+
strokeLinecap,
|
|
16513
|
+
strokeLinejoin,
|
|
16514
|
+
pointerEvents: "painted"
|
|
16515
|
+
},
|
|
16516
|
+
ticks: {
|
|
16517
|
+
fill: "transparent",
|
|
16518
|
+
size: 5,
|
|
16519
|
+
stroke: gray["400"],
|
|
16520
|
+
strokeWidth: 1,
|
|
16521
|
+
strokeLinecap,
|
|
16522
|
+
strokeLinejoin
|
|
16523
|
+
},
|
|
16524
|
+
tickLabels: baseLabelStyles
|
|
16525
|
+
}
|
|
16526
|
+
}),
|
|
16527
|
+
polarDependentAxis: Object.assign({
|
|
16528
|
+
style: {
|
|
16529
|
+
axis: {
|
|
16530
|
+
stroke: gray["500"]
|
|
16531
|
+
},
|
|
16532
|
+
grid: {
|
|
16533
|
+
stroke: gray["400"],
|
|
16534
|
+
strokeDasharray,
|
|
16535
|
+
strokeLinecap,
|
|
16536
|
+
strokeLinejoin,
|
|
16537
|
+
pointerEvents: "painted"
|
|
16538
|
+
},
|
|
16539
|
+
ticks: {
|
|
16540
|
+
fill: "transparent",
|
|
16541
|
+
size: 5,
|
|
16542
|
+
stroke: gray["300"],
|
|
16543
|
+
strokeWidth: 1,
|
|
16544
|
+
strokeLinecap,
|
|
16545
|
+
strokeLinejoin
|
|
16546
|
+
},
|
|
16547
|
+
tickLabels: baseLabelStyles
|
|
16548
|
+
}
|
|
16549
|
+
}),
|
|
16550
|
+
bar: Object.assign({
|
|
16551
|
+
style: {
|
|
16552
|
+
data: {
|
|
16553
|
+
fill: blue["500"],
|
|
16554
|
+
padding,
|
|
16555
|
+
strokeWidth: 1,
|
|
16556
|
+
fillOpacity: 0.5
|
|
16557
|
+
},
|
|
16558
|
+
labels: baseLabelStyles
|
|
16559
|
+
},
|
|
16560
|
+
cornerRadius: {
|
|
16561
|
+
top: borderRadius
|
|
16562
|
+
}
|
|
16563
|
+
}, baseProps),
|
|
16564
|
+
boxplot: Object.assign({
|
|
16565
|
+
style: {
|
|
16566
|
+
max: {
|
|
16567
|
+
padding,
|
|
16568
|
+
stroke: gray["400"],
|
|
16569
|
+
strokeWidth: 2
|
|
16570
|
+
},
|
|
16571
|
+
maxLabels: Object.assign({}, baseLabelStyles, {
|
|
16572
|
+
padding: 3
|
|
16573
|
+
}),
|
|
16574
|
+
median: {
|
|
16575
|
+
padding,
|
|
16576
|
+
stroke: gray.white,
|
|
16577
|
+
strokeWidth: 2
|
|
16578
|
+
},
|
|
16579
|
+
medianLabels: Object.assign({}, baseLabelStyles, {
|
|
16580
|
+
padding: 3
|
|
16581
|
+
}),
|
|
16582
|
+
min: {
|
|
16583
|
+
padding,
|
|
16584
|
+
stroke: gray["400"],
|
|
16585
|
+
strokeWidth: 2
|
|
16586
|
+
},
|
|
16587
|
+
minLabels: Object.assign({}, baseLabelStyles, {
|
|
16588
|
+
padding: 3
|
|
16589
|
+
}),
|
|
16590
|
+
q1: {
|
|
16591
|
+
padding,
|
|
16592
|
+
fill: teal["500"],
|
|
16593
|
+
rx: borderRadius,
|
|
16594
|
+
strokeWidth: 2
|
|
16595
|
+
},
|
|
16596
|
+
q1Labels: Object.assign({}, baseLabelStyles, {
|
|
16597
|
+
padding: 3
|
|
16598
|
+
}),
|
|
16599
|
+
q3: {
|
|
16600
|
+
padding,
|
|
16601
|
+
fill: cyan["500"],
|
|
16602
|
+
rx: borderRadius
|
|
16603
|
+
},
|
|
16604
|
+
q3Labels: Object.assign({}, baseLabelStyles, {
|
|
16605
|
+
padding: 3
|
|
16606
|
+
})
|
|
16607
|
+
},
|
|
16608
|
+
boxWidth: 20
|
|
16609
|
+
}, baseProps),
|
|
16610
|
+
candlestick: Object.assign({
|
|
16611
|
+
style: {
|
|
16612
|
+
data: {
|
|
16613
|
+
stroke: gray["300"],
|
|
16614
|
+
strokeWidth: 0,
|
|
16615
|
+
rx: borderRadius
|
|
16616
|
+
},
|
|
16617
|
+
labels: Object.assign({}, baseLabelStyles, {
|
|
16618
|
+
padding: 5
|
|
16619
|
+
})
|
|
16620
|
+
},
|
|
16621
|
+
candleColors: {
|
|
16622
|
+
positive: teal["500"],
|
|
16623
|
+
negative: orange["500"]
|
|
16624
|
+
},
|
|
16625
|
+
wickStrokeWidth: 2
|
|
16626
|
+
}, baseProps),
|
|
16627
|
+
chart: baseProps,
|
|
16628
|
+
errorbar: Object.assign({
|
|
16629
|
+
borderWidth: 8,
|
|
16630
|
+
style: {
|
|
16631
|
+
data: {
|
|
16632
|
+
fill: "transparent",
|
|
16633
|
+
opacity: 1,
|
|
16634
|
+
stroke: gray["700"],
|
|
16635
|
+
strokeWidth: 2,
|
|
16636
|
+
strokeLinecap
|
|
16637
|
+
},
|
|
16638
|
+
labels: baseLabelStyles
|
|
16639
|
+
}
|
|
16640
|
+
}, baseProps),
|
|
16641
|
+
group: Object.assign({
|
|
16642
|
+
colorScale
|
|
16643
|
+
}, baseProps),
|
|
16644
|
+
histogram: Object.assign({
|
|
16645
|
+
style: {
|
|
16646
|
+
data: {
|
|
16647
|
+
fill: cyan["500"],
|
|
16648
|
+
fillOpacity: 0.5
|
|
16649
|
+
},
|
|
16650
|
+
labels: baseLabelStyles
|
|
16651
|
+
},
|
|
16652
|
+
binSpacing: 4,
|
|
16653
|
+
cornerRadius: {
|
|
16654
|
+
top: borderRadius
|
|
16655
|
+
}
|
|
16656
|
+
}, baseProps),
|
|
16657
|
+
label: baseLabelStyles,
|
|
16658
|
+
legend: {
|
|
16659
|
+
colorScale,
|
|
16660
|
+
gutter: 24,
|
|
16661
|
+
borderPadding: 10,
|
|
16662
|
+
orientation: "horizontal",
|
|
16663
|
+
titleOrientation: "top",
|
|
16664
|
+
centerTitle: true,
|
|
16665
|
+
style: {
|
|
16666
|
+
data: {
|
|
16667
|
+
type: "circle"
|
|
16668
|
+
},
|
|
16669
|
+
labels: {
|
|
16670
|
+
...baseLabelStyles,
|
|
16671
|
+
fontSize: 12
|
|
16672
|
+
},
|
|
16673
|
+
title: Object.assign({}, baseLabelStyles, {
|
|
16674
|
+
padding,
|
|
16675
|
+
fontSize: 16
|
|
16676
|
+
}),
|
|
16677
|
+
border: {
|
|
16678
|
+
stroke: gray["200"],
|
|
16679
|
+
strokeWidth: 2,
|
|
16680
|
+
padding: 16
|
|
16681
|
+
}
|
|
16682
|
+
}
|
|
16683
|
+
},
|
|
16684
|
+
line: Object.assign({
|
|
16685
|
+
style: {
|
|
16686
|
+
data: {
|
|
16687
|
+
fill: "transparent",
|
|
16688
|
+
opacity: 1,
|
|
16689
|
+
stroke: blue["500"],
|
|
16690
|
+
strokeWidth: 2,
|
|
16691
|
+
strokeLinecap,
|
|
16692
|
+
strokeLinejoin
|
|
16693
|
+
},
|
|
16694
|
+
labels: baseLabelStyles
|
|
16695
|
+
}
|
|
16696
|
+
}, baseProps),
|
|
16697
|
+
pie: Object.assign({
|
|
16698
|
+
style: {
|
|
16699
|
+
parent: {
|
|
16700
|
+
backgroundColor: gray.white
|
|
16701
|
+
},
|
|
16702
|
+
data: {
|
|
16703
|
+
padding,
|
|
16704
|
+
stroke: gray.white,
|
|
16705
|
+
strokeWidth: 1
|
|
16706
|
+
},
|
|
16707
|
+
labels: {
|
|
16708
|
+
...baseLabelStyles,
|
|
16709
|
+
padding: 20,
|
|
16710
|
+
fill: gray["600"],
|
|
16711
|
+
fontSize: 10
|
|
16712
|
+
}
|
|
16713
|
+
},
|
|
16714
|
+
colorScale,
|
|
16715
|
+
cornerRadius: borderRadius
|
|
16716
|
+
}, baseProps),
|
|
16717
|
+
scatter: Object.assign({
|
|
16718
|
+
style: {
|
|
16719
|
+
data: {
|
|
16720
|
+
fill: purple["500"],
|
|
16721
|
+
opacity: 1,
|
|
16722
|
+
stroke: "transparent",
|
|
16723
|
+
strokeWidth: 0
|
|
16724
|
+
},
|
|
16725
|
+
labels: {
|
|
16726
|
+
...baseLabelStyles,
|
|
16727
|
+
padding: 20
|
|
16728
|
+
}
|
|
16729
|
+
}
|
|
16730
|
+
}, baseProps),
|
|
16731
|
+
stack: Object.assign({
|
|
16732
|
+
colorScale
|
|
16733
|
+
}, baseProps),
|
|
16734
|
+
tooltip: {
|
|
16735
|
+
style: Object.assign({}, baseLabelStyles, {
|
|
16736
|
+
padding: 0,
|
|
16737
|
+
pointerEvents: "none"
|
|
16738
|
+
}),
|
|
16739
|
+
flyoutStyle: {
|
|
16740
|
+
stroke: gray["300"],
|
|
16741
|
+
strokeWidth: 2,
|
|
16742
|
+
fill: gray.white,
|
|
16743
|
+
pointerEvents: "none"
|
|
16744
|
+
},
|
|
16745
|
+
flyoutPadding: {
|
|
16746
|
+
top: 8,
|
|
16747
|
+
bottom: 8,
|
|
16748
|
+
left: 16,
|
|
16749
|
+
right: 16
|
|
16750
|
+
},
|
|
16751
|
+
cornerRadius: borderRadius,
|
|
16752
|
+
pointerLength: 4
|
|
16753
|
+
},
|
|
16754
|
+
voronoi: Object.assign({
|
|
16755
|
+
style: {
|
|
16756
|
+
data: {
|
|
16757
|
+
fill: blue["100"],
|
|
16758
|
+
stroke: blue["500"],
|
|
16759
|
+
strokeWidth: 2,
|
|
16760
|
+
opacity: 0.4
|
|
16761
|
+
},
|
|
16762
|
+
labels: Object.assign({}, baseLabelStyles, {
|
|
16763
|
+
padding: 5,
|
|
16764
|
+
pointerEvents: "none"
|
|
16765
|
+
}),
|
|
16766
|
+
flyout: {
|
|
16767
|
+
stroke: gray["900"],
|
|
16768
|
+
strokeWidth: 1,
|
|
16769
|
+
fill: gray["100"],
|
|
16770
|
+
pointerEvents: "none"
|
|
16771
|
+
},
|
|
16772
|
+
padding: {
|
|
16773
|
+
left: 2,
|
|
16774
|
+
bottom: 2
|
|
16775
|
+
}
|
|
16776
|
+
}
|
|
16777
|
+
}, baseProps)
|
|
16778
|
+
};
|
|
16779
|
+
|
|
16780
|
+
/***/ }),
|
|
16781
|
+
|
|
16308
16782
|
/***/ "../../victory-core/es/victory-theme/grayscale.js":
|
|
16309
16783
|
/*!********************************************************!*\
|
|
16310
16784
|
!*** ../../victory-core/es/victory-theme/grayscale.js ***!
|
|
@@ -16319,9 +16793,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16319
16793
|
// *
|
|
16320
16794
|
// * Colors
|
|
16321
16795
|
// *
|
|
16322
|
-
const colors =
|
|
16796
|
+
const colors = {
|
|
16797
|
+
blue: "#4F7DA1",
|
|
16798
|
+
pink: "#E2A37F",
|
|
16799
|
+
teal: "#00796B",
|
|
16800
|
+
purple: "#DF948A",
|
|
16801
|
+
green: "#8BC34A",
|
|
16802
|
+
orange: "#F4511E",
|
|
16803
|
+
cyan: "#006064",
|
|
16804
|
+
red: "#DF5A49",
|
|
16805
|
+
yellow: "#FFF59D"
|
|
16806
|
+
};
|
|
16807
|
+
const colorScale = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
|
|
16323
16808
|
const charcoal = "#252525";
|
|
16324
16809
|
const grey = "#969696";
|
|
16810
|
+
const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
|
|
16811
|
+
const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
|
|
16812
|
+
const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
|
|
16813
|
+
const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
|
|
16814
|
+
const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
|
|
16815
|
+
const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
|
|
16816
|
+
const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
|
|
16817
|
+
|
|
16325
16818
|
// *
|
|
16326
16819
|
// * Typography
|
|
16327
16820
|
// *
|
|
@@ -16335,7 +16828,7 @@ const baseProps = {
|
|
|
16335
16828
|
width: 450,
|
|
16336
16829
|
height: 300,
|
|
16337
16830
|
padding: 50,
|
|
16338
|
-
colorScale
|
|
16831
|
+
colorScale
|
|
16339
16832
|
};
|
|
16340
16833
|
// *
|
|
16341
16834
|
// * Labels
|
|
@@ -16357,6 +16850,17 @@ const centeredLabelStyles = Object.assign({
|
|
|
16357
16850
|
const strokeLinecap = "round";
|
|
16358
16851
|
const strokeLinejoin = "round";
|
|
16359
16852
|
const grayscale = {
|
|
16853
|
+
palette: {
|
|
16854
|
+
colors,
|
|
16855
|
+
grayscale: colorScale,
|
|
16856
|
+
qualitative,
|
|
16857
|
+
heatmap,
|
|
16858
|
+
warm,
|
|
16859
|
+
cool,
|
|
16860
|
+
red,
|
|
16861
|
+
green,
|
|
16862
|
+
blue
|
|
16863
|
+
},
|
|
16360
16864
|
area: Object.assign({
|
|
16361
16865
|
style: {
|
|
16362
16866
|
data: {
|
|
@@ -16471,7 +16975,7 @@ const grayscale = {
|
|
|
16471
16975
|
}
|
|
16472
16976
|
}, baseProps),
|
|
16473
16977
|
group: Object.assign({
|
|
16474
|
-
colorScale
|
|
16978
|
+
colorScale
|
|
16475
16979
|
}, baseProps),
|
|
16476
16980
|
histogram: Object.assign({
|
|
16477
16981
|
style: {
|
|
@@ -16484,7 +16988,7 @@ const grayscale = {
|
|
|
16484
16988
|
}
|
|
16485
16989
|
}, baseProps),
|
|
16486
16990
|
legend: {
|
|
16487
|
-
colorScale
|
|
16991
|
+
colorScale,
|
|
16488
16992
|
gutter: 10,
|
|
16489
16993
|
orientation: "vertical",
|
|
16490
16994
|
titleOrientation: "top",
|
|
@@ -16519,7 +17023,7 @@ const grayscale = {
|
|
|
16519
17023
|
padding: 20
|
|
16520
17024
|
})
|
|
16521
17025
|
},
|
|
16522
|
-
colorScale
|
|
17026
|
+
colorScale,
|
|
16523
17027
|
width: 400,
|
|
16524
17028
|
height: 400,
|
|
16525
17029
|
padding: 50
|
|
@@ -16535,7 +17039,7 @@ const grayscale = {
|
|
|
16535
17039
|
}
|
|
16536
17040
|
}, baseProps),
|
|
16537
17041
|
stack: Object.assign({
|
|
16538
|
-
colorScale
|
|
17042
|
+
colorScale
|
|
16539
17043
|
}, baseProps),
|
|
16540
17044
|
tooltip: {
|
|
16541
17045
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -16595,11 +17099,31 @@ const lime300 = "#DCE775";
|
|
|
16595
17099
|
const lightGreen500 = "#8BC34A";
|
|
16596
17100
|
const teal700 = "#00796B";
|
|
16597
17101
|
const cyan900 = "#006064";
|
|
16598
|
-
const
|
|
17102
|
+
const colorScale = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
|
|
16599
17103
|
const blueGrey50 = "#ECEFF1";
|
|
16600
17104
|
const blueGrey300 = "#90A4AE";
|
|
16601
17105
|
const blueGrey700 = "#455A64";
|
|
16602
17106
|
const grey900 = "#212121";
|
|
17107
|
+
const colors = {
|
|
17108
|
+
blue: "#4F7DA1",
|
|
17109
|
+
pink: "#E2A37F",
|
|
17110
|
+
teal: teal700,
|
|
17111
|
+
purple: "#DF948A",
|
|
17112
|
+
green: lightGreen500,
|
|
17113
|
+
orange: deepOrange600,
|
|
17114
|
+
cyan: cyan900,
|
|
17115
|
+
red: "#DF5A49",
|
|
17116
|
+
yellow: yellow200
|
|
17117
|
+
};
|
|
17118
|
+
const grayscale = [blueGrey50, blueGrey300, blueGrey700, grey900];
|
|
17119
|
+
const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
|
|
17120
|
+
const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
|
|
17121
|
+
const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
|
|
17122
|
+
const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
|
|
17123
|
+
const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
|
|
17124
|
+
const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
|
|
17125
|
+
const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
|
|
17126
|
+
|
|
16603
17127
|
// *
|
|
16604
17128
|
// * Typography
|
|
16605
17129
|
// *
|
|
@@ -16637,6 +17161,17 @@ const strokeDasharray = "10, 5";
|
|
|
16637
17161
|
const strokeLinecap = "round";
|
|
16638
17162
|
const strokeLinejoin = "round";
|
|
16639
17163
|
const material = {
|
|
17164
|
+
palette: {
|
|
17165
|
+
colors,
|
|
17166
|
+
grayscale,
|
|
17167
|
+
qualitative,
|
|
17168
|
+
heatmap,
|
|
17169
|
+
warm,
|
|
17170
|
+
cool,
|
|
17171
|
+
red,
|
|
17172
|
+
green,
|
|
17173
|
+
blue
|
|
17174
|
+
},
|
|
16640
17175
|
area: Object.assign({
|
|
16641
17176
|
style: {
|
|
16642
17177
|
data: {
|
|
@@ -16769,7 +17304,7 @@ const material = {
|
|
|
16769
17304
|
}
|
|
16770
17305
|
}, baseProps),
|
|
16771
17306
|
group: Object.assign({
|
|
16772
|
-
colorScale
|
|
17307
|
+
colorScale
|
|
16773
17308
|
}, baseProps),
|
|
16774
17309
|
histogram: Object.assign({
|
|
16775
17310
|
style: {
|
|
@@ -16782,7 +17317,7 @@ const material = {
|
|
|
16782
17317
|
}
|
|
16783
17318
|
}, baseProps),
|
|
16784
17319
|
legend: {
|
|
16785
|
-
colorScale
|
|
17320
|
+
colorScale,
|
|
16786
17321
|
gutter: 10,
|
|
16787
17322
|
orientation: "vertical",
|
|
16788
17323
|
titleOrientation: "top",
|
|
@@ -16808,7 +17343,7 @@ const material = {
|
|
|
16808
17343
|
}
|
|
16809
17344
|
}, baseProps),
|
|
16810
17345
|
pie: Object.assign({
|
|
16811
|
-
colorScale
|
|
17346
|
+
colorScale,
|
|
16812
17347
|
style: {
|
|
16813
17348
|
data: {
|
|
16814
17349
|
padding,
|
|
@@ -16832,7 +17367,7 @@ const material = {
|
|
|
16832
17367
|
}
|
|
16833
17368
|
}, baseProps),
|
|
16834
17369
|
stack: Object.assign({
|
|
16835
|
-
colorScale
|
|
17370
|
+
colorScale
|
|
16836
17371
|
}, baseProps),
|
|
16837
17372
|
tooltip: {
|
|
16838
17373
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -16885,12 +17420,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16885
17420
|
/* harmony export */ });
|
|
16886
17421
|
/* harmony import */ var _grayscale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grayscale */ "../../victory-core/es/victory-theme/grayscale.js");
|
|
16887
17422
|
/* harmony import */ var _material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./material */ "../../victory-core/es/victory-theme/material.js");
|
|
17423
|
+
/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./clean */ "../../victory-core/es/victory-theme/clean.js");
|
|
17424
|
+
|
|
16888
17425
|
|
|
16889
17426
|
|
|
16890
17427
|
|
|
16891
17428
|
const VictoryTheme = {
|
|
16892
17429
|
grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
|
|
16893
|
-
material: _material__WEBPACK_IMPORTED_MODULE_1__.material
|
|
17430
|
+
material: _material__WEBPACK_IMPORTED_MODULE_1__.material,
|
|
17431
|
+
clean: _clean__WEBPACK_IMPORTED_MODULE_2__.clean
|
|
16894
17432
|
};
|
|
16895
17433
|
|
|
16896
17434
|
/***/ }),
|
|
@@ -20777,6 +21315,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20777
21315
|
/* harmony export */ "getColorScale": function() { return /* binding */ getColorScale; },
|
|
20778
21316
|
/* harmony export */ "toTransformString": function() { return /* binding */ toTransformString; }
|
|
20779
21317
|
/* harmony export */ });
|
|
21318
|
+
/* harmony import */ var _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../victory-theme/victory-theme */ "../../victory-core/es/victory-theme/victory-theme.js");
|
|
21319
|
+
|
|
21320
|
+
|
|
20780
21321
|
/**
|
|
20781
21322
|
* Given an object with CSS/SVG transform definitions, return the string value
|
|
20782
21323
|
* for use with the `transform` CSS property or SVG attribute. Note that we
|
|
@@ -20813,20 +21354,37 @@ const toTransformString = function (obj) {
|
|
|
20813
21354
|
* of 5 hex string values in that color scale. If no 'name' parameter
|
|
20814
21355
|
* is given, it will return the Victory default grayscale.
|
|
20815
21356
|
* @param {String} name The name of the color scale to return (optional).
|
|
21357
|
+
* @param {Object} theme The theme object to retrieve the color scale from (optional).
|
|
20816
21358
|
* @returns {Array} An array of 5 hex string values composing a color scale.
|
|
20817
21359
|
*/
|
|
20818
|
-
function getColorScale(name) {
|
|
21360
|
+
function getColorScale(name, theme) {
|
|
21361
|
+
if (theme === void 0) {
|
|
21362
|
+
theme = _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__.VictoryTheme.material;
|
|
21363
|
+
}
|
|
21364
|
+
const {
|
|
21365
|
+
palette: {
|
|
21366
|
+
grayscale = ["#cccccc", "#969696", "#636363", "#252525"],
|
|
21367
|
+
qualitative = [],
|
|
21368
|
+
heatmap = [],
|
|
21369
|
+
warm = [],
|
|
21370
|
+
cool = [],
|
|
21371
|
+
red = [],
|
|
21372
|
+
blue = [],
|
|
21373
|
+
green = []
|
|
21374
|
+
} = {}
|
|
21375
|
+
} = theme;
|
|
20819
21376
|
const scales = {
|
|
20820
|
-
grayscale
|
|
20821
|
-
qualitative
|
|
20822
|
-
heatmap
|
|
20823
|
-
warm
|
|
20824
|
-
cool
|
|
20825
|
-
red
|
|
20826
|
-
blue
|
|
20827
|
-
green
|
|
21377
|
+
grayscale,
|
|
21378
|
+
qualitative,
|
|
21379
|
+
heatmap,
|
|
21380
|
+
warm,
|
|
21381
|
+
cool,
|
|
21382
|
+
red,
|
|
21383
|
+
blue,
|
|
21384
|
+
green
|
|
20828
21385
|
};
|
|
20829
|
-
|
|
21386
|
+
const selectedScale = name && scales[name]?.length ? scales[name] : scales.grayscale;
|
|
21387
|
+
return selectedScale;
|
|
20830
21388
|
}
|
|
20831
21389
|
|
|
20832
21390
|
/***/ }),
|
|
@@ -20853,6 +21411,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20853
21411
|
/* eslint-disable no-magic-numbers */
|
|
20854
21412
|
// Based on measuring specific character widths
|
|
20855
21413
|
// as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
|
|
21414
|
+
// For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
|
|
20856
21415
|
// prettier-ignore
|
|
20857
21416
|
const fonts = {
|
|
20858
21417
|
"American Typewriter": {
|
|
@@ -20911,6 +21470,10 @@ const fonts = {
|
|
|
20911
21470
|
widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2359375, 0.2234375, 0.3921875, 0.7125, 0.49375, 0.8859375, 0.771875, 0.2125, 0.3078125, 0.309375, 0.375, 0.4234375, 0.234375, 0.3125, 0.234375, 0.3, 0.5828125, 0.365625, 0.434375, 0.3921875, 0.5234375, 0.3984375, 0.5125, 0.4328125, 0.46875, 0.5125, 0.234375, 0.234375, 0.515625, 0.4234375, 0.515625, 0.340625, 0.7609375, 0.7359375, 0.6359375, 0.721875, 0.8125, 0.6375, 0.5875, 0.8078125, 0.853125, 0.4296875, 0.503125, 0.78125, 0.609375, 0.9609375, 0.8515625, 0.8140625, 0.6125, 0.8140625, 0.71875, 0.49375, 0.7125, 0.76875, 0.771875, 1.125, 0.7765625, 0.7734375, 0.65625, 0.321875, 0.3078125, 0.321875, 0.3546875, 0.5, 0.3375, 0.446875, 0.5359375, 0.45, 0.5296875, 0.4546875, 0.425, 0.4921875, 0.54375, 0.2671875, 0.240625, 0.5390625, 0.25, 0.815625, 0.5375, 0.5234375, 0.5390625, 0.5421875, 0.365625, 0.36875, 0.35625, 0.5171875, 0.5015625, 0.75, 0.5, 0.509375, 0.44375, 0.2421875, 0.14375, 0.2421875, 0.35],
|
|
20912
21471
|
avg: 0.5116447368421051
|
|
20913
21472
|
},
|
|
21473
|
+
"Inter": {
|
|
21474
|
+
widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2796875, 0.2890625, 0.4671875, 0.634375, 0.6421875, 0.9828125, 0.6453125, 0.3, 0.365625, 0.365625, 0.5015625, 0.6625, 0.2890625, 0.4609375, 0.2890625, 0.3609375, 0.63125, 0.4078125, 0.6109375, 0.61875, 0.646875, 0.59375, 0.6203125, 0.5671875, 0.61875, 0.6203125, 0.2890625, 0.303125, 0.6625, 0.6625, 0.6625, 0.5125, 0.9671875, 0.690625, 0.6546875, 0.73125, 0.721875, 0.6015625, 0.590625, 0.746875, 0.74375, 0.26875, 0.571875, 0.671875, 0.565625, 0.9046875, 0.7546875, 0.765625, 0.6390625, 0.765625, 0.64375, 0.6421875, 0.646875, 0.7453125, 0.690625, 0.9859375, 0.6828125, 0.6796875, 0.6296875, 0.365625, 0.3609375, 0.365625, 0.471875, 0.45625, 0.3234375, 0.5625, 0.6125, 0.571875, 0.6125, 0.584375, 0.3703125, 0.6140625, 0.5921875, 0.2421875, 0.2548828125, 0.55, 0.2421875, 0.8765625, 0.5921875, 0.6, 0.6125, 0.6125, 0.3765625, 0.528125, 0.328125, 0.5921875, 0.5625, 0.81875, 0.546875, 0.5625, 0.553125, 0.4265625, 0.3328125, 0.4265625, 0.6625],
|
|
21475
|
+
avg: 0.5624362664473683
|
|
21476
|
+
},
|
|
20914
21477
|
"Montserrat": {
|
|
20915
21478
|
widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2625, 0.2609375, 0.3734375, 0.696875, 0.615625, 0.8296875, 0.6703125, 0.203125, 0.3296875, 0.3296875, 0.3875, 0.575, 0.2125, 0.3828125, 0.2125, 0.3953125, 0.6625, 0.3625, 0.56875, 0.5640625, 0.6625, 0.5671875, 0.609375, 0.5890625, 0.6390625, 0.609375, 0.2125, 0.2125, 0.575, 0.575, 0.575, 0.5671875, 1.034375, 0.7171875, 0.7546875, 0.7203125, 0.8265625, 0.6703125, 0.634375, 0.7734375, 0.8140625, 0.303125, 0.5078125, 0.7125, 0.5890625, 0.95625, 0.8140625, 0.8390625, 0.71875, 0.8390625, 0.7234375, 0.615625, 0.575, 0.7921875, 0.6984375, 1.1125, 0.65625, 0.6359375, 0.6515625, 0.31875, 0.396875, 0.31875, 0.5765625, 0.5, 0.6, 0.590625, 0.678125, 0.5640625, 0.678125, 0.6046875, 0.375, 0.6875, 0.678125, 0.2703125, 0.365625, 0.6015625, 0.2703125, 1.0625, 0.678125, 0.628125, 0.678125, 0.678125, 0.4015625, 0.4890625, 0.40625, 0.6734375, 0.5421875, 0.8796875, 0.534375, 0.5671875, 0.5125, 0.334375, 0.2953125, 0.334375, 0.575],
|
|
20916
21479
|
avg: 0.571792763157895
|
|
@@ -22063,7 +22626,9 @@ function getAllEvents(props) {
|
|
|
22063
22626
|
}
|
|
22064
22627
|
return events || [];
|
|
22065
22628
|
}
|
|
22066
|
-
|
|
22629
|
+
|
|
22630
|
+
// eslint-disable-next-line max-params
|
|
22631
|
+
function getColor(calculatedProps, child, index, theme) {
|
|
22067
22632
|
// check for styles first
|
|
22068
22633
|
const {
|
|
22069
22634
|
style
|
|
@@ -22080,14 +22645,16 @@ function getColor(calculatedProps, child, index) {
|
|
|
22080
22645
|
if (!colorScale && !color) {
|
|
22081
22646
|
return undefined;
|
|
22082
22647
|
}
|
|
22083
|
-
const colors = Array.isArray(colorScale) ? colorScale : _style__WEBPACK_IMPORTED_MODULE_13__.getColorScale(colorScale);
|
|
22648
|
+
const colors = Array.isArray(colorScale) ? colorScale : _style__WEBPACK_IMPORTED_MODULE_13__.getColorScale(colorScale, theme);
|
|
22084
22649
|
return color || colors[index % colors.length];
|
|
22085
22650
|
}
|
|
22086
22651
|
function getStyle(theme, style, role) {
|
|
22087
22652
|
const defaultStyle = theme && theme[role] && theme[role].style ? theme[role].style : {};
|
|
22088
22653
|
return _helpers__WEBPACK_IMPORTED_MODULE_7__.getStyles(style, defaultStyle);
|
|
22089
22654
|
}
|
|
22090
|
-
|
|
22655
|
+
|
|
22656
|
+
// eslint-disable-next-line max-params
|
|
22657
|
+
function getChildStyle(child, index, calculatedProps, theme) {
|
|
22091
22658
|
const {
|
|
22092
22659
|
style,
|
|
22093
22660
|
role
|
|
@@ -22097,7 +22664,7 @@ function getChildStyle(child, index, calculatedProps) {
|
|
|
22097
22664
|
return childStyle;
|
|
22098
22665
|
}
|
|
22099
22666
|
const childRole = child.type && child.type.role;
|
|
22100
|
-
const defaultFill = childRole === "stack" ? undefined : getColor(calculatedProps, child, index);
|
|
22667
|
+
const defaultFill = childRole === "stack" ? undefined : getColor(calculatedProps, child, index, theme);
|
|
22101
22668
|
const defaultColor = childRole === "line" ? {
|
|
22102
22669
|
fill: "none",
|
|
22103
22670
|
stroke: defaultFill
|
|
@@ -23417,14 +23984,15 @@ function getChildren(initialProps, childComponents, calculatedProps) {
|
|
|
23417
23984
|
} = newCalculatedProps;
|
|
23418
23985
|
const {
|
|
23419
23986
|
labelComponent,
|
|
23420
|
-
polar
|
|
23987
|
+
polar,
|
|
23988
|
+
theme
|
|
23421
23989
|
} = props;
|
|
23422
23990
|
const childProps = getChildProps(props, newCalculatedProps);
|
|
23423
23991
|
const parentName = props.name || "group";
|
|
23424
23992
|
return children.map((child, index) => {
|
|
23425
23993
|
const role = child.type && child.type.role;
|
|
23426
23994
|
const xOffset = polar ? getPolarX0(props, newCalculatedProps, index, role) : getX0(props, newCalculatedProps, index, role);
|
|
23427
|
-
const style = role === "voronoi" || role === "tooltip" || role === "label" ? child.props.style : victory_core__WEBPACK_IMPORTED_MODULE_3__.getChildStyle(child, index, newCalculatedProps);
|
|
23995
|
+
const style = role === "voronoi" || role === "tooltip" || role === "label" ? child.props.style : victory_core__WEBPACK_IMPORTED_MODULE_3__.getChildStyle(child, index, newCalculatedProps, theme);
|
|
23428
23996
|
const labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
|
|
23429
23997
|
const name = child.props.name || `${parentName}-${role}-${index}`;
|
|
23430
23998
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, Object.assign({
|
|
@@ -24064,9 +24632,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24064
24632
|
|
|
24065
24633
|
const getColorScale = props => {
|
|
24066
24634
|
const {
|
|
24067
|
-
colorScale
|
|
24635
|
+
colorScale,
|
|
24636
|
+
theme
|
|
24068
24637
|
} = props;
|
|
24069
|
-
return typeof colorScale === "string" ? victory_core__WEBPACK_IMPORTED_MODULE_3__.getColorScale(colorScale) : colorScale || [];
|
|
24638
|
+
return typeof colorScale === "string" ? victory_core__WEBPACK_IMPORTED_MODULE_3__.getColorScale(colorScale, theme) : colorScale || [];
|
|
24070
24639
|
};
|
|
24071
24640
|
const getLabelStyles = props => {
|
|
24072
24641
|
const {
|
|
@@ -24928,11 +25497,12 @@ const getSlices = (props, data) => {
|
|
|
24928
25497
|
};
|
|
24929
25498
|
const getCalculatedValues = props => {
|
|
24930
25499
|
const {
|
|
24931
|
-
colorScale
|
|
25500
|
+
colorScale,
|
|
25501
|
+
theme
|
|
24932
25502
|
} = props;
|
|
24933
25503
|
const styleObject = victory_core__WEBPACK_IMPORTED_MODULE_3__.getDefaultStyles(props, "pie");
|
|
24934
25504
|
const style = victory_core__WEBPACK_IMPORTED_MODULE_3__.getStyles(props.style, styleObject);
|
|
24935
|
-
const colors = Array.isArray(colorScale) ? colorScale : victory_core__WEBPACK_IMPORTED_MODULE_4__.getColorScale(colorScale);
|
|
25505
|
+
const colors = Array.isArray(colorScale) ? colorScale : victory_core__WEBPACK_IMPORTED_MODULE_4__.getColorScale(colorScale, theme);
|
|
24936
25506
|
const padding = victory_core__WEBPACK_IMPORTED_MODULE_3__.getPadding(props);
|
|
24937
25507
|
const defaultRadius = getRadius(props, padding);
|
|
24938
25508
|
const origin = getOrigin(props, padding);
|
|
@@ -27267,10 +27837,13 @@ function getChildren(initialProps, childComponents, calculatedProps) {
|
|
|
27267
27837
|
} = newCalculatedProps;
|
|
27268
27838
|
const childProps = getChildProps(props, newCalculatedProps);
|
|
27269
27839
|
const parentName = props.name || "stack";
|
|
27840
|
+
const {
|
|
27841
|
+
theme
|
|
27842
|
+
} = props;
|
|
27270
27843
|
return children.map((child, index) => {
|
|
27271
27844
|
const role = child.type && child.type.role;
|
|
27272
27845
|
const data = datasets[index];
|
|
27273
|
-
const style = victory_core__WEBPACK_IMPORTED_MODULE_3__.getChildStyle(child, index, newCalculatedProps);
|
|
27846
|
+
const style = victory_core__WEBPACK_IMPORTED_MODULE_3__.getChildStyle(child, index, newCalculatedProps, theme);
|
|
27274
27847
|
const labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
|
|
27275
27848
|
const name = child.props.name || `${parentName}-${role}-${index}`;
|
|
27276
27849
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(child, Object.assign({
|
|
@@ -29004,6 +29577,7 @@ class VoronoiHelpersClass {
|
|
|
29004
29577
|
}
|
|
29005
29578
|
}
|
|
29006
29579
|
onMouseLeave = (evt, targetProps) => {
|
|
29580
|
+
this.onMouseMove.cancel();
|
|
29007
29581
|
const activePoints = targetProps.activePoints || [];
|
|
29008
29582
|
this.onDeactivated(targetProps, activePoints);
|
|
29009
29583
|
const inactiveMutations = activePoints.length ? activePoints.map(point => this.getInactiveMutations(targetProps, point)) : [];
|