score:1

Accepted answer

Is it non-dynamic because it's calcuating the max value from all the categories in the domain?

Yes that is correct.

What can I do so that it only calculate the selected category? (and re-calculate on change)

In statechange.bar, use d.total in domain:

y.domain([0, d.total]).nice();

Related Query

More Query from same tag