victory-chart 37.1.1 → 37.1.2

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,11 @@
1
1
  # victory-chart
2
2
 
3
+ ## 37.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix victory-native container styles ([`eae3fe5dd`](https://github.com/FormidableLabs/victory/commit/eae3fe5dde175e68e146576655cb2e8054ad6456))
8
+
3
9
  ## 37.1.1
4
10
 
5
11
  ## 37.1.0
@@ -7651,6 +7651,432 @@ const TSpan = props => {
7651
7651
 
7652
7652
  /***/ }),
7653
7653
 
7654
+ /***/ "../../victory-core/es/victory-theme/clean.js":
7655
+ /*!****************************************************!*\
7656
+ !*** ../../victory-core/es/victory-theme/clean.js ***!
7657
+ \****************************************************/
7658
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7659
+
7660
+ "use strict";
7661
+ __webpack_require__.r(__webpack_exports__);
7662
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7663
+ /* harmony export */ "clean": function() { return /* binding */ clean; }
7664
+ /* harmony export */ });
7665
+ // *
7666
+ // * Colors
7667
+ // *
7668
+
7669
+ const gray = {
7670
+ white: "#FFFFFF",
7671
+ "50": "#FAFAFA",
7672
+ "100": "#F2F2F2",
7673
+ "200": "#E8E8E8",
7674
+ "300": "#E0E0E0",
7675
+ "400": "#D1D1D1",
7676
+ "500": "#757575",
7677
+ "600": "#5C5C5C",
7678
+ "700": "#424242",
7679
+ "800": "#333333",
7680
+ "900": "#292929",
7681
+ black: "#0F0F0F"
7682
+ };
7683
+ const yellow = {
7684
+ "100": "#FFEAB6",
7685
+ "300": "#FFD66E",
7686
+ "500": "#FCB400",
7687
+ "900": "#B87503"
7688
+ };
7689
+ const orange = {
7690
+ "100": "#FEE2D5",
7691
+ "300": "#FFA981",
7692
+ "500": "#FF6F2C",
7693
+ "900": "#D74D26"
7694
+ };
7695
+ const red = {
7696
+ "100": "#FFDCE5",
7697
+ "300": "#FF9EB7",
7698
+ "500": "#F82B60",
7699
+ "900": "#BA1E45"
7700
+ };
7701
+ const pink = {
7702
+ "100": "#FFDAF6",
7703
+ "300": "#F99DE2",
7704
+ "500": "#FF08C2",
7705
+ "900": "#B2158B"
7706
+ };
7707
+ const purple = {
7708
+ "100": "#EDE3FE",
7709
+ "300": "#CDB0FF",
7710
+ "500": "#8B46FF",
7711
+ "900": "#6B1CB0"
7712
+ };
7713
+ const blue = {
7714
+ "100": "#CFDFFF",
7715
+ "300": "#9CC7FF",
7716
+ "500": "#2D7FF9",
7717
+ "900": "#2750AE"
7718
+ };
7719
+ const cyan = {
7720
+ "100": "#D0F0FD",
7721
+ "300": "#77D1F3",
7722
+ "500": "#18BFFF",
7723
+ "900": "#0B76B7"
7724
+ };
7725
+ const teal = {
7726
+ "100": "#C2F5E9",
7727
+ "300": "#72DDC3",
7728
+ "500": "#20D9D2",
7729
+ "900": "#06A09B"
7730
+ };
7731
+ const green = {
7732
+ "100": "#D1F7C4",
7733
+ "300": "#93E088",
7734
+ "500": "#20C933",
7735
+ "900": "#338A17"
7736
+ };
7737
+ const colors = [blue["500"], pink["500"], teal["500"], purple["500"], green["500"], orange["500"], cyan["500"], red["500"], yellow["500"]];
7738
+ // *
7739
+ // * Typography
7740
+ // *
7741
+ const sansSerif = "'Inter', 'Helvetica Neue', 'Seravek', 'Helvetica', sans-serif";
7742
+ const letterSpacing = "normal";
7743
+ const fontSize = 12;
7744
+ // *
7745
+ // * Layout
7746
+ // *
7747
+ const padding = 8;
7748
+ const baseProps = {
7749
+ width: 450,
7750
+ height: 300,
7751
+ padding: 50,
7752
+ colorScale: colors
7753
+ };
7754
+ // *
7755
+ // * Labels
7756
+ // *
7757
+ const baseLabelStyles = {
7758
+ fontFamily: sansSerif,
7759
+ fontSize,
7760
+ fontWeight: 300,
7761
+ letterSpacing,
7762
+ padding,
7763
+ fill: gray["900"],
7764
+ stroke: "transparent"
7765
+ };
7766
+ const centeredLabelStyles = Object.assign({
7767
+ textAnchor: "middle"
7768
+ }, baseLabelStyles);
7769
+
7770
+ // *
7771
+ // * Strokes
7772
+ // *
7773
+ const strokeDasharray = "10, 5";
7774
+ const strokeLinecap = "round";
7775
+ const strokeLinejoin = "round";
7776
+ const borderRadius = 1;
7777
+ // *
7778
+ // * Theme
7779
+ // *
7780
+ const clean = {
7781
+ area: Object.assign({
7782
+ style: {
7783
+ data: {
7784
+ fill: cyan["500"]
7785
+ },
7786
+ labels: baseLabelStyles
7787
+ }
7788
+ }, baseProps),
7789
+ axis: Object.assign({
7790
+ style: {
7791
+ axis: {
7792
+ fill: "transparent",
7793
+ stroke: gray["300"],
7794
+ strokeWidth: 1,
7795
+ strokeLinecap,
7796
+ strokeLinejoin
7797
+ },
7798
+ axisLabel: Object.assign({}, centeredLabelStyles, {
7799
+ padding,
7800
+ stroke: "transparent"
7801
+ }),
7802
+ grid: {
7803
+ fill: "none",
7804
+ stroke: "none",
7805
+ painterEvents: "painted"
7806
+ },
7807
+ ticks: {
7808
+ fill: "transparent",
7809
+ size: 5,
7810
+ stroke: "transparent"
7811
+ },
7812
+ tickLabels: baseLabelStyles
7813
+ }
7814
+ }, baseProps),
7815
+ polarAxis: Object.assign({
7816
+ style: {
7817
+ axis: {
7818
+ stroke: gray["300"]
7819
+ },
7820
+ grid: {
7821
+ stroke: gray["200"],
7822
+ strokeDasharray,
7823
+ strokeLinecap,
7824
+ strokeLinejoin,
7825
+ pointerEvents: "painted"
7826
+ },
7827
+ ticks: {
7828
+ fill: "transparent",
7829
+ size: 5,
7830
+ stroke: gray["200"],
7831
+ strokeWidth: 1,
7832
+ strokeLinecap,
7833
+ strokeLinejoin
7834
+ },
7835
+ tickLabels: baseLabelStyles
7836
+ }
7837
+ }),
7838
+ polarDependentAxis: Object.assign({
7839
+ style: {
7840
+ axis: {
7841
+ stroke: gray["300"]
7842
+ },
7843
+ grid: {
7844
+ stroke: gray["200"],
7845
+ strokeDasharray,
7846
+ strokeLinecap,
7847
+ strokeLinejoin,
7848
+ pointerEvents: "painted"
7849
+ },
7850
+ ticks: {
7851
+ fill: "transparent",
7852
+ size: 5,
7853
+ stroke: gray["200"],
7854
+ strokeWidth: 1,
7855
+ strokeLinecap,
7856
+ strokeLinejoin
7857
+ },
7858
+ tickLabels: baseLabelStyles
7859
+ }
7860
+ }),
7861
+ bar: Object.assign({
7862
+ style: {
7863
+ data: {
7864
+ fill: blue["500"],
7865
+ padding,
7866
+ strokeWidth: 0
7867
+ },
7868
+ labels: baseLabelStyles
7869
+ },
7870
+ cornerRadius: {
7871
+ top: borderRadius
7872
+ }
7873
+ }, baseProps),
7874
+ boxplot: Object.assign({
7875
+ style: {
7876
+ max: {
7877
+ padding,
7878
+ stroke: gray["400"],
7879
+ strokeWidth: 2
7880
+ },
7881
+ maxLabels: Object.assign({}, baseLabelStyles, {
7882
+ padding: 3
7883
+ }),
7884
+ median: {
7885
+ padding,
7886
+ stroke: gray.white,
7887
+ strokeWidth: 2
7888
+ },
7889
+ medianLabels: Object.assign({}, baseLabelStyles, {
7890
+ padding: 3
7891
+ }),
7892
+ min: {
7893
+ padding,
7894
+ stroke: gray["400"],
7895
+ strokeWidth: 2
7896
+ },
7897
+ minLabels: Object.assign({}, baseLabelStyles, {
7898
+ padding: 3
7899
+ }),
7900
+ q1: {
7901
+ padding,
7902
+ fill: teal["500"],
7903
+ rx: borderRadius
7904
+ },
7905
+ q1Labels: Object.assign({}, baseLabelStyles, {
7906
+ padding: 3
7907
+ }),
7908
+ q3: {
7909
+ padding,
7910
+ fill: teal["500"],
7911
+ rx: borderRadius
7912
+ },
7913
+ q3Labels: Object.assign({}, baseLabelStyles, {
7914
+ padding: 3
7915
+ })
7916
+ },
7917
+ boxWidth: 20
7918
+ }, baseProps),
7919
+ candlestick: Object.assign({
7920
+ style: {
7921
+ data: {
7922
+ stroke: gray["300"],
7923
+ strokeWidth: 0,
7924
+ rx: borderRadius
7925
+ },
7926
+ labels: Object.assign({}, baseLabelStyles, {
7927
+ padding: 5
7928
+ })
7929
+ },
7930
+ candleColors: {
7931
+ positive: teal["500"],
7932
+ negative: orange["500"]
7933
+ },
7934
+ wickStrokeWidth: 2
7935
+ }, baseProps),
7936
+ chart: baseProps,
7937
+ errorbar: Object.assign({
7938
+ borderWidth: 8,
7939
+ style: {
7940
+ data: {
7941
+ fill: "transparent",
7942
+ opacity: 1,
7943
+ stroke: gray["700"],
7944
+ strokeWidth: 2,
7945
+ strokeLinecap
7946
+ },
7947
+ labels: baseLabelStyles
7948
+ }
7949
+ }, baseProps),
7950
+ group: Object.assign({
7951
+ colorScale: colors
7952
+ }, baseProps),
7953
+ histogram: Object.assign({
7954
+ style: {
7955
+ data: {
7956
+ fill: cyan["500"],
7957
+ stroke: "transparent",
7958
+ strokeWidth: 0
7959
+ },
7960
+ labels: baseLabelStyles
7961
+ },
7962
+ binSpacing: 4,
7963
+ cornerRadius: {
7964
+ top: borderRadius
7965
+ }
7966
+ }, baseProps),
7967
+ label: baseLabelStyles,
7968
+ legend: {
7969
+ colorScale: colors,
7970
+ gutter: 10,
7971
+ orientation: "vertical",
7972
+ titleOrientation: "top",
7973
+ style: {
7974
+ data: {
7975
+ type: "circle"
7976
+ },
7977
+ labels: {
7978
+ ...baseLabelStyles,
7979
+ fontSize: 14
7980
+ },
7981
+ title: Object.assign({}, baseLabelStyles, {
7982
+ padding,
7983
+ fontSize: 20
7984
+ }),
7985
+ border: {
7986
+ stroke: gray["200"],
7987
+ strokeWidth: 2,
7988
+ padding: 16
7989
+ }
7990
+ }
7991
+ },
7992
+ line: Object.assign({
7993
+ style: {
7994
+ data: {
7995
+ fill: "transparent",
7996
+ opacity: 1,
7997
+ stroke: pink["500"],
7998
+ strokeWidth: 2,
7999
+ strokeLinecap,
8000
+ strokeLinejoin
8001
+ },
8002
+ labels: baseLabelStyles
8003
+ }
8004
+ }, baseProps),
8005
+ pie: Object.assign({
8006
+ style: {
8007
+ data: {
8008
+ padding,
8009
+ stroke: gray.white,
8010
+ strokeWidth: 1
8011
+ },
8012
+ labels: Object.assign({}, baseLabelStyles, {
8013
+ padding: 20
8014
+ })
8015
+ },
8016
+ colorScale: colors,
8017
+ cornerRadius: borderRadius
8018
+ }, baseProps),
8019
+ scatter: Object.assign({
8020
+ style: {
8021
+ data: {
8022
+ fill: purple["500"],
8023
+ opacity: 1,
8024
+ stroke: "transparent",
8025
+ strokeWidth: 0
8026
+ },
8027
+ labels: baseLabelStyles
8028
+ }
8029
+ }, baseProps),
8030
+ stack: Object.assign({
8031
+ colorScale: colors
8032
+ }, baseProps),
8033
+ tooltip: {
8034
+ style: Object.assign({}, baseLabelStyles, {
8035
+ padding: 0,
8036
+ pointerEvents: "none"
8037
+ }),
8038
+ flyoutStyle: {
8039
+ stroke: gray["500"],
8040
+ strokeWidth: 2,
8041
+ fill: gray.white,
8042
+ pointerEvents: "none"
8043
+ },
8044
+ flyoutPadding: {
8045
+ top: 8,
8046
+ bottom: 8,
8047
+ left: 16,
8048
+ right: 16
8049
+ },
8050
+ cornerRadius: borderRadius,
8051
+ pointerLength: 4
8052
+ },
8053
+ voronoi: Object.assign({
8054
+ style: {
8055
+ data: {
8056
+ fill: red["100"],
8057
+ stroke: red["500"],
8058
+ strokeWidth: 2
8059
+ },
8060
+ labels: Object.assign({}, baseLabelStyles, {
8061
+ padding: 5,
8062
+ pointerEvents: "none"
8063
+ }),
8064
+ flyout: {
8065
+ stroke: gray["900"],
8066
+ strokeWidth: 1,
8067
+ fill: gray["100"],
8068
+ pointerEvents: "none"
8069
+ },
8070
+ padding: {
8071
+ left: 2,
8072
+ bottom: 2
8073
+ }
8074
+ }
8075
+ }, baseProps)
8076
+ };
8077
+
8078
+ /***/ }),
8079
+
7654
8080
  /***/ "../../victory-core/es/victory-theme/grayscale.js":
