victory-group 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.
@@ -227,14 +227,15 @@ function getChildren(initialProps, childComponents, calculatedProps) {
227
227
  } = newCalculatedProps;
228
228
  const {
229
229
  labelComponent,
230
- polar
230
+ polar,
231
+ theme
231
232
  } = props;
232
233
  const childProps = getChildProps(props, newCalculatedProps);
233
234
  const parentName = props.name || "group";
234
235
  return children.map((child, index) => {
235
236
  const role = child.type && child.type.role;
236
237
  const xOffset = polar ? getPolarX0(props, newCalculatedProps, index, role) : getX0(props, newCalculatedProps, index, role);
237
- const style = role === "voronoi" || role === "tooltip" || role === "label" ? child.props.style : victory_core__WEBPACK_IMPORTED_MODULE_3__.getChildStyle(child, index, newCalculatedProps);
238
+ const style = role === "voronoi" || role === "tooltip" || role === "label" ? child.props.style : victory_core__WEBPACK_IMPORTED_MODULE_3__.getChildStyle(child, index, newCalculatedProps, theme);
238
239
  const labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
239
240
  const name = child.props.name || `${parentName}-${role}-${index}`;
240
241
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, Object.assign({
@@ -5271,6 +5272,477 @@ const Portal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forward
5271
5272
 
5272
5273
  /***/ }),
5273
5274
 
5275
+ /***/ "../../victory-core/es/victory-theme/clean.js":
5276
+ /*!****************************************************!*\
5277
+ !*** ../../victory-core/es/victory-theme/clean.js ***!
5278
+ \****************************************************/
5279
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5280
+
5281
+ "use strict";
5282
+ __webpack_require__.r(__webpack_exports__);
5283
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5284
+ /* harmony export */ "clean": function() { return /* binding */ clean; }
5285
+ /* harmony export */ });
5286
+ // *
5287
+ // * Colors
5288
+ // *
5289
+
5290
+ const gray = {
5291
+ white: "#FFFFFF",
5292
+ "50": "#FAFAFA",
5293
+ "100": "#F2F2F2",
5294
+ "200": "#E8E8E8",
5295
+ "300": "#E0E0E0",
5296
+ "400": "#D1D1D1",
5297
+ "500": "#757575",
5298
+ "600": "#5C5C5C",
5299
+ "700": "#424242",
5300
+ "800": "#333333",
5301
+ "900": "#292929",
5302
+ black: "#0F0F0F"
5303
+ };
5304
+ const yellow = {
5305
+ "100": "#FFEAB6",
5306
+ "300": "#FFD66E",
5307
+ "500": "#FCB400",
5308
+ "900": "#B87503"
5309
+ };
5310
+ const orange = {
5311
+ "100": "#FEE2D5",
5312
+ "300": "#FFA981",
5313
+ "500": "#FF6F2C",
5314
+ "900": "#D74D26"
5315
+ };
5316
+ const red = {
5317
+ "100": "#FFDCE5",
5318
+ "300": "#FF9EB7",
5319
+ "500": "#F82B60",
5320
+ "900": "#BA1E45"
5321
+ };
5322
+ const pink = {
5323
+ "100": "#FFDAF6",
5324
+ "300": "#F99DE2",
5325
+ "500": "#FF08C2",
5326
+ "900": "#B2158B"
5327
+ };
5328
+ const purple = {
5329
+ "100": "#EDE3FE",
5330
+ "300": "#CDB0FF",
5331
+ "500": "#8B46FF",
5332
+ "900": "#6B1CB0"
5333
+ };
5334
+ const blue = {
5335
+ "100": "#CFDFFF",
5336
+ "300": "#9CC7FF",
5337
+ "500": "#2D7FF9",
5338
+ "900": "#2750AE"
5339
+ };
5340
+ const cyan = {
5341
+ "100": "#D0F0FD",
5342
+ "300": "#77D1F3",
5343
+ "500": "#18BFFF",
5344
+ "900": "#0B76B7"
5345
+ };
5346
+ const teal = {
5347
+ "100": "#C2F5E9",
5348
+ "300": "#72DDC3",
5349
+ "500": "#20D9D2",
5350
+ "900": "#06A09B"
5351
+ };
5352
+ const green = {
5353
+ "100": "#D1F7C4",
5354
+ "300": "#93E088",
5355
+ "500": "#20C933",
5356
+ "900": "#338A17"
5357
+ };
5358
+ const colors = {
5359
+ blue: blue["500"],
5360
+ pink: pink["500"],
5361
+ teal: teal["500"],
5362
+ purple: purple["500"],
5363
+ green: green["500"],
5364
+ orange: orange["500"],
5365
+ cyan: cyan["500"],
5366
+ red: red["500"],
5367
+ yellow: yellow["500"]
5368
+ };
5369
+ const colorScale = Object.values(colors);
5370
+ const grayscale = [gray["200"], gray["400"], gray["600"], gray["900"]];
5371
+ const warm = [yellow["500"], orange["500"], red["500"], pink["500"]];
5372
+ const cool = [cyan["500"], teal["500"], blue["500"], purple["500"]];
5373
+ const heatmap = [green["500"], yellow["500"], red["500"]];
5374
+ const redPalette = [red["500"], red["300"], red["100"]];
5375
+ const greenPalette = [green["500"], green["300"], green["100"]];
5376
+ const bluePalette = [blue["500"], blue["300"], blue["100"]];
5377
+
5378
+ // *
5379
+ // * Typography
5380
+ // *
5381
+ const sansSerif = "'Inter', 'Helvetica Neue', 'Seravek', 'Helvetica', sans-serif";
5382
+ const letterSpacing = "normal";
5383
+ const fontSize = 12;
5384
+ // *
5385
+ // * Layout
5386
+ // *
5387
+ const padding = 8;
5388
+ const baseProps = {
5389
+ width: 450,
5390
+ height: 300,
5391
+ padding: 50,
5392
+ colorScale
5393
+ };
5394
+ // *
5395
+ // * Labels
5396
+ // *
5397
+ const baseLabelStyles = {
5398
+ fontFamily: sansSerif,
5399
+ fontSize,
5400
+ fontWeight: 300,
5401
+ letterSpacing,
5402
+ padding,
5403
+ fill: gray["900"],
5404
+ stroke: "transparent"
5405
+ };
5406
+ const centeredLabelStyles = Object.assign({
5407
+ textAnchor: "middle"
5408
+ }, baseLabelStyles);
5409
+
5410
+ // *
5411
+ // * Strokes
5412
+ // *
5413
+ const strokeDasharray = "10, 5";
5414
+ const strokeLinecap = "round";
5415
+ const strokeLinejoin = "round";
5416
+ const borderRadius = 1;
5417
+ // *
5418
+ // * Theme
5419
+ // *
5420
+ const clean = {
5421
+ palette: {
5422
+ colors,
5423
+ grayscale,
5424
+ qualitative: colorScale,
5425
+ heatmap,
5426
+ warm,
5427
+ cool,
5428
+ red: redPalette,
5429
+ green: greenPalette,
5430
+ blue: bluePalette
5431
+ },
5432
+ area: Object.assign({
5433
+ style: {
5434
+ data: {
5435
+ fill: blue["500"],
5436
+ strokeWidth: 2,
5437
+ fillOpacity: 0.5
5438
+ },
5439
+ labels: baseLabelStyles
5440
+ }
5441
+ }, baseProps),
5442
+ axis: Object.assign({
5443
+ style: {
5444
+ axis: {
5445
+ fill: "transparent",
5446
+ stroke: gray["500"],
5447
+ strokeWidth: 1,
5448
+ strokeLinecap,
5449
+ strokeLinejoin
5450
+ },
5451
+ axisLabel: Object.assign({}, centeredLabelStyles, {
5452
+ padding,
5453
+ stroke: "transparent"
5454
+ }),
5455
+ grid: {
5456
+ fill: "none",
5457
+ stroke: "none",
5458
+ painterEvents: "painted"
5459
+ },
5460
+ ticks: {
5461
+ fill: "transparent",
5462
+ size: 5,
5463
+ stroke: "transparent"
5464
+ },
5465
+ tickLabels: baseLabelStyles
5466
+ }
5467
+ }, baseProps),
5468
+ polarAxis: Object.assign({
5469
+ style: {
5470
+ axis: {
5471
+ stroke: gray["500"]
5472
+ },
5473
+ grid: {
5474
+ stroke: gray["400"],
5475
+ strokeDasharray,
5476
+ strokeLinecap,
5477
+ strokeLinejoin,
5478
+ pointerEvents: "painted"
5479
+ },
5480
+ ticks: {
5481
+ fill: "transparent",
5482
+ size: 5,
5483
+ stroke: gray["400"],
5484
+ strokeWidth: 1,
5485
+ strokeLinecap,
5486
+ strokeLinejoin
5487
+ },
5488
+ tickLabels: baseLabelStyles
5489
+ }
5490
+ }),
5491
+ polarDependentAxis: Object.assign({
5492
+ style: {
5493
+ axis: {
5494
+ stroke: gray["500"]
5495
+ },
5496
+ grid: {
5497
+ stroke: gray["400"],
5498
+ strokeDasharray,
5499
+ strokeLinecap,
5500
+ strokeLinejoin,
5501
+ pointerEvents: "painted"
5502
+ },
5503
+ ticks: {
5504
+ fill: "transparent",
5505
+ size: 5,
5506
+ stroke: gray["300"],
5507
+ strokeWidth: 1,
5508
+ strokeLinecap,
5509
+ strokeLinejoin
5510
+ },
5511
+ tickLabels: baseLabelStyles
5512
+ }
5513
+ }),
5514
+ bar: Object.assign({
5515
+ style: {
5516
+ data: {
5517
+ fill: blue["500"],
5518
+ padding,
5519
+ strokeWidth: 1,
5520
+ fillOpacity: 0.5
5521
+ },
5522
+ labels: baseLabelStyles
5523
+ },
5524
+ cornerRadius: {
5525
+ top: borderRadius
5526
+ }
5527
+ }, baseProps),
5528
+ boxplot: Object.assign({
5529
+ style: {
5530
+ max: {
5531
+ padding,
5532
+ stroke: gray["400"],
5533
+ strokeWidth: 2
5534
+ },
5535
+ maxLabels: Object.assign({}, baseLabelStyles, {
5536
+ padding: 3
5537
+ }),
5538
+ median: {
5539
+ padding,
5540
+ stroke: gray.white,
5541
+ strokeWidth: 2
5542
+ },
5543
+ medianLabels: Object.assign({}, baseLabelStyles, {
5544
+ padding: 3
5545
+ }),
5546
+ min: {
5547
+ padding,
5548
+ stroke: gray["400"],
5549
+ strokeWidth: 2
5550
+ },
5551
+ minLabels: Object.assign({}, baseLabelStyles, {
5552
+ padding: 3
5553
+ }),
5554
+ q1: {
5555
+ padding,
5556
+ fill: teal["500"],
5557
+ rx: borderRadius,
5558
+ strokeWidth: 2
5559
+ },
5560
+ q1Labels: Object.assign({}, baseLabelStyles, {
5561
+ padding: 3
5562
+ }),
5563
+ q3: {
5564
+ padding,
5565
+ fill: cyan["500"],
5566
+ rx: borderRadius
5567
+ },
5568
+ q3Labels: Object.assign({}, baseLabelStyles, {
5569
+ padding: 3
5570
+ })
5571
+ },
5572
+ boxWidth: 20
5573
+ }, baseProps),
5574
+ candlestick: Object.assign({
5575
+ style: {
5576
+ data: {
5577
+ stroke: gray["300"],
5578
+ strokeWidth: 0,
5579
+ rx: borderRadius
5580
+ },
5581
+ labels: Object.assign({}, baseLabelStyles, {
5582
+ padding: 5
5583
+ })
5584
+ },
5585
+ candleColors: {
5586
+ positive: teal["500"],
5587
+ negative: orange["500"]
5588
+ },
5589
+ wickStrokeWidth: 2
5590
+ }, baseProps),
5591
+ chart: baseProps,
5592
+ errorbar: Object.assign({
5593
+ borderWidth: 8,
5594
+ style: {
5595
+ data: {
5596
+ fill: "transparent",
5597
+ opacity: 1,
5598
+ stroke: gray["700"],
5599
+ strokeWidth: 2,
5600
+ strokeLinecap
5601
+ },
5602
+ labels: baseLabelStyles
5603
+ }
5604
+ }, baseProps),
5605
+ group: Object.assign({
5606
+ colorScale
5607
+ }, baseProps),
5608
+ histogram: Object.assign({
5609
+ style: {
5610
+ data: {
5611
+ fill: cyan["500"],
5612
+ fillOpacity: 0.5
5613
+ },
5614
+ labels: baseLabelStyles
5615
+ },
5616
+ binSpacing: 4,
5617
+ cornerRadius: {
5618
+ top: borderRadius
5619
+ }
5620
+ }, baseProps),
5621
+ label: baseLabelStyles,
5622
+ legend: {
5623
+ colorScale,
5624
+ gutter: 24,
5625
+ borderPadding: 10,
5626
+ orientation: "horizontal",
5627
+ titleOrientation: "top",
5628
+ centerTitle: true,
5629
+ style: {
5630
+ data: {
5631
+ type: "circle"
5632
+ },
5633
+ labels: {
5634
+ ...baseLabelStyles,
5635
+ fontSize: 12
5636
+ },
5637
+ title: Object.assign({}, baseLabelStyles, {
5638
+ padding,
5639
+ fontSize: 16
5640
+ }),
5641
+ border: {
5642
+ stroke: gray["200"],
5643
+ strokeWidth: 2,
5644
+ padding: 16
5645
+ }
5646
+ }
5647
+ },
5648
+ line: Object.assign({
5649
+ style: {
5650
+ data: {
5651
+ fill: "transparent",
5652
+ opacity: 1,
5653
+ stroke: blue["500"],
5654
+ strokeWidth: 2,
5655
+ strokeLinecap,
5656
+ strokeLinejoin
5657
+ },
5658
+ labels: baseLabelStyles
5659
+ }
5660
+ }, baseProps),
5661
+ pie: Object.assign({
5662
+ style: {
5663
+ parent: {
5664
+ backgroundColor: gray.white
5665
+ },
5666
+ data: {
5667
+ padding,
5668
+ stroke: gray.white,
5669
+ strokeWidth: 1
5670
+ },
5671
+ labels: {
5672
+ ...baseLabelStyles,
5673
+ padding: 20,
5674
+ fill: gray["600"],
5675
+ fontSize: 10
5676
+ }
5677
+ },
5678
+ colorScale,
5679
+ cornerRadius: borderRadius
5680
+ }, baseProps),
5681
+ scatter: Object.assign({
5682
+ style: {
5683
+ data: {
5684
+ fill: purple["500"],
5685
+ opacity: 1,
5686
+ stroke: "transparent",
5687
+ strokeWidth: 0
5688
+ },
5689
+ labels: {
5690
+ ...baseLabelStyles,
5691
+ padding: 20
5692
+ }
5693
+ }
5694
+ }, baseProps),
5695
+ stack: Object.assign({
5696
+ colorScale
5697
+ }, baseProps),
5698
+ tooltip: {
5699
+ style: Object.assign({}, baseLabelStyles, {
5700
+ padding: 0,
5701
+ pointerEvents: "none"
5702
+ }),
5703
+ flyoutStyle: {
5704
+ stroke: gray["300"],
5705
+ strokeWidth: 2,
5706
+ fill: gray.white,
5707
+ pointerEvents: "none"
5708
+ },
5709
+ flyoutPadding: {
5710
+ top: 8,
5711
+ bottom: 8,
5712
+ left: 16,
5713
+ right: 16
5714
+ },
5715
+ cornerRadius: borderRadius,
5716
+ pointerLength: 4
5717
+ },
5718
+ voronoi: Object.assign({
5719
+ style: {
5720
+ data: {
5721
+ fill: blue["100"],
5722
+ stroke: blue["500"],
5723
+ strokeWidth: 2,
5724
+ opacity: 0.4
5725
+ },
5726
+ labels: Object.assign({}, baseLabelStyles, {
5727
+ padding: 5,
5728
+ pointerEvents: "none"
5729
+ }),
5730
+ flyout: {
5731
+ stroke: gray["900"],
5732
+ strokeWidth: 1,
5733
+ fill: gray["100"],
5734
+ pointerEvents: "none"
5735
+ },
5736
+ padding: {
5737
+ left: 2,
5738
+ bottom: 2
5739
+ }
5740
+ }
5741
+ }, baseProps)
5742
+ };
5743
+
5744
+ /***/ }),
5745
+
5274
5746
  /***/ "../../victory-core/es/victory-theme/grayscale.js":
