Search code examples
grafanadashboardconfidence-interval

How create Grafana dashboard for view metric and her confidence intervals?


Research Grafana how tool for create dashboard for view metric and her confidence intervals.

Prepare data frame and import to PostgreSQL.

CREATE TABLE public.rnd_ci (
datetime TIMESTAMP,
yhat_lower float,
yhat_upper float,
yhat float,
y float
);

Create dashboard use PostgreSQL data source

SELECT
  datetime AS "time",
  yhat_lower,
  yhat_upper,
  yhat,
  y
FROM rnd_ds
WHERE
  $__timeFilter(ds) AND

use Time series panel

enter image description here

But I want to create this variant

enter image description here

How create this variant dashboard?


Solution

  • Assuming what you want is to fill area between upper and lower graphs:

    1. Panel options > Overrides > + Add field override
    2. Field with name. Select name of your upper field, presumably yhat_upper
    3. + Add override property
    4. Graph styles > Fill below to
    5. Select name of your lower field, presumably yhat_lower.