victory-box-plot 37.1.2 → 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 +2 -0
- package/dist/victory-box-plot.js +197 -68
- package/dist/victory-box-plot.min.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/victory-box-plot.js
CHANGED
|
@@ -6456,31 +6456,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6456
6456
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6457
6457
|
/* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
|
|
6458
6458
|
/* harmony export */ });
|
|
6459
|
-
/* harmony import */ var
|
|
6460
|
-
/* harmony import */ var
|
|
6461
|
-
/* harmony import */ var
|
|
6462
|
-
/* harmony import */ var
|
|
6463
|
-
/* harmony import */ var
|
|
6464
|
-
/* harmony import */ var
|
|
6465
|
-
/* harmony import */ var
|
|
6459
|
+
/* 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");
|
|
6460
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__);
|
|
6461
|
+
/* 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");
|
|
6462
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6463
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
6464
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
6465
|
+
/* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
|
|
6466
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6467
|
+
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
6468
|
+
|
|
6466
6469
|
|
|
6467
6470
|
|
|
6468
6471
|
|
|
6469
6472
|
|
|
6470
6473
|
|
|
6471
6474
|
const defaultProps = {
|
|
6472
|
-
groupComponent: /*#__PURE__*/
|
|
6475
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("g", null)
|
|
6473
6476
|
};
|
|
6474
6477
|
const VictoryPortal = initialProps => {
|
|
6475
6478
|
const props = {
|
|
6476
6479
|
...defaultProps,
|
|
6477
6480
|
...initialProps
|
|
6478
6481
|
};
|
|
6479
|
-
const id =
|
|
6480
|
-
const portalContext = (0,
|
|
6482
|
+
const id = lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default()();
|
|
6483
|
+
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
|
|
6481
6484
|
if (!portalContext) {
|
|
6482
6485
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
6483
|
-
|
|
6486
|
+
_victory_util_log__WEBPACK_IMPORTED_MODULE_4__.warn(msg);
|
|
6484
6487
|
}
|
|
6485
6488
|
const children = Array.isArray(props.children) ? props.children[0] : props.children;
|
|
6486
6489
|
const {
|
|
@@ -6491,15 +6494,15 @@ const VictoryPortal = initialProps => {
|
|
|
6491
6494
|
groupComponent,
|
|
6492
6495
|
standalone: false
|
|
6493
6496
|
} : {};
|
|
6494
|
-
const newProps =
|
|
6497
|
+
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
|
|
6495
6498
|
key: childProps.key ?? id
|
|
6496
6499
|
});
|
|
6497
|
-
const child = children && /*#__PURE__*/
|
|
6498
|
-
|
|
6500
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(children, newProps);
|
|
6501
|
+
react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
|
|
6499
6502
|
portalContext?.addChild(id, child);
|
|
6500
6503
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6501
6504
|
}, [props.children]);
|
|
6502
|
-
|
|
6505
|
+
react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
|
|
6503
6506
|
return () => portalContext?.removeChild(id);
|
|
6504
6507
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6505
6508
|
}, []);
|
|
@@ -6987,7 +6990,26 @@ const green = {
|
|
|
6987
6990
|
"500": "#20C933",
|
|
6988
6991
|
"900": "#338A17"
|
|
6989
6992
|
};
|
|
6990
|
-
const colors =
|
|
6993
|
+
const colors = {
|
|
6994
|
+
blue: blue["500"],
|
|
6995
|
+
pink: pink["500"],
|
|
6996
|
+
teal: teal["500"],
|
|
6997
|
+
purple: purple["500"],
|
|
6998
|
+
green: green["500"],
|
|
6999
|
+
orange: orange["500"],
|
|
7000
|
+
cyan: cyan["500"],
|
|
7001
|
+
red: red["500"],
|
|
7002
|
+
yellow: yellow["500"]
|
|
7003
|
+
};
|
|
7004
|
+
const colorScale = Object.values(colors);
|
|
7005
|
+
const grayscale = [gray["200"], gray["400"], gray["600"], gray["900"]];
|
|
7006
|
+
const warm = [yellow["500"], orange["500"], red["500"], pink["500"]];
|
|
7007
|
+
const cool = [cyan["500"], teal["500"], blue["500"], purple["500"]];
|
|
7008
|
+
const heatmap = [green["500"], yellow["500"], red["500"]];
|
|
7009
|
+
const redPalette = [red["500"], red["300"], red["100"]];
|
|
7010
|
+
const greenPalette = [green["500"], green["300"], green["100"]];
|
|
7011
|
+
const bluePalette = [blue["500"], blue["300"], blue["100"]];
|
|
7012
|
+
|
|
6991
7013
|
// *
|
|
6992
7014
|
// * Typography
|
|
6993
7015
|
// *
|
|
@@ -7002,7 +7024,7 @@ const baseProps = {
|
|
|
7002
7024
|
width: 450,
|
|
7003
7025
|
height: 300,
|
|
7004
7026
|
padding: 50,
|
|
7005
|
-
colorScale
|
|
7027
|
+
colorScale
|
|
7006
7028
|
};
|
|
7007
7029
|
// *
|
|
7008
7030
|
// * Labels
|
|
@@ -7031,10 +7053,23 @@ const borderRadius = 1;
|
|
|
7031
7053
|
// * Theme
|
|
7032
7054
|
// *
|
|
7033
7055
|
const clean = {
|
|
7056
|
+
palette: {
|
|
7057
|
+
colors,
|
|
7058
|
+
grayscale,
|
|
7059
|
+
qualitative: colorScale,
|
|
7060
|
+
heatmap,
|
|
7061
|
+
warm,
|
|
7062
|
+
cool,
|
|
7063
|
+
red: redPalette,
|
|
7064
|
+
green: greenPalette,
|
|
7065
|
+
blue: bluePalette
|
|
7066
|
+
},
|
|
7034
7067
|
area: Object.assign({
|
|
7035
7068
|
style: {
|
|
7036
7069
|
data: {
|
|
7037
|
-
fill:
|
|
7070
|
+
fill: blue["500"],
|
|
7071
|
+
strokeWidth: 2,
|
|
7072
|
+
fillOpacity: 0.5
|
|
7038
7073
|
},
|
|
7039
7074
|
labels: baseLabelStyles
|
|
7040
7075
|
}
|
|
@@ -7043,7 +7078,7 @@ const clean = {
|
|
|
7043
7078
|
style: {
|
|
7044
7079
|
axis: {
|
|
7045
7080
|
fill: "transparent",
|
|
7046
|
-
stroke: gray["
|
|
7081
|
+
stroke: gray["500"],
|
|
7047
7082
|
strokeWidth: 1,
|
|
7048
7083
|
strokeLinecap,
|
|
7049
7084
|
strokeLinejoin
|
|
@@ -7068,10 +7103,10 @@ const clean = {
|
|
|
7068
7103
|
polarAxis: Object.assign({
|
|
7069
7104
|
style: {
|
|
7070
7105
|
axis: {
|
|
7071
|
-
stroke: gray["
|
|
7106
|
+
stroke: gray["500"]
|
|
7072
7107
|
},
|
|
7073
7108
|
grid: {
|
|
7074
|
-
stroke: gray["
|
|
7109
|
+
stroke: gray["400"],
|
|
7075
7110
|
strokeDasharray,
|
|
7076
7111
|
strokeLinecap,
|
|
7077
7112
|
strokeLinejoin,
|
|
@@ -7080,7 +7115,7 @@ const clean = {
|
|
|
7080
7115
|
ticks: {
|
|
7081
7116
|
fill: "transparent",
|
|
7082
7117
|
size: 5,
|
|
7083
|
-
stroke: gray["
|
|
7118
|
+
stroke: gray["400"],
|
|
7084
7119
|
strokeWidth: 1,
|
|
7085
7120
|
strokeLinecap,
|
|
7086
7121
|
strokeLinejoin
|
|
@@ -7091,10 +7126,10 @@ const clean = {
|
|
|
7091
7126
|
polarDependentAxis: Object.assign({
|
|
7092
7127
|
style: {
|
|
7093
7128
|
axis: {
|
|
7094
|
-
stroke: gray["
|
|
7129
|
+
stroke: gray["500"]
|
|
7095
7130
|
},
|
|
7096
7131
|
grid: {
|
|
7097
|
-
stroke: gray["
|
|
7132
|
+
stroke: gray["400"],
|
|
7098
7133
|
strokeDasharray,
|
|
7099
7134
|
strokeLinecap,
|
|
7100
7135
|
strokeLinejoin,
|
|
@@ -7103,7 +7138,7 @@ const clean = {
|
|
|
7103
7138
|
ticks: {
|
|
7104
7139
|
fill: "transparent",
|
|
7105
7140
|
size: 5,
|
|
7106
|
-
stroke: gray["
|
|
7141
|
+
stroke: gray["300"],
|
|
7107
7142
|
strokeWidth: 1,
|
|
7108
7143
|
strokeLinecap,
|
|
7109
7144
|
strokeLinejoin
|
|
@@ -7116,7 +7151,8 @@ const clean = {
|
|
|
7116
7151
|
data: {
|
|
7117
7152
|
fill: blue["500"],
|
|
7118
7153
|
padding,
|
|
7119
|
-
strokeWidth:
|
|
7154
|
+
strokeWidth: 1,
|
|
7155
|
+
fillOpacity: 0.5
|
|
7120
7156
|
},
|
|
7121
7157
|
labels: baseLabelStyles
|
|
7122
7158
|
},
|
|
@@ -7153,14 +7189,15 @@ const clean = {
|
|
|
7153
7189
|
q1: {
|
|
7154
7190
|
padding,
|
|
7155
7191
|
fill: teal["500"],
|
|
7156
|
-
rx: borderRadius
|
|
7192
|
+
rx: borderRadius,
|
|
7193
|
+
strokeWidth: 2
|
|
7157
7194
|
},
|
|
7158
7195
|
q1Labels: Object.assign({}, baseLabelStyles, {
|
|
7159
7196
|
padding: 3
|
|
7160
7197
|
}),
|
|
7161
7198
|
q3: {
|
|
7162
7199
|
padding,
|
|
7163
|
-
fill:
|
|
7200
|
+
fill: cyan["500"],
|
|
7164
7201
|
rx: borderRadius
|
|
7165
7202
|
},
|
|
7166
7203
|
q3Labels: Object.assign({}, baseLabelStyles, {
|
|
@@ -7201,14 +7238,13 @@ const clean = {
|
|
|
7201
7238
|
}
|
|
7202
7239
|
}, baseProps),
|
|
7203
7240
|
group: Object.assign({
|
|
7204
|
-
colorScale
|
|
7241
|
+
colorScale
|
|
7205
7242
|
}, baseProps),
|
|
7206
7243
|
histogram: Object.assign({
|
|
7207
7244
|
style: {
|
|
7208
7245
|
data: {
|
|
7209
7246
|
fill: cyan["500"],
|
|
7210
|
-
|
|
7211
|
-
strokeWidth: 0
|
|
7247
|
+
fillOpacity: 0.5
|
|
7212
7248
|
},
|
|
7213
7249
|
labels: baseLabelStyles
|
|
7214
7250
|
},
|
|
@@ -7219,21 +7255,23 @@ const clean = {
|
|
|
7219
7255
|
}, baseProps),
|
|
7220
7256
|
label: baseLabelStyles,
|
|
7221
7257
|
legend: {
|
|
7222
|
-
colorScale
|
|
7223
|
-
gutter:
|
|
7224
|
-
|
|
7258
|
+
colorScale,
|
|
7259
|
+
gutter: 24,
|
|
7260
|
+
borderPadding: 10,
|
|
7261
|
+
orientation: "horizontal",
|
|
7225
7262
|
titleOrientation: "top",
|
|
7263
|
+
centerTitle: true,
|
|
7226
7264
|
style: {
|
|
7227
7265
|
data: {
|
|
7228
7266
|
type: "circle"
|
|
7229
7267
|
},
|
|
7230
7268
|
labels: {
|
|
7231
7269
|
...baseLabelStyles,
|
|
7232
|
-
fontSize:
|
|
7270
|
+
fontSize: 12
|
|
7233
7271
|
},
|
|
7234
7272
|
title: Object.assign({}, baseLabelStyles, {
|
|
7235
7273
|
padding,
|
|
7236
|
-
fontSize:
|
|
7274
|
+
fontSize: 16
|
|
7237
7275
|
}),
|
|
7238
7276
|
border: {
|
|
7239
7277
|
stroke: gray["200"],
|
|
@@ -7247,7 +7285,7 @@ const clean = {
|
|
|
7247
7285
|
data: {
|
|
7248
7286
|
fill: "transparent",
|
|
7249
7287
|
opacity: 1,
|
|
7250
|
-
stroke:
|
|
7288
|
+
stroke: blue["500"],
|
|
7251
7289
|
strokeWidth: 2,
|
|
7252
7290
|
strokeLinecap,
|
|
7253
7291
|
strokeLinejoin
|
|
@@ -7257,16 +7295,22 @@ const clean = {
|
|
|
7257
7295
|
}, baseProps),
|
|
7258
7296
|
pie: Object.assign({
|
|
7259
7297
|
style: {
|
|
7298
|
+
parent: {
|
|
7299
|
+
backgroundColor: gray.white
|
|
7300
|
+
},
|
|
7260
7301
|
data: {
|
|
7261
7302
|
padding,
|
|
7262
7303
|
stroke: gray.white,
|
|
7263
7304
|
strokeWidth: 1
|
|
7264
7305
|
},
|
|
7265
|
-
labels:
|
|
7266
|
-
|
|
7267
|
-
|
|
7306
|
+
labels: {
|
|
7307
|
+
...baseLabelStyles,
|
|
7308
|
+
padding: 20,
|
|
7309
|
+
fill: gray["600"],
|
|
7310
|
+
fontSize: 10
|
|
7311
|
+
}
|
|
7268
7312
|
},
|
|
7269
|
-
colorScale
|
|
7313
|
+
colorScale,
|
|
7270
7314
|
cornerRadius: borderRadius
|
|
7271
7315
|
}, baseProps),
|
|
7272
7316
|
scatter: Object.assign({
|
|
@@ -7277,11 +7321,14 @@ const clean = {
|
|
|
7277
7321
|
stroke: "transparent",
|
|
7278
7322
|
strokeWidth: 0
|
|
7279
7323
|
},
|
|
7280
|
-
labels:
|
|
7324
|
+
labels: {
|
|
7325
|
+
...baseLabelStyles,
|
|
7326
|
+
padding: 20
|
|
7327
|
+
}
|
|
7281
7328
|
}
|
|
7282
7329
|
}, baseProps),
|
|
7283
7330
|
stack: Object.assign({
|
|
7284
|
-
colorScale
|
|
7331
|
+
colorScale
|
|
7285
7332
|
}, baseProps),
|
|
7286
7333
|
tooltip: {
|
|
7287
7334
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -7289,7 +7336,7 @@ const clean = {
|
|
|
7289
7336
|
pointerEvents: "none"
|
|
7290
7337
|
}),
|
|
7291
7338
|
flyoutStyle: {
|
|
7292
|
-
stroke: gray["
|
|
7339
|
+
stroke: gray["300"],
|
|
7293
7340
|
strokeWidth: 2,
|
|
7294
7341
|
fill: gray.white,
|
|
7295
7342
|
pointerEvents: "none"
|
|
@@ -7306,9 +7353,10 @@ const clean = {
|
|
|
7306
7353
|
voronoi: Object.assign({
|
|
7307
7354
|
style: {
|
|
7308
7355
|
data: {
|
|
7309
|
-
fill:
|
|
7310
|
-
stroke:
|
|
7311
|
-
strokeWidth: 2
|
|
7356
|
+
fill: blue["100"],
|
|
7357
|
+
stroke: blue["500"],
|
|
7358
|
+
strokeWidth: 2,
|
|
7359
|
+
opacity: 0.4
|
|
7312
7360
|
},
|
|
7313
7361
|
labels: Object.assign({}, baseLabelStyles, {
|
|
7314
7362
|
padding: 5,
|
|
@@ -7344,9 +7392,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7344
7392
|
// *
|
|
7345
7393
|
// * Colors
|
|
7346
7394
|
// *
|
|
7347
|
-
const colors =
|
|
7395
|
+
const colors = {
|
|
7396
|
+
blue: "#4F7DA1",
|
|
7397
|
+
pink: "#E2A37F",
|
|
7398
|
+
teal: "#00796B",
|
|
7399
|
+
purple: "#DF948A",
|
|
7400
|
+
green: "#8BC34A",
|
|
7401
|
+
orange: "#F4511E",
|
|
7402
|
+
cyan: "#006064",
|
|
7403
|
+
red: "#DF5A49",
|
|
7404
|
+
yellow: "#FFF59D"
|
|
7405
|
+
};
|
|
7406
|
+
const colorScale = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
|
|
7348
7407
|
const charcoal = "#252525";
|
|
7349
7408
|
const grey = "#969696";
|
|
7409
|
+
const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
|
|
7410
|
+
const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
|
|
7411
|
+
const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
|
|
7412
|
+
const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
|
|
7413
|
+
const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
|
|
7414
|
+
const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
|
|
7415
|
+
const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
|
|
7416
|
+
|
|
7350
7417
|
// *
|
|
7351
7418
|
// * Typography
|
|
7352
7419
|
// *
|
|
@@ -7360,7 +7427,7 @@ const baseProps = {
|
|
|
7360
7427
|
width: 450,
|
|
7361
7428
|
height: 300,
|
|
7362
7429
|
padding: 50,
|
|
7363
|
-
colorScale
|
|
7430
|
+
colorScale
|
|
7364
7431
|
};
|
|
7365
7432
|
// *
|
|
7366
7433
|
// * Labels
|
|
@@ -7382,6 +7449,17 @@ const centeredLabelStyles = Object.assign({
|
|
|
7382
7449
|
const strokeLinecap = "round";
|
|
7383
7450
|
const strokeLinejoin = "round";
|
|
7384
7451
|
const grayscale = {
|
|
7452
|
+
palette: {
|
|
7453
|
+
colors,
|
|
7454
|
+
grayscale: colorScale,
|
|
7455
|
+
qualitative,
|
|
7456
|
+
heatmap,
|
|
7457
|
+
warm,
|
|
7458
|
+
cool,
|
|
7459
|
+
red,
|
|
7460
|
+
green,
|
|
7461
|
+
blue
|
|
7462
|
+
},
|
|
7385
7463
|
area: Object.assign({
|
|
7386
7464
|
style: {
|
|
7387
7465
|
data: {
|
|
@@ -7496,7 +7574,7 @@ const grayscale = {
|
|
|
7496
7574
|
}
|
|
7497
7575
|
}, baseProps),
|
|
7498
7576
|
group: Object.assign({
|
|
7499
|
-
colorScale
|
|
7577
|
+
colorScale
|
|
7500
7578
|
}, baseProps),
|
|
7501
7579
|
histogram: Object.assign({
|
|
7502
7580
|
style: {
|
|
@@ -7509,7 +7587,7 @@ const grayscale = {
|
|
|
7509
7587
|
}
|
|
7510
7588
|
}, baseProps),
|
|
7511
7589
|
legend: {
|
|
7512
|
-
colorScale
|
|
7590
|
+
colorScale,
|
|
7513
7591
|
gutter: 10,
|
|
7514
7592
|
orientation: "vertical",
|
|
7515
7593
|
titleOrientation: "top",
|
|
@@ -7544,7 +7622,7 @@ const grayscale = {
|
|
|
7544
7622
|
padding: 20
|
|
7545
7623
|
})
|
|
7546
7624
|
},
|
|
7547
|
-
colorScale
|
|
7625
|
+
colorScale,
|
|
7548
7626
|
width: 400,
|
|
7549
7627
|
height: 400,
|
|
7550
7628
|
padding: 50
|
|
@@ -7560,7 +7638,7 @@ const grayscale = {
|
|
|
7560
7638
|
}
|
|
7561
7639
|
}, baseProps),
|
|
7562
7640
|
stack: Object.assign({
|
|
7563
|
-
colorScale
|
|
7641
|
+
colorScale
|
|
7564
7642
|
}, baseProps),
|
|
7565
7643
|
tooltip: {
|
|
7566
7644
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -7620,11 +7698,31 @@ const lime300 = "#DCE775";
|
|
|
7620
7698
|
const lightGreen500 = "#8BC34A";
|
|
7621
7699
|
const teal700 = "#00796B";
|
|
7622
7700
|
const cyan900 = "#006064";
|
|
7623
|
-
const
|
|
7701
|
+
const colorScale = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
|
|
7624
7702
|
const blueGrey50 = "#ECEFF1";
|
|
7625
7703
|
const blueGrey300 = "#90A4AE";
|
|
7626
7704
|
const blueGrey700 = "#455A64";
|
|
7627
7705
|
const grey900 = "#212121";
|
|
7706
|
+
const colors = {
|
|
7707
|
+
blue: "#4F7DA1",
|
|
7708
|
+
pink: "#E2A37F",
|
|
7709
|
+
teal: teal700,
|
|
7710
|
+
purple: "#DF948A",
|
|
7711
|
+
green: lightGreen500,
|
|
7712
|
+
orange: deepOrange600,
|
|
7713
|
+
cyan: cyan900,
|
|
7714
|
+
red: "#DF5A49",
|
|
7715
|
+
yellow: yellow200
|
|
7716
|
+
};
|
|
7717
|
+
const grayscale = [blueGrey50, blueGrey300, blueGrey700, grey900];
|
|
7718
|
+
const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
|
|
7719
|
+
const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
|
|
7720
|
+
const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
|
|
7721
|
+
const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
|
|
7722
|
+
const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
|
|
7723
|
+
const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
|
|
7724
|
+
const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
|
|
7725
|
+
|
|
7628
7726
|
// *
|
|
7629
7727
|
// * Typography
|
|
7630
7728
|
// *
|
|
@@ -7662,6 +7760,17 @@ const strokeDasharray = "10, 5";
|
|
|
7662
7760
|
const strokeLinecap = "round";
|
|
7663
7761
|
const strokeLinejoin = "round";
|
|
7664
7762
|
const material = {
|
|
7763
|
+
palette: {
|
|
7764
|
+
colors,
|
|
7765
|
+
grayscale,
|
|
7766
|
+
qualitative,
|
|
7767
|
+
heatmap,
|
|
7768
|
+
warm,
|
|
7769
|
+
cool,
|
|
7770
|
+
red,
|
|
7771
|
+
green,
|
|
7772
|
+
blue
|
|
7773
|
+
},
|
|
7665
7774
|
area: Object.assign({
|
|
7666
7775
|
style: {
|
|
7667
7776
|
data: {
|
|
@@ -7794,7 +7903,7 @@ const material = {
|
|
|
7794
7903
|
}
|
|
7795
7904
|
}, baseProps),
|
|
7796
7905
|
group: Object.assign({
|
|
7797
|
-
colorScale
|
|
7906
|
+
colorScale
|
|
7798
7907
|
}, baseProps),
|
|
7799
7908
|
histogram: Object.assign({
|
|
7800
7909
|
style: {
|
|
@@ -7807,7 +7916,7 @@ const material = {
|
|
|
7807
7916
|
}
|
|
7808
7917
|
}, baseProps),
|
|
7809
7918
|
legend: {
|
|
7810
|
-
colorScale
|
|
7919
|
+
colorScale,
|
|
7811
7920
|
gutter: 10,
|
|
7812
7921
|
orientation: "vertical",
|
|
7813
7922
|
titleOrientation: "top",
|
|
@@ -7833,7 +7942,7 @@ const material = {
|
|
|
7833
7942
|
}
|
|
7834
7943
|
}, baseProps),
|
|
7835
7944
|
pie: Object.assign({
|
|
7836
|
-
colorScale
|
|
7945
|
+
colorScale,
|
|
7837
7946
|
style: {
|
|
7838
7947
|
data: {
|
|
7839
7948
|
padding,
|
|
@@ -7857,7 +7966,7 @@ const material = {
|
|
|
7857
7966
|
}
|
|
7858
7967
|
}, baseProps),
|
|
7859
7968
|
stack: Object.assign({
|
|
7860
|
-
colorScale
|
|
7969
|
+
colorScale
|
|
7861
7970
|
}, baseProps),
|
|
7862
7971
|
tooltip: {
|
|
7863
7972
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -10823,6 +10932,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10823
10932
|
/* harmony export */ "getColorScale": function() { return /* binding */ getColorScale; },
|
|
10824
10933
|
/* harmony export */ "toTransformString": function() { return /* binding */ toTransformString; }
|
|
10825
10934
|
/* harmony export */ });
|
|
10935
|
+
/* 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");
|
|
10936
|
+
|
|
10937
|
+
|
|
10826
10938
|
/**
|
|
10827
10939
|
* Given an object with CSS/SVG transform definitions, return the string value
|
|
10828
10940
|
* for use with the `transform` CSS property or SVG attribute. Note that we
|
|
@@ -10859,20 +10971,37 @@ const toTransformString = function (obj) {
|
|
|
10859
10971
|
* of 5 hex string values in that color scale. If no 'name' parameter
|
|
10860
10972
|
* is given, it will return the Victory default grayscale.
|
|
10861
10973
|
* @param {String} name The name of the color scale to return (optional).
|
|
10974
|
+
* @param {Object} theme The theme object to retrieve the color scale from (optional).
|
|
10862
10975
|
* @returns {Array} An array of 5 hex string values composing a color scale.
|
|
10863
10976
|
*/
|
|
10864
|
-
function getColorScale(name) {
|
|
10977
|
+
function getColorScale(name, theme) {
|
|
10978
|
+
if (theme === void 0) {
|
|
10979
|
+
theme = _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__.VictoryTheme.material;
|
|
10980
|
+
}
|
|
10981
|
+
const {
|
|
10982
|
+
palette: {
|
|
10983
|
+
grayscale = ["#cccccc", "#969696", "#636363", "#252525"],
|
|
10984
|
+
qualitative = [],
|
|
10985
|
+
heatmap = [],
|
|
10986
|
+
warm = [],
|
|
10987
|
+
cool = [],
|
|
10988
|
+
red = [],
|
|
10989
|
+
blue = [],
|
|
10990
|
+
green = []
|
|
10991
|
+
} = {}
|
|
10992
|
+
} = theme;
|
|
10865
10993
|
const scales = {
|
|
10866
|
-
grayscale
|
|
10867
|
-
qualitative
|
|
10868
|
-
heatmap
|
|
10869
|
-
warm
|
|
10870
|
-
cool
|
|
10871
|
-
red
|
|
10872
|
-
blue
|
|
10873
|
-
green
|
|
10994
|
+
grayscale,
|
|
10995
|
+
qualitative,
|
|
10996
|
+
heatmap,
|
|
10997
|
+
warm,
|
|
10998
|
+
cool,
|
|
10999
|
+
red,
|
|
11000
|
+
blue,
|
|
11001
|
+
green
|
|
10874
11002
|
};
|
|
10875
|
-
|
|
11003
|
+
const selectedScale = name && scales[name]?.length ? scales[name] : scales.grayscale;
|
|
11004
|
+
return selectedScale;
|
|
10876
11005
|
}
|
|
10877
11006
|
|
|
10878
11007
|
/***/ }),
|