5275
5747
  /*!********************************************************!*\
5276
5748
  !*** ../../victory-core/es/victory-theme/grayscale.js ***!
@@ -5285,9 +5757,28 @@ __webpack_require__.r(__webpack_exports__);
5285
5757
  // *
5286
5758
  // * Colors
5287
5759
  // *
5288
- const colors = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
5760
+ const colors = {
5761
+ blue: "#4F7DA1",
5762
+ pink: "#E2A37F",
5763
+ teal: "#00796B",
5764
+ purple: "#DF948A",
5765
+ green: "#8BC34A",
5766
+ orange: "#F4511E",
5767
+ cyan: "#006064",
5768
+ red: "#DF5A49",
5769
+ yellow: "#FFF59D"
5770
+ };
5771
+ const colorScale = ["#252525", "#525252", "#737373", "#969696", "#bdbdbd", "#d9d9d9", "#f0f0f0"];
5289
5772
  const charcoal = "#252525";
5290
5773
  const grey = "#969696";
5774
+ const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
5775
+ const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
5776
+ const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
5777
+ const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
5778
+ const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
5779
+ const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
5780
+ const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
5781
+
5291
5782
  // *
5292
5783
  // * Typography
5293
5784
  // *
@@ -5301,7 +5792,7 @@ const baseProps = {
5301
5792
  width: 450,
5302
5793
  height: 300,
5303
5794
  padding: 50,
5304
- colorScale: colors
5795
+ colorScale
5305
5796
  };
5306
5797
  // *
5307
5798
  // * Labels
@@ -5323,6 +5814,17 @@ const centeredLabelStyles = Object.assign({
5323
5814
  const strokeLinecap = "round";
5324
5815
  const strokeLinejoin = "round";
5325
5816
  const grayscale = {
5817
+ palette: {
5818
+ colors,
5819
+ grayscale: colorScale,
5820
+ qualitative,
5821
+ heatmap,
5822
+ warm,
5823
+ cool,
5824
+ red,
5825
+ green,
5826
+ blue
5827
+ },
5326
5828
  area: Object.assign({
5327
5829
  style: {
5328
5830
  data: {
@@ -5437,7 +5939,7 @@ const grayscale = {
5437
5939
  }
5438
5940
  }, baseProps),
5439
5941
  group: Object.assign({
5440
- colorScale: colors
5942
+ colorScale
5441
5943
  }, baseProps),
5442
5944
  histogram: Object.assign({
5443
5945
  style: {
@@ -5450,7 +5952,7 @@ const grayscale = {
5450
5952
  }
5451
5953
  }, baseProps),
5452
5954
  legend: {
5453
- colorScale: colors,
5955
+ colorScale,
5454
5956
  gutter: 10,
5455
5957
  orientation: "vertical",
5456
5958
  titleOrientation: "top",
@@ -5485,7 +5987,7 @@ const grayscale = {
5485
5987
  padding: 20
5486
5988
  })
5487
5989
  },
5488
- colorScale: colors,
5990
+ colorScale,
5489
5991
  width: 400,
5490
5992
  height: 400,
5491
5993
  padding: 50
@@ -5501,7 +6003,7 @@ const grayscale = {
5501
6003
  }
5502
6004
  }, baseProps),
5503
6005
  stack: Object.assign({
5504
- colorScale: colors
6006
+ colorScale
5505
6007
  }, baseProps),
5506
6008
  tooltip: {
5507
6009
  style: Object.assign({}, baseLabelStyles, {
@@ -5561,11 +6063,31 @@ const lime300 = "#DCE775";
5561
6063
  const lightGreen500 = "#8BC34A";
5562
6064
  const teal700 = "#00796B";
5563
6065
  const cyan900 = "#006064";
5564
- const colors = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
6066
+ const colorScale = [deepOrange600, yellow200, lime300, lightGreen500, teal700, cyan900];
5565
6067
  const blueGrey50 = "#ECEFF1";
5566
6068
  const blueGrey300 = "#90A4AE";
5567
6069
  const blueGrey700 = "#455A64";
5568
6070
  const grey900 = "#212121";
6071
+ const colors = {
6072
+ blue: "#4F7DA1",
6073
+ pink: "#E2A37F",
6074
+ teal: teal700,
6075
+ purple: "#DF948A",
6076
+ green: lightGreen500,
6077
+ orange: deepOrange600,
6078
+ cyan: cyan900,
6079
+ red: "#DF5A49",
6080
+ yellow: yellow200
6081
+ };
6082
+ const grayscale = [blueGrey50, blueGrey300, blueGrey700, grey900];
6083
+ const qualitative = ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"];
6084
+ const heatmap = ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"];
6085
+ const warm = ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"];
6086
+ const cool = ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"];
6087
+ const red = ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"];
6088
+ const green = ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"];
6089
+ const blue = ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"];
6090
+
5569
6091
  // *
5570
6092
  // * Typography
5571
6093
  // *
@@ -5603,6 +6125,17 @@ const strokeDasharray = "10, 5";
5603
6125
  const strokeLinecap = "round";
5604
6126
  const strokeLinejoin = "round";
5605
6127
  const material = {
6128
+ palette: {
6129
+ colors,
6130
+ grayscale,
6131
+ qualitative,
6132
+ heatmap,
6133
+ warm,
6134
+ cool,
6135
+ red,
6136
+ green,
6137
+ blue
6138
+ },
5606
6139
  area: Object.assign({
5607
6140
  style: {
5608
6141
  data: {
@@ -5735,7 +6268,7 @@ const material = {
5735
6268
  }
5736
6269
  }, baseProps),
5737
6270
  group: Object.assign({
5738
- colorScale: colors
6271
+ colorScale
5739
6272
  }, baseProps),
5740
6273
  histogram: Object.assign({
5741
6274
  style: {
@@ -5748,7 +6281,7 @@ const material = {
5748
6281
  }
5749
6282
  }, baseProps),
5750
6283
  legend: {
5751
- colorScale: colors,
6284
+ colorScale,
5752
6285
  gutter: 10,
5753
6286
  orientation: "vertical",
5754
6287
  titleOrientation: "top",
@@ -5774,7 +6307,7 @@ const material = {
5774
6307
  }
5775
6308
  }, baseProps),
5776
6309
  pie: Object.assign({
5777
- colorScale: colors,
6310
+ colorScale,
5778
6311
  style: {
5779
6312
  data: {
5780
6313
  padding,
@@ -5798,7 +6331,7 @@ const material = {
5798
6331
  }
5799
6332
  }, baseProps),
5800
6333
  stack: Object.assign({
5801
- colorScale: colors
6334
+ colorScale
5802
6335
  }, baseProps),
5803
6336
  tooltip: {
5804
6337
  style: Object.assign({}, baseLabelStyles, {
@@ -5851,12 +6384,15 @@ __webpack_require__.r(__webpack_exports__);
5851
6384
  /* harmony export */ });
