โœŠ๐Ÿฟ Black Lives Matter. Please consider donating to Black Girls Code today.
๐Ÿ“Š Dash 2.0 is Arriving. Register here.

Accessing z values for annotations in histogram2d mode

I recently switched from heatmap to histogram2d. I did this because while heatmap requires me to calculate the z values beyond plotly, histogram2d does it within.
The problem is that annotating the plot with the z values in heatmap (see last example) was easy. In histogram2d, I am stuck achieving the same.
I basically need to display the z value per cell. I can calculate before hand and annotate it, but I was wondering if there is a smarter way since plotly is doing all the heavy lifting for me anyways.
Any ideas?
Thanks,
Ahmed

Hereโ€™s a hacky way to access those z values: https://codepen.io/etpinard/pen/gzXzLN?editors=0010