Histogram with buckets and given Y values

Hello all!

my query returns 3 columns:
time, metric and value
image

I would like to display this data inside a histogram chart, using metric as X and value as Y.
Why Histogram? because I need the bucket feature, since the metric could skip some rows if there is no corresponding value… for example in this screenshot metric 84 is missing…

image

can this be done?

If so, how?

Thank you very much!

Sharky