victory-polar-axis 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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # victory-polar-axis
2
2
 
3
+ ## 37.3.0
4
+
5
+ ## 37.2.0
6
+
3
7
  ## 37.1.2
4
8
 
5
9
  ### Patch Changes
@@ -6286,31 +6286,34 @@ __webpack_require__.r(__webpack_exports__);
6286
6286
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6287
6287
  /* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
6288
6288
  /* harmony export */ });
6289
- /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
6290
- /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
6291
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
6292
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
6293
- /* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
6294
- /* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
6295
- /* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
6289
+ /* 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");
6290
+ /* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0__);
6291
+ /* 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");
6292
+ /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
6293
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
6294
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
6295
+ /* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
6296
+ /* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
6297
+ /* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
6298
+
6296
6299
 
6297
6300
 
6298
6301
 
6299
6302
 
6300
6303
 
6301
6304
  const defaultProps = {
6302
- groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
6305
+ groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("g", null)
6303
6306
  };
6304
6307
  const VictoryPortal = initialProps => {
6305
6308
  const props = {
6306
6309
  ...defaultProps,
6307
6310
  ...initialProps
6308
6311
  };
6309
- const id = react__WEBPACK_IMPORTED_MODULE_1___default().useId();
6310
- const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_2__.usePortalContext)();
6312
+ const [id] = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_0___default()());
6313
+ const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
6311
6314
  if (!portalContext) {
6312
6315
  const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
6313
- _victory_util_log__WEBPACK_IMPORTED_MODULE_3__.warn(msg);
6316
+ _victory_util_log__WEBPACK_IMPORTED_MODULE_4__.warn(msg);
6314
6317
  }
6315
6318
  const children = Array.isArray(props.children) ? props.children[0] : props.children;
6316
6319
  const {
@@ -6321,15 +6324,15 @@ const VictoryPortal = initialProps => {
6321
6324
  groupComponent,
6322
6325
  standalone: false
6323
6326
  } : {};
6324
- const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(props, ["children", "groupComponent"]), {
6327
+ const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
6325
6328
  key: childProps.key ?? id
6326
6329
  });
6327
- const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(children, newProps);
6328
- react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6330
+ const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(children, newProps);
6331
+ react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
6329
6332
  portalContext?.addChild(id, child);
6330
6333
  // eslint-disable-next-line react-hooks/exhaustive-deps
6331
6334
  }, [props.children]);
6332
- react__WEBPACK_IMPORTED_MODULE_1___default().useEffect(() => {
6335
+ react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => {
6333
6336
  return () => portalContext?.removeChild(id);
6334
6337
  // eslint-disable-next-line react-hooks/exhaustive-deps
6335
6338
  }, []);
@@ -6750,20 +6753,16 @@ const orange = {
6750
6753
  "100": "#FEE2D5",
6751
6754
  "300": "#FFA981",
6752
6755
  "500": "#FF6F2C",
6756
+ "700": "#FF4E1B",
6753
6757
  "900": "#D74D26"
6754
6758
  };
6755
6759
  const red = {
6756
6760
  "100": "#FFDCE5",
6757
6761
  "300": "#FF9EB7",
6758
6762
  "500": "#F82B60",
6763
+ "700": "#D31A3D",
6759
6764
  "900": "#BA1E45"
6760
6765
  };
6761
- const pink = {
6762
- "100": "#FFDAF6",
6763
- "300": "#F99DE2",
6764
- "500": "#FF08C2",
6765
- "900": "#B2158B"
6766
- };
6767
6766
  const purple = {
6768
6767
  "100": "#EDE3FE",
6769
6768
  "300": "#CDB0FF",
@@ -6774,6 +6773,7 @@ const blue = {
6774
6773
  "100": "#CFDFFF",
6775
6774
  "300": "#9CC7FF",
6776
6775
  "500": "#2D7FF9",
6776
+ "700": "#0056B3",
6777
6777
  "900": "#2750AE"
6778
6778
  };
6779
6779
  const cyan = {
@@ -6792,9 +6792,29 @@ const green = {
6792
6792
  "100": "#D1F7C4",
6793
6793
  "300": "#93E088",
6794
6794
  "500": "#20C933",
6795
+ "700": "#1B9B2A",
6795
6796
  "900": "#338A17"
6796
6797
  };
6797
- const colors = [blue["500"], pink["500"], teal["500"], purple["500"], green["500"], orange["500"], cyan["500"], red["500"], yellow["500"]];
6798
+ const colors = {
6799
+ blue: blue["500"],
6800
+ cyan: cyan["500"],
6801
+ green: green["500"],
6802
+ yellow: yellow["500"],
6803
+ orange: orange["500"],
6804
+ red: red["500"],
6805
+ purple: purple["500"],
6806
+ teal: teal["500"]
6807
+ };
6808
+ const colorScale = Object.values(colors);
6809
+ const grayscale = [gray["100"], gray["300"], gray["500"], gray["700"], gray["900"]];
6810
+ const warm = [yellow["300"], yellow["500"], orange["500"], orange["900"], red["500"]];
6811
+ const cool = [purple["500"], blue["500"], cyan["500"], teal["500"], green["500"]];
6812
+ const heatmap = [green["900"], green["500"], yellow["500"], orange["500"], red["500"]];
6813
+ const redPalette = Object.values(red);
6814
+ const greenPalette = Object.values(green);
6815
+ const bluePalette = Object.values(blue);
6816
+ const defaultColor = blue["500"];
6817
+
6798
6818
  // *
6799
6819
  // * Typography
6800
6820
  // *
@@ -6808,8 +6828,8 @@ const padding = 8;
6808
6828
  const baseProps = {
6809
6829
  width: 450,
6810
6830
  height: 300,
6811
- padding: 50,
6812
- colorScale: colors
6831
+ padding: 60,
6832
+ colorScale
6813
6833
  };
6814
6834
  // *
6815
6835
  // * Labels
@@ -6838,10 +6858,23 @@ const borderRadius = 1;
6838
6858
  // * Theme
6839
6859
  // *
6840
6860
  const clean = {
6861
+ palette: {
6862
+ colors,
6863
+ grayscale,
6864
+ qualitative: colorScale,
6865
+ heatmap,
6866
+ warm,
6867
+ cool,
6868
+ red: redPalette,
6869
+ green: greenPalette,
6870
+ blue: bluePalette
6871
+ },
6841
6872
  area: Object.assign({
6842
6873
  style: {
6843
6874
  data: {
6844
- fill: cyan["500"]
6875
+ fill: defaultColor,
6876
+ strokeWidth: 2,
6877
+ fillOpacity: 0.5
6845
6878
  },
6846
6879
  labels: baseLabelStyles
6847
6880
  }
@@ -6850,13 +6883,13 @@ const clean = {
6850
6883
  style: {
6851
6884
  axis: {
6852
6885
  fill: "transparent",
6853
- stroke: gray["300"],
6886
+ stroke: gray["500"],
6854
6887
  strokeWidth: 1,
6855
6888
  strokeLinecap,
6856
6889
  strokeLinejoin
6857
6890
  },
6858
6891
  axisLabel: Object.assign({}, centeredLabelStyles, {
6859
- padding,
6892
+ padding: 35,
6860
6893
  stroke: "transparent"
6861
6894
  }),
6862
6895
  grid: {
@@ -6875,10 +6908,10 @@ const clean = {
6875
6908
  polarAxis: Object.assign({
6876
6909
  style: {
6877
6910
  axis: {
6878
- stroke: gray["300"]
6911
+ stroke: gray["500"]
6879
6912
  },
6880
6913
  grid: {
6881
- stroke: gray["200"],
6914
+ stroke: gray["400"],
6882
6915
  strokeDasharray,
6883
6916
  strokeLinecap,
6884
6917
  strokeLinejoin,
@@ -6887,7 +6920,7 @@ const clean = {
6887
6920
  ticks: {
6888
6921
  fill: "transparent",
6889
6922
  size: 5,
6890
- stroke: gray["200"],
6923
+ stroke: gray["400"],
6891
6924
  strokeWidth: 1,
6892
6925
  strokeLinecap,
6893
6926
  strokeLinejoin
@@ -6898,10 +6931,10 @@ const clean = {
6898
6931
  polarDependentAxis: Object.assign({
6899
6932
  style: {
6900
6933
  axis: {
6901
- stroke: gray["300"]
6934
+ stroke: gray["500"]
6902
6935
  },
6903
6936
  grid: {
6904
- stroke: gray["200"],
6937
+ stroke: gray["400"],
6905
6938
  strokeDasharray,
6906
6939
  strokeLinecap,
6907
6940
  strokeLinejoin,
@@ -6910,7 +6943,7 @@ const clean = {
6910
6943
  ticks: {
6911
6944
  fill: "transparent",
6912
6945
  size: 5,
6913
- stroke: gray["200"],
6946
+ stroke: gray["300"],
6914
6947
  strokeWidth: 1,
6915
6948
  strokeLinecap,
6916
6949
  strokeLinejoin
@@ -6921,9 +6954,10 @@ const clean = {
6921
6954
  bar: Object.assign({
6922
6955
  style: {
6923
6956
  data: {
6924
- fill: blue["500"],
6957
+ fill: defaultColor,
6925
6958
  padding,
6926
- strokeWidth: 0
6959
+ strokeWidth: 1,
6960
+ fillOpacity: 0.5
6927
6961
  },
6928
6962
  labels: baseLabelStyles
6929
6963
  },
@@ -6959,15 +6993,16 @@ const clean = {
6959
6993
  }),
6960
6994
  q1: {
6961
6995
  padding,
6962
- fill: teal["500"],
6963
- rx: borderRadius
6996
+ fill: colorScale[0],
6997
+ rx: borderRadius,
6998
+ strokeWidth: 2
6964
6999
  },
6965
7000
  q1Labels: Object.assign({}, baseLabelStyles, {
6966
7001
  padding: 3
6967
7002
  }),
6968
7003
  q3: {
6969
7004
  padding,
6970
- fill: teal["500"],
7005
+ fill: colorScale[1],
6971
7006
  rx: borderRadius
6972
7007
  },
6973
7008
  q3Labels: Object.assign({}, baseLabelStyles, {
@@ -6988,8 +7023,8 @@ const clean = {
6988
7023
  })
6989
7024
  },
6990
7025
  candleColors: {
6991
- positive: teal["500"],
6992
- negative: orange["500"]
7026
+ positive: green["500"],
7027
+ negative: red["500"]
6993
7028
  },
6994
7029
  wickStrokeWidth: 2
6995
7030
  }, baseProps),
@@ -7008,14 +7043,13 @@ const clean = {
7008
7043
  }
7009
7044
  }, baseProps),
7010
7045
  group: Object.assign({
7011
- colorScale: colors
7046
+ colorScale
7012
7047
  }, baseProps),
7013
7048
  histogram: Object.assign({
7014
7049
  style: {
7015
7050
  data: {
7016
7051
  fill: cyan["500"],
7017
- stroke: "transparent",
7018
- strokeWidth: 0
7052
+ fillOpacity: 0.5
7019
7053
  },
7020
7054
  labels: baseLabelStyles
7021
7055
  },
@@ -7026,21 +7060,23 @@ const clean = {
7026
7060
  }, baseProps),
7027
7061
  label: baseLabelStyles,
7028
7062
  legend: {
7029
- colorScale: colors,
7030
- gutter: 10,
7031
- orientation: "vertical",
7063
+ colorScale,
7064
+ gutter: 24,
7065
+ borderPadding: 10,
7066
+ orientation: "horizontal",
7032
7067
  titleOrientation: "top",
7068
+ centerTitle: true,
7033
7069
  style: {
7034
7070
  data: {
7035
7071
  type: "circle"
7036
7072
  },
7037
7073
  labels: {
7038
7074
  ...baseLabelStyles,
7039
- fontSize: 14
7075
+ fontSize: 12
7040
7076
  },
7041
7077
  title: Object.assign({}, baseLabelStyles, {
7042
7078
  padding,
7043
- fontSize: 20
7079
+ fontSize: 16
7044
7080
  }),
7045
7081
  border: {
7046
7082
  stroke: gray["200"],
@@ -7054,7 +7090,7 @@ const clean = {
7054
7090
  data: {
7055
7091
  fill: "transparent",
7056
7092
  opacity: 1,
7057
- stroke: pink["500"],
7093
+ stroke: defaultColor,
7058
7094
  strokeWidth: 2,
7059
7095
  strokeLinecap,
7060
7096
  strokeLinejoin
@@ -7064,31 +7100,40 @@ const clean = {
7064
7100
  }, baseProps),
7065
7101
  pie: Object.assign({
7066
7102
  style: {
7103
+ parent: {
7104
+ backgroundColor: gray.white
7105
+ },
7067
7106
  data: {
7068
7107
  padding,
7069
7108
  stroke: gray.white,
7070
7109
  strokeWidth: 1
7071
7110
  },
7072
- labels: Object.assign({}, baseLabelStyles, {
7073
- padding: 20
7074
- })
7111
+ labels: {
7112
+ ...baseLabelStyles,
7113
+ padding: 20,
7114
+ fill: gray["600"],
7115
+ fontSize: 10
7116
+ }
7075
7117
  },
7076
- colorScale: colors,
7118
+ colorScale,
7077
7119
  cornerRadius: borderRadius
7078
7120
  }, baseProps),
7079
7121
  scatter: Object.assign({
7080
7122
  style: {
7081
7123
  data: {
7082
- fill: purple["500"],
7124
+ fill: defaultColor,
7083
7125
  opacity: 1,
7084
7126
  stroke: "transparent",
7085
7127
  strokeWidth: 0
7086
7128
  },
7087
- labels: baseLabelStyles
7129
+ labels: {
7130
+ ...baseLabelStyles,
7131
+ padding: 20
7132
+ }
7088
7133
  }
7089
7134
  }, baseProps),
7090
7135
  stack: Object.assign({
7091
- colorScale: colors
7136
+ colorScale
7092
7137
  }, baseProps),
7093
7138
  tooltip: {
7094
7139
  style: Object.assign({}, baseLabelStyles, {
@@ -7096,7 +7141,7 @@ const clean = {
7096
7141
  pointerEvents: "none"
7097
7142
  }),
7098
7143
  flyoutStyle: {
7099
- stroke: gray["500"],
7144
+ stroke: gray["300"],
7100
7145
  strokeWidth: 2,
7101
7146
  fill: gray.white,
7102
7147
  pointerEvents: "none"
@@ -7113,8 +7158,8 @@ const clean = {
7113
7158
  voronoi: Object.assign({
7114
7159
  style: {
7115
7160
  data: {
7116
- fill: red["100"],
7117
- stroke: red["500"],
7161
+ fill: blue["100"],
7162
+ stroke: defaultColor,
7118
7163
  strokeWidth: 2
7119
7164
  },
7120
7165
  labels: Object.assign({}, baseLabelStyles, {
@@ -7151,9 +7196,28 @@ __webpack_require__.r(__webpack_exports__);
7151
7196
  // *
7152
7197
  // * Colors
7153
7198
  // *
7154
- const colors = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
7199
+ const colors = {
7200
+ blue: "#4F7DA1",
7201
+ pink: "#E2A37F",
7202
+ teal: "#00796B",
7203
+ purple: "#DF948A",
7204
+ green: "#8BC34A",
7205
+ orange: "#F4511E",
7206
+ cyan: "#006064",
7207
+ red: "#DF5A49",
7208
+ yellow: "#FFF59D"
7209
+ };
7210
+ const colorScale = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
7155
7211
  const charcoal = "#252525";
7156
7212
  const grey = "#969696";
7213
+ const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
7214
+ const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
7215
+ const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
7216
+ const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
7217
+ const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
7218
+ const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
7219
+ const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
7220
+
7157
7221
  // *
7158
7222
  // * Typography
7159
7223
  // *
@@ -7167,7 +7231,7 @@ const baseProps = {
7167
7231
  width: 450,
7168
7232
  height: 300,
7169
7233
  padding: 50,
7170
- colorScale: colors
7234
+ colorScale
7171
7235
  };
7172
7236
  // *
7173
7237
  // * Labels
@@ -7189,6 +7253,17 @@ const centeredLabelStyles = Object.assign({
7189
7253
  const strokeLinecap = "round";
7190
7254
  const strokeLinejoin = "round";
7191
7255
  const grayscale = {
7256
+ palette: {
7257
+ colors,
7258
+ grayscale: colorScale,
7259
+ qualitative,
7260
+ heatmap,
7261
+ warm,
7262
+ cool,
7263
+ red,
7264
+ green,
7265
+ blue
7266
+ },
7192
7267
  area: Object.assign({
7193
7268
  style: {
7194
7269
  data: {
@@ -7303,7 +7378,7 @@ const grayscale = {
7303
7378
  }
7304
7379
  }, baseProps),
7305
7380
  group: Object.assign({
7306
- colorScale: colors
7381
+ colorScale
7307
7382
  }, baseProps),
7308
7383
  histogram: Object.assign({
7309
7384
  style: {
@@ -7316,7 +7391,7 @@ const grayscale = {
7316
7391
  }
7317
7392
  }, baseProps),
7318
7393
  legend: {
7319
- colorScale: colors,
7394
+ colorScale,
7320
7395
  gutter: 10,
7321
7396
  orientation: "vertical",
7322
7397
  titleOrientation: "top",
@@ -7351,7 +7426,7 @@ const grayscale = {
7351
7426
  padding: 20
7352
7427
  })
7353
7428
  },
7354
- colorScale: colors,
7429
+ colorScale,
7355
7430
  width: 400,
7356
7431
  height: 400,
7357
7432
  padding: 50
@@ -7367,7 +7442,7 @@ const grayscale = {
7367
7442
  }
7368
7443
  }, baseProps),
7369
7444
  stack: Object.assign({
7370
- colorScale: colors
7445
+ colorScale
7371
7446
  }, baseProps),
7372
7447
  tooltip: {
7373
7448
  style: Object.assign({}, baseLabelStyles, {
@@ -7427,11 +7502,31 @@ const lime300 = "#DCE775";
7427
7502
  const lightGreen500 = "#8BC34A";
7428
7503
  const teal700 = "#00796B";
7429
7504
  const cyan900 = "#006064";
7430
- const colors = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
7505
+ const colorScale = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
7431
7506
  const blueGrey50 = "#ECEFF1";
7432
7507
  const blueGrey300 = "#90A4AE";
7433
7508
  const blueGrey700 = "#455A64";
7434
7509
  const grey900 = "#212121";
7510
+ const colors = {
7511
+ blue: "#4F7DA1",
7512
+ pink: "#E2A37F",
7513
+ teal: teal700,
7514
+ purple: "#DF948A",
7515
+ green: lightGreen500,
7516
+ orange: deepOrange600,
7517
+ cyan: cyan900,
7518
+ red: "#DF5A49",
7519
+ yellow: yellow200
7520
+ };
7521
+ const grayscale = [blueGrey50, blueGrey300, blueGrey700, grey900];
7522
+ const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
7523
+ const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
7524
+ const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
7525
+ const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
7526
+ const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
7527
+ const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
7528
+ const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
7529
+
7435
7530
  // *
7436
7531
  // * Typography
7437
7532
  // *
@@ -7469,6 +7564,17 @@ const strokeDasharray = "10, 5";
7469
7564
  const strokeLinecap = "round";
7470
7565
  const strokeLinejoin = "round";
7471
7566
  const material = {
7567
+ palette: {
7568
+ colors,
7569
+ grayscale,
7570
+ qualitative,
7571
+ heatmap,
7572
+ warm,
7573
+ cool,
7574
+ red,
7575
+ green,
7576
+ blue
7577
+ },
7472
7578
  area: Object.assign({
7473
7579
  style: {
7474
7580
  data: {
@@ -7601,7 +7707,7 @@ const material = {
7601
7707
  }
7602
7708
  }, baseProps),
7603
7709
  group: Object.assign({
7604
- colorScale: colors
7710
+ colorScale
7605
7711
  }, baseProps),
7606
7712
  histogram: Object.assign({
7607
7713
  style: {
@@ -7614,7 +7720,7 @@ const material = {
7614
7720
  }
7615
7721
  }, baseProps),
7616
7722
  legend: {
7617
- colorScale: colors,
7723
+ colorScale,
7618
7724
  gutter: 10,
7619
7725
  orientation: "vertical",
7620
7726
  titleOrientation: "top",
@@ -7640,7 +7746,7 @@ const material = {
7640
7746
  }
7641
7747
  }, baseProps),
7642
7748
  pie: Object.assign({
7643
- colorScale: colors,
7749
+ colorScale,
7644
7750
  style: {
7645
7751
  data: {
7646
7752
  padding,
@@ -7664,7 +7770,7 @@ const material = {
7664
7770
  }
7665
7771
  }, baseProps),
7666
7772
  stack: Object.assign({
7667
- colorScale: colors
7773
+ colorScale
7668
7774
  }, baseProps),
7669
7775
  tooltip: {
7670
7776
  style: Object.assign({}, baseLabelStyles, {
@@ -10909,6 +11015,9 @@ __webpack_require__.r(__webpack_exports__);
10909
11015
  /* harmony export */ "getColorScale": function() { return /* binding */ getColorScale; },