7655
8081
  /*!********************************************************!*\
7656
8082
  !*** ../../victory-core/es/victory-theme/grayscale.js ***!
@@ -8231,12 +8657,15 @@ __webpack_require__.r(__webpack_exports__);
8231
8657
  /* harmony export */ });
8232
8658
  /* harmony import */ var _grayscale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grayscale */ "../../victory-core/es/victory-theme/grayscale.js");
8233
8659
  /* harmony import */ var _material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./material */ "../../victory-core/es/victory-theme/material.js");
8660
+ /* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./clean */ "../../victory-core/es/victory-theme/clean.js");
8661
+
8234
8662
 
8235
8663
 
8236
8664
 
8237
8665
  const VictoryTheme = {
8238
8666
  grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
8239
- material: _material__WEBPACK_IMPORTED_MODULE_1__.material
8667
+ material: _material__WEBPACK_IMPORTED_MODULE_1__.material,
8668
+ clean: _clean__WEBPACK_IMPORTED_MODULE_2__.clean
8240
8669
  };
8241
8670
 
8242
8671
  /***/ }),
@@ -11639,6 +12068,7 @@ __webpack_require__.r(__webpack_exports__);
11639
12068
  /* eslint-disable no-magic-numbers */
11640
12069
  // Based on measuring specific character widths
