Histograms - get calculated histfunc values from graph

in this example:

how i can get the “sum” values of each bar, in javascript ?
of course, if i print y data values of graph, like this way:

var gd = document.getElementById(“plotlyDIVID”);

console.log returns me y value, not y “calculated” value.

thanks for support