10910
11016
  /* harmony export */ "toTransformString": function() { return /* binding */ toTransformString; }
10911
11017
  /* harmony export */ });
11018
+ /* 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");
11019
+
11020
+
10912
11021
  /**
10913
11022
  * Given an object with CSS/SVG transform definitions, return the string value
10914
11023
  * for use with the `transform` CSS property or SVG attribute. Note that we
@@ -10945,20 +11054,37 @@ const toTransformString = function (obj) {
10945
11054
  * of 5 hex string values in that color scale. If no 'name' parameter
10946
11055
  * is given, it will return the Victory default grayscale.
10947
11056
  * @param {String} name The name of the color scale to return (optional).
11057
+ * @param {Object} theme The theme object to retrieve the color scale from (optional).
10948
11058
  * @returns {Array} An array of 5 hex string values composing a color scale.
10949
11059
  */
10950
- function getColorScale(name) {
11060
+ function getColorScale(name, theme) {
11061
+ if (theme === void 0) {
11062
+ theme = _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__.VictoryTheme.material;
11063
+ }
11064
+ const {
11065
+ palette: {
11066
+ grayscale = ["#cccccc", "#969696", "#636363", "#252525"],
11067
+ qualitative = [],
11068
+ heatmap = [],
11069
+ warm = [],
11070
+ cool = [],
11071
+ red = [],
11072
+ blue = [],
11073
+ green = []
11074
+ } = {}
11075
+ } = theme;
10951
11076
  const scales = {
10952
- grayscale: ["#cccccc", "#969696", "#636363", "#252525"],
10953
- qualitative: ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"],
10954
- heatmap: ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"],
10955
- warm: ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"],
10956
- cool: ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"],
10957
- red: ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"],
10958
- blue: ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"],
10959
- green: ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"]
11077
+ grayscale,
11078
+ qualitative,
11079
+ heatmap,
11080
+ warm,
11081
+ cool,
11082
+ red,
11083
+ blue,
11084
+ green
10960
11085
  };
10961
- return name ? scales[name] : scales.grayscale;
11086
+ const selectedScale = name && scales[name]?.length ? scales[name] : scales.grayscale;
11087
+ return selectedScale;
10962
11088
  }
10963
11089
 
10964
11090
  /***/ }),