@rivet-health/design-system 37.2.0 → 37.2.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.
@@ -9777,14 +9777,12 @@ var Chart;
9777
9777
  if (!suppYs || suppYs.length == 0) {
9778
9778
  return { yValue: 0, height: 0 };
9779
9779
  }
9780
- // Find supplementary bars in this group
9781
- const groupSupps = suppYs.filter(s => s.supplementalIndex == yIndex);
9782
- // suppIndex is position within group (0-based), but we need to account for the fact
9783
- // that the original Y is position 0, so suppIndex here should be decremented
9784
- const suppArrayIndex = suppIndex - 1;
9785
- if (suppArrayIndex >= 0 && suppArrayIndex < groupSupps.length) {
9780
+ // Find supplementary bars with the given supplementalIndex
9781
+ const groupSupps = suppYs.filter(s => s.supplementalIndex == suppIndex);
9782
+ // yIndex refers to which Y series (within the supplemental group) we're looking at
9783
+ if (yIndex >= 0 && yIndex < groupSupps.length) {
9786
9784
  // Find this supp in the original array
9787
- const suppInOriginalArray = suppYs.indexOf(groupSupps[suppArrayIndex]);
9785
+ const suppInOriginalArray = suppYs.indexOf(groupSupps[yIndex]);
9788
9786
  return getBarYInfo(data, suppInOriginalArray, xIndex, scale, isStacked, true);
9789
9787
  }
9790
9788
  return { yValue: 0, height: 0 };