5852
6385
  /* harmony import */ var _grayscale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grayscale */ "../../victory-core/es/victory-theme/grayscale.js");
5853
6386
  /* harmony import */ var _material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./material */ "../../victory-core/es/victory-theme/material.js");
6387
+ /* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./clean */ "../../victory-core/es/victory-theme/clean.js");
6388
+
5854
6389
 
5855
6390
 
5856
6391
 
5857
6392
  const VictoryTheme = {
5858
6393
  grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
5859
- material: _material__WEBPACK_IMPORTED_MODULE_1__.material
6394
+ material: _material__WEBPACK_IMPORTED_MODULE_1__.material,
6395
+ clean: _clean__WEBPACK_IMPORTED_MODULE_2__.clean
5860
6396
  };
5861
6397
 
5862
6398
  /***/ }),
@@ -8418,6 +8954,9 @@ __webpack_require__.r(__webpack_exports__);
8418
8954
  /* harmony export */ "getColorScale": function() { return /* binding */ getColorScale; },
8419
8955
  /* harmony export */ "toTransformString": function() { return /* binding */ toTransformString; }
8420
8956
  /* harmony export */ });
8957
+ /* 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");
8958
+
8959
+
8421
8960
  /**
8422
8961
  * Given an object with CSS/SVG transform definitions, return the string value
8423
8962
  * for use with the `transform` CSS property or SVG attribute. Note that we
@@ -8454,20 +8993,37 @@ const toTransformString = function (obj) {
8454
8993
  * of 5 hex string values in that color scale. If no 'name' parameter
8455
8994
  * is given, it will return the Victory default grayscale.
8456
8995
  * @param {String} name The name of the color scale to return (optional).
8996
+ * @param {Object} theme The theme object to retrieve the color scale from (optional).
8457
8997
  * @returns {Array} An array of 5 hex string values composing a color scale.
8458
8998
  */
