Adding Totals to distBuilder

Tutorials
A short tutorial on adding “totals” to distBuilder, keeping track of how many balls are allocated in each bucket
Author

Quentin André

Published

March 25, 2021

Modified

May 15, 2026

A researcher recently emailed me to ask if there is an easy way to add “totals” to the distBuilder. This is particularly helpful when participants can allocate many balls to each bucket, and you want to help them keep track of how many they have allocated.

I have added this functionality to distBuilder. All you have to do is add the argument addTotals: true when initializing the distBuilder. See below for an example.

See the Pen yLgObEb by QuentinAndre (@QuentinAndre) on CodePen.

And voilà! Your participants can now see how many balls they have allocated to each bucket.