victory 37.3.6 → 37.4.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
2
2
 
3
+ ## 37.4.0
4
+
5
+ No changes in this release.
6
+
3
7
  ## 37.3.6
4
8
 
5
9
  ## 37.3.5
package/README.md CHANGED
@@ -40,7 +40,7 @@ Projects using Victory should also depend on [React][] and [prop-types][].
40
40
 
41
41
  Want to use `Victory` with React Native? Check out [victory-native-xl](https://github.com/FormidableLabs/victory-native-xl)
42
42
 
43
- If you would like to use this version of `Victory` with React Native, you can install the legacy version using the `legacy` npm tag. See the [available versions in npm](https://www.npmjs.com/package/victory-native?activeTab=versions).
43
+ The legacy `victory-native` package is no longer developed in this repository. Its last release is still available on npm under the `legacy` tag. See the [available versions in npm](https://www.npmjs.com/package/victory-native?activeTab=versions).
44
44
 
45
45
  ## [Contributing](CONTRIBUTING.md)
46
46
 
package/dist/victory.js CHANGED
@@ -12731,8 +12731,8 @@ const calculatePlotValues = props => {
12731
12731
  if (horizontal) {
12732
12732
  const yValue = x;
12733
12733
  const xValue = positions[computedType];
12734
- const dy = orientation === "top" || orientation === "bottom" ? signY * (candleWidth / 2) + signY * (labelStyle.padding || 0) : 0;
12735
- const dx = orientation === "top" || orientation === "bottom" ? 0 : signX * (labelStyle.padding || 1);
12734
+ const dy = orientation === "top" || orientation === "bottom" ? signY * (candleWidth / 2) + signY * (labelStyle?.padding || 0) : 0;
12735
+ const dx = orientation === "top" || orientation === "bottom" ? 0 : signX * (labelStyle?.padding || 1);
12736
12736
  return {
12737
12737
  yValue,
12738
12738
  xValue,
@@ -12742,8 +12742,8 @@ const calculatePlotValues = props => {
12742
12742
  }
12743
12743
  const xValue = x;
12744
12744
  const yValue = positions[computedType];
12745
- const dy = orientation === "top" || orientation === "bottom" ? signY * (labelStyle.padding || 1) : 0;
12746
- const dx = orientation === "top" || orientation === "bottom" ? 0 : signX * (candleWidth / 2) + signX * (labelStyle.padding || 0);
12745
+ const dy = orientation === "top" || orientation === "bottom" ? signY * (labelStyle?.padding || 1) : 0;
12746
+ const dx = orientation === "top" || orientation === "bottom" ? 0 : signX * (candleWidth / 2) + signX * (labelStyle?.padding || 0);
12747
12747
  return {
12748
12748
  yValue,
12749
12749
  xValue,
@@ -12820,9 +12820,9 @@ const getLabelProps = (props, text, style, type) => {
12820
12820
  datum,
12821
12821
  data,
12822
12822
  orientation,
12823
- textAnchor: labelStyle.textAnchor || defaultTextAnchors[orientation],
12824
- verticalAnchor: labelStyle.verticalAnchor || defaultVerticalAnchors[orientation],
12825
- angle: labelStyle.angle,
12823
+ textAnchor: labelStyle?.textAnchor || defaultTextAnchors[orientation],
12824
+ verticalAnchor: labelStyle?.verticalAnchor || defaultVerticalAnchors[orientation],
12825
+ angle: labelStyle?.angle,
12826
12826
  horizontal
12827
12827
  };
12828
12828
  if (!victory_core__WEBPACK_IMPORTED_MODULE_4__.isTooltip(component)) {
@@ -23612,6 +23612,7 @@ const getBaseProps = (initialProps, fallbackProps) => {
23612
23612
  width
23613
23613
  }
23614
23614
  };
23615
+ const DEFAULT_BORDER_WIDTH = 8;
23615
23616
  return data.reduce((childProps, datum, index) => {
23616
23617
  const eventKey = !victory_core__WEBPACK_IMPORTED_MODULE_5__.isNil(datum.eventKey) ? datum.eventKey : index;
23617
23618
  const {
@@ -23624,7 +23625,7 @@ const getBaseProps = (initialProps, fallbackProps) => {
23624
23625
  const errorX = getErrors(props, formattedDatum, "x");
23625
23626
  const errorY = getErrors(props, formattedDatum, "y");
23626
23627
  const dataProps = {
23627
- borderWidth,
23628
+ borderWidth: borderWidth ? borderWidth : DEFAULT_BORDER_WIDTH,
23628
23629
  data,
23629
23630
  datum: formattedDatum,
23630
23631
  errorX: horizontal ? errorY : errorX,