victory-box-plot 37.1.2 → 37.3.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 +4 -0
- package/dist/victory-box-plot.js +206 -80
- 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] = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(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
|
}, []);
|
|
@@ -6943,20 +6946,16 @@ const orange = {
|
|
|
6943
6946
|
"100": "#FEE2D5",
|
|
6944
6947
|
"300": "#FFA981",
|
|
6945
6948
|
"500": "#FF6F2C",
|
|
6949
|
+
"700": "#FF4E1B",
|
|
6946
6950
|
"900": "#D74D26"
|
|
6947
6951
|
};
|
|
6948
6952
|
const red = {
|
|
6949
6953
|
"100": "#FFDCE5",
|
|
6950
6954
|
"300": "#FF9EB7",
|
|
6951
6955
|
"500": "#F82B60",
|
|
6956
|
+
"700": "#D31A3D",
|
|
6952
6957
|
"900": "#BA1E45"
|
|
6953
6958
|
};
|
|
6954
|
-
const pink = {
|
|
6955
|
-
"100": "#FFDAF6",
|
|
6956
|
-
"300": "#F99DE2",
|
|
6957
|
-
"500": "#FF08C2",
|
|
6958
|
-
"900": "#B2158B"
|
|
6959
|
-
};
|
|
6960
6959
|
const purple = {
|
|
6961
6960
|
"100": "#EDE3FE",
|
|
6962
6961
|
"300": "#CDB0FF",
|
|
@@ -6967,6 +6966,7 @@ const blue = {
|
|
|
6967
6966
|
"100": "#CFDFFF",
|
|
6968
6967
|
"300": "#9CC7FF",
|
|
6969
6968
|
"500": "#2D7FF9",
|
|
6969
|
+
"700": "#0056B3",
|
|
6970
6970
|
"900": "#2750AE"
|
|
6971
6971
|
};
|
|
6972
6972
|
const cyan = {
|
|
@@ -6985,9 +6985,29 @@ const green = {
|
|
|
6985
6985
|
"100": "#D1F7C4",
|
|
6986
6986
|
"300": "#93E088",
|
|
6987
6987
|
"500": "#20C933",
|
|
6988
|
+
"700": "#1B9B2A",
|
|
6988
6989
|
"900": "#338A17"
|
|
6989
6990
|
};
|
|
6990
|
-
const colors =
|
|
6991
|
+
const colors = {
|
|
6992
|
+
blue: blue["500"],
|
|
6993
|
+
cyan: cyan["500"],
|
|
6994
|
+
green: green["500"],
|
|
6995
|
+
yellow: yellow["500"],
|
|
6996
|
+
orange: orange["500"],
|
|
6997
|
+
red: red["500"],
|
|
6998
|
+
purple: purple["500"],
|
|
6999
|
+
teal: teal["500"]
|
|
7000
|
+
};
|
|
7001
|
+
const colorScale = Object.values(colors);
|
|
7002
|
+
const grayscale = [gray["100"], gray["300"], gray["500"], gray["700"], gray["900"]];
|
|
7003
|
+
const warm = [yellow["300"], yellow["500"], orange["500"], orange["900"], red["500"]];
|
|
7004
|
+
const cool = [purple["500"], blue["500"], cyan["500"], teal["500"], green["500"]];
|
|
7005
|
+
const heatmap = [green["900"], green["500"], yellow["500"], orange["500"], red["500"]];
|
|
7006
|
+
const redPalette = Object.values(red);
|
|
7007
|
+
const greenPalette = Object.values(green);
|
|
7008
|
+
const bluePalette = Object.values(blue);
|
|
7009
|
+
const defaultColor = blue["500"];
|
|
7010
|
+
|
|
6991
7011
|
// *
|
|
6992
7012
|
// * Typography
|
|
6993
7013
|
// *
|
|
@@ -7001,8 +7021,8 @@ const padding = 8;
|
|
|
7001
7021
|
const baseProps = {
|
|
7002
7022
|
width: 450,
|
|
7003
7023
|
height: 300,
|
|
7004
|
-
padding:
|
|
7005
|
-
colorScale
|
|
7024
|
+
padding: 60,
|
|
7025
|
+
colorScale
|
|
7006
7026
|
};
|
|
7007
7027
|
// *
|
|
7008
7028
|
// * Labels
|
|
@@ -7031,10 +7051,23 @@ const borderRadius = 1;
|
|
|
7031
7051
|
// * Theme
|
|
7032
7052
|
// *
|
|
7033
7053
|
const clean = {
|
|
7054
|
+
palette: {
|
|
7055
|
+
colors,
|
|
7056
|
+
grayscale,
|
|
7057
|
+
qualitative: colorScale,
|
|
7058
|
+
heatmap,
|
|
7059
|
+
warm,
|
|
7060
|
+
cool,
|
|
7061
|
+
red: redPalette,
|
|
7062
|
+
green: greenPalette,
|
|
7063
|
+
blue: bluePalette
|
|
7064
|
+
},
|
|
7034
7065
|
area: Object.assign({
|
|
7035
7066
|
style: {
|
|
7036
7067
|
data: {
|
|
7037
|
-
fill:
|
|
7068
|
+
fill: defaultColor,
|
|
7069
|
+
strokeWidth: 2,
|
|
7070
|
+
fillOpacity: 0.5
|
|
7038
7071
|
},
|
|
7039
7072
|
labels: baseLabelStyles
|
|
7040
7073
|
}
|
|
@@ -7043,13 +7076,13 @@ const clean = {
|
|
|
7043
7076
|
style: {
|
|
7044
7077
|
axis: {
|
|
7045
7078
|
fill: "transparent",
|
|
7046
|
-
stroke: gray["
|
|
7079
|
+
stroke: gray["500"],
|
|
7047
7080
|
strokeWidth: 1,
|
|
7048
7081
|
strokeLinecap,
|
|
7049
7082
|
strokeLinejoin
|
|
7050
7083
|
},
|
|
7051
7084
|
axisLabel: Object.assign({}, centeredLabelStyles, {
|
|
7052
|
-
padding,
|
|
7085
|
+
padding: 35,
|
|
7053
7086
|
stroke: "transparent"
|
|
7054
7087
|
}),
|
|
7055
7088
|
grid: {
|
|
@@ -7068,10 +7101,10 @@ const clean = {
|
|
|
7068
7101
|
polarAxis: Object.assign({
|
|
7069
7102
|
style: {
|
|
7070
7103
|
axis: {
|
|
7071
|
-
stroke: gray["
|
|
7104
|
+
stroke: gray["500"]
|
|
7072
7105
|
},
|
|
7073
7106
|
grid: {
|
|
7074
|
-
stroke: gray["
|
|
7107
|
+
stroke: gray["400"],
|
|
7075
7108
|
strokeDasharray,
|
|
7076
7109
|
strokeLinecap,
|
|
7077
7110
|
strokeLinejoin,
|
|
@@ -7080,7 +7113,7 @@ const clean = {
|
|
|
7080
7113
|
ticks: {
|
|
7081
7114
|
fill: "transparent",
|
|
7082
7115
|
size: 5,
|
|
7083
|
-
stroke: gray["
|
|
7116
|
+
stroke: gray["400"],
|
|
7084
7117
|
strokeWidth: 1,
|
|
7085
7118
|
strokeLinecap,
|
|
7086
7119
|
strokeLinejoin
|
|
@@ -7091,10 +7124,10 @@ const clean = {
|
|
|
7091
7124
|
polarDependentAxis: Object.assign({
|
|
7092
7125
|
style: {
|
|
7093
7126
|
axis: {
|
|
7094
|
-
stroke: gray["
|
|
7127
|
+
stroke: gray["500"]
|
|
7095
7128
|
},
|
|
7096
7129
|
grid: {
|
|
7097
|
-
stroke: gray["
|
|
7130
|
+
stroke: gray["400"],
|
|
7098
7131
|
strokeDasharray,
|
|
7099
7132
|
strokeLinecap,
|
|
7100
7133
|
strokeLinejoin,
|
|
@@ -7103,7 +7136,7 @@ const clean = {
|
|
|
7103
7136
|
ticks: {
|
|
7104
7137
|
fill: "transparent",
|
|
7105
7138
|
size: 5,
|
|
7106
|
-
stroke: gray["
|
|
7139
|
+
stroke: gray["300"],
|
|
7107
7140
|
strokeWidth: 1,
|
|
7108
7141
|
strokeLinecap,
|
|
7109
7142
|
strokeLinejoin
|
|
@@ -7114,9 +7147,10 @@ const clean = {
|
|
|
7114
7147
|
bar: Object.assign({
|
|
7115
7148
|
style: {
|
|
7116
7149
|
data: {
|
|
7117
|
-
fill:
|
|
7150
|
+
fill: defaultColor,
|
|
7118
7151
|
padding,
|
|
7119
|
-
strokeWidth:
|
|
7152
|
+
strokeWidth: 1,
|
|
7153
|
+
fillOpacity: 0.5
|
|
7120
7154
|
},
|
|
7121
7155
|
labels: baseLabelStyles
|
|
7122
7156
|
},
|
|
@@ -7152,15 +7186,16 @@ const clean = {
|
|
|
7152
7186
|
}),
|
|
7153
7187
|
q1: {
|
|
7154
7188
|
padding,
|
|
7155
|
-
fill:
|
|
7156
|
-
rx: borderRadius
|
|
7189
|
+
fill: colorScale[0],
|
|
7190
|
+
rx: borderRadius,
|
|
7191
|
+
strokeWidth: 2
|
|
7157
7192
|
},
|
|
7158
7193
|
q1Labels: Object.assign({}, baseLabelStyles, {
|
|
7159
7194
|
padding: 3
|
|
7160
7195
|
}),
|
|
7161
7196
|
q3: {
|
|
7162
7197
|
padding,
|
|
7163
|
-
fill:
|
|
7198
|
+
fill: colorScale[1],
|
|
7164
7199
|
rx: borderRadius
|
|
7165
7200
|
},
|
|
7166
7201
|
q3Labels: Object.assign({}, baseLabelStyles, {
|
|
@@ -7181,8 +7216,8 @@ const clean = {
|
|
|
7181
7216
|
})
|
|
7182
7217
|
},
|
|
7183
7218
|
candleColors: {
|
|
7184
|
-
positive:
|
|
7185
|
-
negative:
|
|
7219
|
+
positive: green["500"],
|
|
7220
|
+
negative: red["500"]
|
|
7186
7221
|
},
|
|
7187
7222
|
wickStrokeWidth: 2
|
|
7188
7223
|
}, baseProps),
|
|
@@ -7201,14 +7236,13 @@ const clean = {
|
|
|
7201
7236
|
}
|
|
7202
7237
|
}, baseProps),
|
|
7203
7238
|
group: Object.assign({
|
|
7204
|
-
colorScale
|
|
7239
|
+
colorScale
|
|
7205
7240
|
}, baseProps),
|
|
7206
7241
|
histogram: Object.assign({
|
|
7207
7242
|
style: {
|
|
7208
7243
|
data: {
|
|
7209
7244
|
fill: cyan["500"],
|
|
7210
|
-
|
|
7211
|
-
strokeWidth: 0
|
|
7245
|
+
fillOpacity: 0.5
|
|
7212
7246
|
},
|
|
7213
7247
|
labels: baseLabelStyles
|
|
7214
7248
|
},
|
|
@@ -7219,21 +7253,23 @@ const clean = {
|
|
|
7219
7253
|
}, baseProps),
|
|
7220
7254
|
label: baseLabelStyles,
|
|
7221
7255
|
legend: {
|
|
7222
|
-
colorScale
|
|
7223
|
-
gutter:
|
|
7224
|
-
|
|
7256
|
+
colorScale,
|
|
7257
|
+
gutter: 24,
|
|
7258
|
+
borderPadding: 10,
|
|
7259
|
+
orientation: "horizontal",
|
|
7225
7260
|
titleOrientation: "top",
|
|
7261
|
+
centerTitle: true,
|
|
7226
7262
|
style: {
|
|
7227
7263
|
data: {
|
|
7228
7264
|
type: "circle"
|
|
7229
7265
|
},
|
|
7230
7266
|
labels: {
|
|
7231
7267
|
...baseLabelStyles,
|
|
7232
|
-
fontSize:
|
|
7268
|
+
fontSize: 12
|
|
7233
7269
|
},
|
|
7234
7270
|
title: Object.assign({}, baseLabelStyles, {
|
|
7235
7271
|
padding,
|
|
7236
|
-
fontSize:
|
|
7272
|
+
fontSize: 16
|
|
7237
7273
|
}),
|
|
7238
7274
|
border: {
|
|
7239
7275
|
stroke: gray["200"],
|
|
@@ -7247,7 +7283,7 @@ const clean = {
|
|
|
7247
7283
|
data: {
|
|
7248
7284
|
fill: "transparent",
|
|
7249
7285
|
opacity: 1,
|
|
7250
|
-
stroke:
|
|
7286
|
+
stroke: defaultColor,
|
|
7251
7287
|
strokeWidth: 2,
|
|
7252
7288
|
strokeLinecap,
|
|
7253
7289
|
strokeLinejoin
|
|
@@ -7257,31 +7293,40 @@ const clean = {
|
|
|
7257
7293
|
}, baseProps),
|
|
7258
7294
|
pie: Object.assign({
|
|
7259
7295
|
style: {
|
|
7296
|
+
parent: {
|
|
7297
|
+
backgroundColor: gray.white
|
|
7298
|
+
},
|
|
7260
7299
|
data: {
|
|
7261
7300
|
padding,
|
|
7262
7301
|
stroke: gray.white,
|
|
7263
7302
|
strokeWidth: 1
|
|
7264
7303
|
},
|
|
7265
|
-
labels:
|
|
7266
|
-
|
|
7267
|
-
|
|
7304
|
+
labels: {
|
|
7305
|
+
...baseLabelStyles,
|
|
7306
|
+
padding: 20,
|
|
7307
|
+
fill: gray["600"],
|
|
7308
|
+
fontSize: 10
|
|
7309
|
+
}
|
|
7268
7310
|
},
|
|
7269
|
-
colorScale
|
|
7311
|
+
colorScale,
|
|
7270
7312
|
cornerRadius: borderRadius
|
|
7271
7313
|
}, baseProps),
|
|
7272
7314
|
scatter: Object.assign({
|
|
7273
7315
|
style: {
|
|
7274
7316
|
data: {
|
|
7275
|
-
fill:
|
|
7317
|
+
fill: defaultColor,
|
|
7276
7318
|
opacity: 1,
|
|
7277
7319
|
stroke: "transparent",
|
|
7278
7320
|
strokeWidth: 0
|
|
7279
7321
|
},
|
|
7280
|
-
labels:
|
|
7322
|
+
labels: {
|
|
7323
|
+
...baseLabelStyles,
|
|
7324
|
+
padding: 20
|
|
7325
|
+
}
|
|
7281
7326
|
}
|
|
7282
7327
|
}, baseProps),
|
|
7283
7328
|
stack: Object.assign({
|
|
7284
|
-
colorScale
|
|
7329
|
+
colorScale
|
|
7285
7330
|
}, baseProps),
|
|
7286
7331
|
tooltip: {
|
|
7287
7332
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -7289,7 +7334,7 @@ const clean = {
|
|
|
7289
7334
|
pointerEvents: "none"
|
|
7290
7335
|
}),
|
|
7291
7336
|
flyoutStyle: {
|
|
7292
|
-
stroke: gray["
|
|
7337
|
+
stroke: gray["300"],
|
|
7293
7338
|
strokeWidth: 2,
|
|
7294
7339
|
fill: gray.white,
|
|
7295
7340
|
pointerEvents: "none"
|
|
@@ -7306,8 +7351,8 @@ const clean = {
|
|
|
7306
7351
|
voronoi: Object.assign({
|
|
7307
7352
|
style: {
|
|
7308
7353
|
data: {
|
|
7309
|
-
fill:
|
|
7310
|
-
stroke:
|
|
7354
|
+
fill: blue["100"],
|
|
7355
|
+
stroke: defaultColor,
|
|
7311
7356
|
strokeWidth: 2
|
|
7312
7357
|
},
|
|
7313
7358
|
labels: Object.assign({}, baseLabelStyles, {
|
|
@@ -7344,9 +7389,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7344
7389
|
// *
|
|
7345
7390
|
// * Colors
|
|
7346
7391
|
// *
|
|
7347
|
-
const colors =
|
|
7392
|
+
const colors = {
|
|
7393
|
+
blue: "#4F7DA1",
|
|
7394
|
+
pink: "#E2A37F",
|
|
7395
|
+
teal: "#00796B",
|
|
7396
|
+
purple: "#DF948A",
|
|
7397
|
+
green: "#8BC34A",
|
|
7398
|
+
orange: "#F4511E",
|
|
7399
|
+
cyan: "#006064",
|
|
7400
|
+
red: "#DF5A49",
|
|
7401
|
+
yellow: "#FFF59D"
|
|
7402
|
+
};
|
|
7403
|
+
const colorScale = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
|
|
7348
7404
|
const charcoal = "#252525";
|
|
7349
7405
|
const grey = "#969696";
|
|
7406
|
+
const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
|
|
7407
|
+
const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
|
|
7408
|
+
const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
|
|
7409
|
+
const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
|
|
7410
|
+
const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
|
|
7411
|
+
const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
|
|
7412
|
+
const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
|
|
7413
|
+
|
|
7350
7414
|
// *
|
|
7351
7415
|
// * Typography
|
|
7352
7416
|
// *
|
|
@@ -7360,7 +7424,7 @@ const baseProps = {
|
|
|
7360
7424
|
width: 450,
|
|
7361
7425
|
height: 300,
|
|
7362
7426
|
padding: 50,
|
|
7363
|
-
colorScale
|
|
7427
|
+
colorScale
|
|
7364
7428
|
};
|
|
7365
7429
|
// *
|
|
7366
7430
|
// * Labels
|
|
@@ -7382,6 +7446,17 @@ const centeredLabelStyles = Object.assign({
|
|
|
7382
7446
|
const strokeLinecap = "round";
|
|
7383
7447
|
const strokeLinejoin = "round";
|
|
7384
7448
|
const grayscale = {
|
|
7449
|
+
palette: {
|
|
7450
|
+
colors,
|
|
7451
|
+
grayscale: colorScale,
|
|
7452
|
+
qualitative,
|
|
7453
|
+
heatmap,
|
|
7454
|
+
warm,
|
|
7455
|
+
cool,
|
|
7456
|
+
red,
|
|
7457
|
+
green,
|
|
7458
|
+
blue
|
|
7459
|
+
},
|
|
7385
7460
|
area: Object.assign({
|
|
7386
7461
|
style: {
|
|
7387
7462
|
data: {
|
|
@@ -7496,7 +7571,7 @@ const grayscale = {
|
|
|
7496
7571
|
}
|
|
7497
7572
|
}, baseProps),
|
|
7498
7573
|
group: Object.assign({
|
|
7499
|
-
colorScale
|
|
7574
|
+
colorScale
|
|
7500
7575
|
}, baseProps),
|
|
7501
7576
|
histogram: Object.assign({
|
|
7502
7577
|
style: {
|
|
@@ -7509,7 +7584,7 @@ const grayscale = {
|
|
|
7509
7584
|
}
|
|
7510
7585
|
}, baseProps),
|
|
7511
7586
|
legend: {
|
|
7512
|
-
colorScale
|
|
7587
|
+
colorScale,
|
|
7513
7588
|
gutter: 10,
|
|
7514
7589
|
orientation: "vertical",
|
|
7515
7590
|
titleOrientation: "top",
|
|
@@ -7544,7 +7619,7 @@ const grayscale = {
|
|
|
7544
7619
|
padding: 20
|
|
7545
7620
|
})
|
|
7546
7621
|
},
|
|
7547
|
-
colorScale
|
|
7622
|
+
colorScale,
|
|
7548
7623
|
width: 400,
|
|
7549
7624
|
height: 400,
|
|
7550
7625
|
padding: 50
|
|
@@ -7560,7 +7635,7 @@ const grayscale = {
|
|
|
7560
7635
|
}
|
|
7561
7636
|
}, baseProps),
|
|
7562
7637
|
stack: Object.assign({
|
|
7563
|
-
colorScale
|
|
7638
|
+
colorScale
|
|
7564
7639
|
}, baseProps),
|
|
7565
7640
|
tooltip: {
|
|
7566
7641
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -7620,11 +7695,31 @@ const lime300 = "#DCE775";
|
|
|
7620
7695
|
const lightGreen500 = "#8BC34A";
|
|
7621
7696
|
const teal700 = "#00796B";
|
|
7622
7697
|
const cyan900 = "#006064";
|
|
7623
|
-
const
|
|
7698
|
+
const colorScale = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
|
|
7624
7699
|
const blueGrey50 = "#ECEFF1";
|
|
7625
7700
|
const blueGrey300 = "#90A4AE";
|
|
7626
7701
|
const blueGrey700 = "#455A64";
|
|
7627
7702
|
const grey900 = "#212121";
|
|
7703
|
+
const colors = {
|
|
7704
|
+
blue: "#4F7DA1",
|
|
7705
|
+
pink: "#E2A37F",
|
|
7706
|
+
teal: teal700,
|
|
7707
|
+
purple: "#DF948A",
|
|
7708
|
+
green: lightGreen500,
|
|
7709
|
+
orange: deepOrange600,
|
|
7710
|
+
cyan: cyan900,
|
|
7711
|
+
red: "#DF5A49",
|
|
7712
|
+
yellow: yellow200
|
|
7713
|
+
};
|
|
7714
|
+
const grayscale = [blueGrey50, blueGrey300, blueGrey700, grey900];
|
|
7715
|
+
const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
|
|
7716
|
+
const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
|
|
7717
|
+
const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
|
|
7718
|
+
const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
|
|
7719
|
+
const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
|
|
7720
|
+
const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
|
|
7721
|
+
const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
|
|
7722
|
+
|
|
7628
7723
|
// *
|
|
7629
7724
|
// * Typography
|
|
7630
7725
|
// *
|
|
@@ -7662,6 +7757,17 @@ const strokeDasharray = "10, 5";
|
|
|
7662
7757
|
const strokeLinecap = "round";
|
|
7663
7758
|
const strokeLinejoin = "round";
|
|
7664
7759
|
const material = {
|
|
7760
|
+
palette: {
|
|
7761
|
+
colors,
|
|
7762
|
+
grayscale,
|
|
7763
|
+
qualitative,
|
|
7764
|
+
heatmap,
|
|
7765
|
+
warm,
|
|
7766
|
+
cool,
|
|
7767
|
+
red,
|
|
7768
|
+
green,
|
|
7769
|
+
blue
|
|
7770
|
+
},
|
|
7665
7771
|
area: Object.assign({
|
|
7666
7772
|
style: {
|
|
7667
7773
|
data: {
|
|
@@ -7794,7 +7900,7 @@ const material = {
|
|
|
7794
7900
|
}
|
|
7795
7901
|
}, baseProps),
|
|
7796
7902
|
group: Object.assign({
|
|
7797
|
-
colorScale
|
|
7903
|
+
colorScale
|
|
7798
7904
|
}, baseProps),
|
|
7799
7905
|
histogram: Object.assign({
|
|
7800
7906
|
style: {
|
|
@@ -7807,7 +7913,7 @@ const material = {
|
|
|
7807
7913
|
}
|
|
7808
7914
|
}, baseProps),
|
|
7809
7915
|
legend: {
|
|
7810
|
-
colorScale
|
|
7916
|
+
colorScale,
|
|
7811
7917
|
gutter: 10,
|
|
7812
7918
|
orientation: "vertical",
|
|
7813
7919
|
titleOrientation: "top",
|
|
@@ -7833,7 +7939,7 @@ const material = {
|
|
|
7833
7939
|
}
|
|
7834
7940
|
}, baseProps),
|
|
7835
7941
|
pie: Object.assign({
|
|
7836
|
-
colorScale
|
|
7942
|
+
colorScale,
|
|
7837
7943
|
style: {
|
|
7838
7944
|
data: {
|
|
7839
7945
|
padding,
|
|
@@ -7857,7 +7963,7 @@ const material = {
|
|
|
7857
7963
|
}
|
|
7858
7964
|
}, baseProps),
|
|
7859
7965
|
stack: Object.assign({
|
|
7860
|
-
colorScale
|
|
7966
|
+
colorScale
|
|
7861
7967
|
}, baseProps),
|
|
7862
7968
|
tooltip: {
|
|
7863
7969
|
style: Object.assign({}, baseLabelStyles, {
|
|
@@ -10823,6 +10929,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10823
10929
|
/* harmony export */ "getColorScale": function() { return /* binding */ getColorScale; },
|
|
10824
10930
|
/* harmony export */ "toTransformString": function() { return /* binding */ toTransformString; }
|
|
10825
10931
|
/* harmony export */ });
|
|
10932
|
+
/* 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");
|
|
10933
|
+
|
|
10934
|
+
|
|
10826
10935
|
/**
|
|
10827
10936
|
* Given an object with CSS/SVG transform definitions, return the string value
|
|
10828
10937
|
* for use with the `transform` CSS property or SVG attribute. Note that we
|
|
@@ -10859,20 +10968,37 @@ const toTransformString = function (obj) {
|
|
|
10859
10968
|
* of 5 hex string values in that color scale. If no 'name' parameter
|
|
10860
10969
|
* is given, it will return the Victory default grayscale.
|
|
10861
10970
|
* @param {String} name The name of the color scale to return (optional).
|
|
10971
|
+
* @param {Object} theme The theme object to retrieve the color scale from (optional).
|
|
10862
10972
|
* @returns {Array} An array of 5 hex string values composing a color scale.
|
|
10863
10973
|
*/
|
|
10864
|
-
function getColorScale(name) {
|
|
10974
|
+
function getColorScale(name, theme) {
|
|
10975
|
+
if (theme === void 0) {
|
|
10976
|
+
theme = _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__.VictoryTheme.material;
|
|
10977
|
+
}
|
|
10978
|
+
const {
|
|
10979
|
+
palette: {
|
|
10980
|
+
grayscale = ["#cccccc", "#969696", "#636363", "#252525"],
|
|
10981
|
+
qualitative = [],
|
|
10982
|
+
heatmap = [],
|
|
10983
|
+
warm = [],
|
|
10984
|
+
cool = [],
|
|
10985
|
+
red = [],
|
|
10986
|
+
blue = [],
|
|
10987
|
+
green = []
|
|
10988
|
+
} = {}
|
|
10989
|
+
} = theme;
|
|
10865
10990
|
const scales = {
|
|
10866
|
-
grayscale
|
|
10867
|
-
qualitative
|
|
10868
|
-
heatmap
|
|
10869
|
-
warm
|
|
10870
|
-
cool
|
|
10871
|
-
red
|
|
10872
|
-
blue
|
|
10873
|
-
green
|
|
10991
|
+
grayscale,
|
|
10992
|
+
qualitative,
|
|
10993
|
+
heatmap,
|
|
10994
|
+
warm,
|
|
10995
|
+
cool,
|
|
10996
|
+
red,
|
|
10997
|
+
blue,
|
|
10998
|
+
green
|
|
10874
10999
|
};
|
|
10875
|
-
|
|
11000
|
+
const selectedScale = name && scales[name]?.length ? scales[name] : scales.grayscale;
|
|
11001
|
+
return selectedScale;
|
|
10876
11002
|
}
|
|
10877
11003
|
|
|
10878
11004
|
/***/ }),
|