@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.
|
Binary file
|
|
@@ -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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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);
|