8459
- function getColorScale(name) {
8999
+ function getColorScale(name, theme) {
9000
+ if (theme === void 0) {
9001
+ theme = _victory_theme_victory_theme__WEBPACK_IMPORTED_MODULE_0__.VictoryTheme.material;
9002
+ }
9003
+ const {
9004
+ palette: {
9005
+ grayscale = ["#cccccc", "#969696", "#636363", "#252525"],
9006
+ qualitative = [],
9007
+ heatmap = [],
9008
+ warm = [],
9009
+ cool = [],
9010
+ red = [],
9011
+ blue = [],
9012
+ green = []
9013
+ } = {}
9014
+ } = theme;
8460
9015
  const scales = {
8461
- grayscale: ["#cccccc", "#969696", "#636363", "#252525"],
8462
- qualitative: ["#334D5C", "#45B29D", "#EFC94C", "#E27A3F", "#DF5A49", "#4F7DA1", "#55DBC1", "#EFDA97", "#E2A37F", "#DF948A"],
8463
- heatmap: ["#428517", "#77D200", "#D6D305", "#EC8E19", "#C92B05"],
8464
- warm: ["#940031", "#C43343", "#DC5429", "#FF821D", "#FFAF55"],
8465
- cool: ["#2746B9", "#0B69D4", "#2794DB", "#31BB76", "#60E83B"],
8466
- red: ["#FCAE91", "#FB6A4A", "#DE2D26", "#A50F15", "#750B0E"],
8467
- blue: ["#002C61", "#004B8F", "#006BC9", "#3795E5", "#65B4F4"],
8468
- green: ["#354722", "#466631", "#649146", "#8AB25C", "#A9C97E"]
9016
+ grayscale,
9017
+ qualitative,
9018
+ heatmap,
9019
+ warm,
9020
+ cool,
9021
+ red,
9022
+ blue,
9023
+ green
8469
9024
  };
8470
- return name ? scales[name] : scales.grayscale;
9025
+ const selectedScale = name && scales[name]?.length ? scales[name] : scales.grayscale;
9026
+ return selectedScale;
8471
9027
  }
8472
9028
 
8473
9029
  /***/ }),
