Skip to content

Commit 33fbaac

Browse files
authored
Merge pull request #1854 from brownplt/fix-dotplot-binsize
Fix dot-plot's binSize computation
2 parents 2f2a3ba + 553fbf7 commit 33fbaac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/trove/charts-lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@
18601860
];
18611861
const signals = [
18621862
{ name: 'dotSize', value: pointSize },
1863-
{ name: 'binSize', update: 'invert("binScale", dotSize)' },
1863+
{ name: 'binSize', update: 'abs(dotSize * (domain("binScale")[1] - domain("binScale")[0]) / (range("binScale")[1] - range("binScale")[0]))' },
18641864
{ name: 'actualDotSize', update: 'scale("dotScale", 0) - scale("dotScale", 1)' },
18651865
{ name: 'headspace', value: '0.25' },
18661866
{ name: 'wrapMaxY', update: 'floor(domain("dotScale")[1] * (1 - headspace))' },

0 commit comments

Comments
 (0)