@fundar/data-chart-telling 0.0.34 → 0.0.36

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.
@@ -160,10 +160,9 @@
160
160
  pos: Number(yScale(Number(resolveAccessor(s.y)(lastRow)))),
161
161
  }));
162
162
  const sorted = [...items].sort((a, b) => a.pos - b.pos);
163
- const range = yScale.range?.().map(Number);
164
- const bounds: [number, number] | undefined = range
165
- ? [Math.min(range[0], range[1]), Math.max(range[0], range[1])]
166
- : undefined;
163
+ // Same content-box source as `watchLabelOverflow`'s `bounds()` above,
164
+ // not `yScale.range()` see that call's doc comment for why.
165
+ const bounds: [number, number] = [numericMargins.top, height - numericMargins.bottom];
167
166
  const { positions: spread, connected } = declutter1D(items, minGap, bounds);
168
167
  const spreadByName = new Map(spread.map((d) => [d.name, d.pos]));
169
168
  const originals = sorted.map((item) => item.pos);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fundar/data-chart-telling",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"