@redsift/charts 10.3.0 → 10.3.1-alpha.1

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/index.js CHANGED
@@ -1045,7 +1045,6 @@ const StyledBar = styled(DataPoint)`
1045
1045
  const _excluded$m = ["className", "gap", "height", "maxHeight", "orientation", "previousData", "scale", "scalePosition", "width"];
1046
1046
  const COMPONENT_NAME$9 = 'Bar';
1047
1047
  const CLASSNAME$9 = 'redsift-bar';
1048
- const getValue = data => data.cumulativeValue !== undefined ? data.cumulativeValue : data.value;
1049
1048
  const Bar = /*#__PURE__*/forwardRef((props, ref) => {
1050
1049
  const {
1051
1050
  color = monochrome,
@@ -1074,7 +1073,8 @@ const Bar = /*#__PURE__*/forwardRef((props, ref) => {
1074
1073
  } = props,
1075
1074
  forwardedProps = _objectWithoutProperties(props, _excluded$m);
1076
1075
  const theme = useTheme();
1077
- const interpolator = interpolate(getValue(previousData.data) || 0, getValue(data.data));
1076
+ const getValue = data => (data === null || data === void 0 ? void 0 : data.cumulativeValue) !== undefined ? data.cumulativeValue : data === null || data === void 0 ? void 0 : data.value;
1077
+ const interpolator = interpolate(getValue(previousData.data) || 0, getValue(data.data) || 0);
1078
1078
  const text = labelDecorator ? labelDecorator(data, {
1079
1079
  index,
1080
1080
  isSelected: propsIsSelected,