2

I would like to control the bucket size in a Grafana histogram using a dashboard variable.

I have this histogram depicting the price of taxi rides (from this dataset) with the following query:

SELECT time_bucket('$date_range', pickup_datetime) AS time,
  AVG(total_amount) as amount
FROM rides
WHERE total_amount < 70
GROUP BY time;

grafana histogram enter image description here

Here the bucket size is set to auto and seems to be 6, but I would like to be able to control it without having to go into the histogram options, preferably using a variable.

I have looked through the documentation but couldn't really find anything.

Is there a way to do this?

Thanks!

0 Answers0