@@ -9376,7 +9932,9 @@ function getAllEvents(props) {
9376
9932
  }
9377
9933
  return events || [];
9378
9934
  }
9379
- function getColor(calculatedProps, child, index) {
9935
+
9936
+ // eslint-disable-next-line max-params
9937
+ function getColor(calculatedProps, child, index, theme) {
9380
9938
  // check for styles first
9381
9939
  const {
9382
9940
  style
@@ -9393,14 +9951,16 @@ function getColor(calculatedProps, child, index) {
9393
9951
  if (!colorScale && !color) {
9394
9952
  return undefined;
9395
9953
  }
9396
- const colors = Array.isArray(colorScale) ? colorScale : _style__WEBPACK_IMPORTED_MODULE_13__.getColorScale(colorScale);
9954
+ const colors = Array.isArray(colorScale) ? colorScale : _style__WEBPACK_IMPORTED_MODULE_13__.getColorScale(colorScale, theme);
9397
9955
  return color || colors[index % colors.length];
9398
9956
  }
9399
9957
  function getStyle(theme, style, role) {
9400
9958
  const defaultStyle = theme && theme[role] && theme[role].style ? theme[role].style : {};
9401
9959
  return _helpers__WEBPACK_IMPORTED_MODULE_7__.getStyles(style, defaultStyle);
9402
9960
  }
9403
- function getChildStyle(child, index, calculatedProps) {
9961
+
9962
+ // eslint-disable-next-line max-params
9963
+ function getChildStyle(child, index, calculatedProps, theme) {
9404
9964
  const {
9405
9965
  style,
9406
9966
  role
@@ -9410,7 +9970,7 @@ function getChildStyle(child, index, calculatedProps) {
9410
9970
  return childStyle;
9411
9971
  }
9412
9972
  const childRole = child.type && child.type.role;
9413
- const defaultFill = childRole === "stack" ? undefined : getColor(calculatedProps, child, index);
9973
+ const defaultFill = childRole === "stack" ? undefined : getColor(calculatedProps, child, index, theme);
9414
9974
  const defaultColor = childRole === "line" ? {
9415
9975
  fill: "none",
9416
9976
  stroke: defaultFill