11641
12070
  // as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
12071
+ // For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
11642
12072
  // prettier-ignore
11643
12073
  const fonts = {
11644
12074
  "American Typewriter": {
@@ -11697,6 +12127,10 @@ const fonts = {
11697
12127
  widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2359375, 0.2234375, 0.3921875, 0.7125, 0.49375, 0.8859375, 0.771875, 0.2125, 0.3078125, 0.309375, 0.375, 0.4234375, 0.234375, 0.3125, 0.234375, 0.3, 0.5828125, 0.365625, 0.434375, 0.3921875, 0.5234375, 0.3984375, 0.5125, 0.4328125, 0.46875, 0.5125, 0.234375, 0.234375, 0.515625, 0.4234375, 0.515625, 0.340625, 0.7609375, 0.7359375, 0.6359375, 0.721875, 0.8125, 0.6375, 0.5875, 0.8078125, 0.853125, 0.4296875, 0.503125, 0.78125, 0.609375, 0.9609375, 0.8515625, 0.8140625, 0.6125, 0.8140625, 0.71875, 0.49375, 0.7125, 0.76875, 0.771875, 1.125, 0.7765625, 0.7734375, 0.65625, 0.321875, 0.3078125, 0.321875, 0.3546875, 0.5, 0.3375, 0.446875, 0.5359375, 0.45, 0.5296875, 0.4546875, 0.425, 0.4921875, 0.54375, 0.2671875, 0.240625, 0.5390625, 0.25, 0.815625, 0.5375, 0.5234375, 0.5390625, 0.5421875, 0.365625, 0.36875, 0.35625, 0.5171875, 0.5015625, 0.75, 0.5, 0.509375, 0.44375, 0.2421875, 0.14375, 0.2421875, 0.35],
11698
12128
  avg: 0.5116447368421051
11699
12129
  },
12130
+ "Inter": {
12131
+ widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2796875, 0.2890625, 0.4671875, 0.634375, 0.6421875, 0.9828125, 0.6453125, 0.3, 0.365625, 0.365625, 0.5015625, 0.6625, 0.2890625, 0.4609375, 0.2890625, 0.3609375, 0.63125, 0.4078125, 0.6109375, 0.61875, 0.646875, 0.59375, 0.6203125, 0.5671875, 0.61875, 0.6203125, 0.2890625, 0.303125, 0.6625, 0.6625, 0.6625, 0.5125, 0.9671875, 0.690625, 0.6546875, 0.73125, 0.721875, 0.6015625, 0.590625, 0.746875, 0.74375, 0.26875, 0.571875, 0.671875, 0.565625, 0.9046875, 0.7546875, 0.765625, 0.6390625, 0.765625, 0.64375, 0.6421875, 0.646875, 0.7453125, 0.690625, 0.9859375, 0.6828125, 0.6796875, 0.6296875, 0.365625, 0.3609375, 0.365625, 0.471875, 0.45625, 0.3234375, 0.5625, 0.6125, 0.571875, 0.6125, 0.584375, 0.3703125, 0.6140625, 0.5921875, 0.2421875, 0.2548828125, 0.55, 0.2421875, 0.8765625, 0.5921875, 0.6, 0.6125, 0.6125, 0.3765625, 0.528125, 0.328125, 0.5921875, 0.5625, 0.81875, 0.546875, 0.5625, 0.553125, 0.4265625, 0.3328125, 0.4265625, 0.6625],
12132
+ avg: 0.5624362664473683
12133
+ },
11700
12134
  "Montserrat": {
11701
12135
  widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2625, 0.2609375, 0.3734375, 0.696875, 0.615625, 0.8296875, 0.6703125, 0.203125, 0.3296875, 0.3296875, 0.3875, 0.575, 0.2125, 0.3828125, 0.2125, 0.3953125, 0.6625, 0.3625, 0.56875, 0.5640625, 0.6625, 0.5671875, 0.609375, 0.5890625, 0.6390625, 0.609375, 0.2125, 0.2125, 0.575, 0.575, 0.575, 0.5671875, 1.034375, 0.7171875, 0.7546875, 0.7203125, 0.8265625, 0.6703125, 0.634375, 0.7734375, 0.8140625, 0.303125, 0.5078125, 0.7125, 0.5890625, 0.95625, 0.8140625, 0.8390625, 0.71875, 0.8390625, 0.7234375, 0.615625, 0.575, 0.7921875, 0.6984375, 1.1125, 0.65625, 0.6359375, 0.6515625, 0.31875, 0.396875, 0.31875, 0.5765625, 0.5, 0.6, 0.590625, 0.678125, 0.5640625, 0.678125, 0.6046875, 0.375, 0.6875, 0.678125, 0.2703125, 0.365625, 0.6015625, 0.2703125, 1.0625, 0.678125, 0.628125, 0.678125, 0.678125, 0.4015625, 0.4890625, 0.40625, 0.6734375, 0.5421875, 0.8796875, 0.534375, 0.5671875, 0.5125, 0.334375, 0.2953125, 0.334375, 0.575],
11702
12136
  avg: 0.571792763157895