  The gravitational dual of $c$-extremization for a class of $(0,2)$
two-dimensional theories obtained by twisted compactifications of D3-brane
gauge theories living at a toric Calabi-Yau three-fold has been recently
proposed. The equivalence of this construction with $c$-extremization has been
checked in various examples and holds also off-shell. In this note we prove
that such equivalence holds for an arbitrary toric Calabi-Yau. We do it by
generalizing the proof of the equivalence between $a$-maximization and volume
minimization for four-dimensional toric quivers. By an explicit
parameterization of the R-charges we map the trial right-moving central charge
$c_r$ into the off-shell functional to be extremized in gravity. We also
observe that the similar construction for M2-branes on $\mathbb{C}^4$ is
equivalent to the $\mathcal{I}$-extremization principle that leads to the
microscopic counting for the entropy of magnetically charged black holes in
AdS$_4\times S^7$. Also this equivalence holds off-shell.
