Waterfall Panel error with simplest pattern

Version: Grafana v8.1.2

Trying to get Waterfall Panel to work with mysql.

I have underlying table with these datatypes:

  • analysis_date: timestamp
  • duration_sec: int

Query in panel:

SELECT analysis_date, duration_sec
FROM result_metrics
WHERE $__timeFilter(analysis_date)

I’m getting this error message:
You need at least a field of type "time" and a field of type "number" for this plugin to work.

Also the doc here: Waterfall Panel plugin for Grafana | Grafana Labs states"
Make sure you select the fields of the time series as a "Table"!

I’m not sure what this means. What else can I return the query as?

Here is a sample of the data, it seems about as straight-forward as possible.

So it looks like your using this panel:

Maybe make an issue there or try this Gantt panel by a Grafana dev?

1 Like

Thanks for the reply and the suggestion. Yes, I was trying to auxmoney plugin.

With Gantt, I get this (below). It’s unclear from the doc if I need a special data source, or my query is not formed properly.

On a related note as someone who has been creating enterprise Grafana dashboards (as my primary job function) for the last 3 years, I find the bulk of the extra Plugin doc quite cryptic. a sample of queries for supported data sources would be great (mysql, Prometheus. . . .) I’m not sure where to provide that feedback. I always seem to end up back on Stat, Table and Time Series. As powerful as those are I’d love to expand. So much to visualize!

Thanks again!

this is super important feedback, @dwarriner, and much appreciated. You are not alone. Are there any other plugins that you find lack documentation / sample queries?

I also often find it difficult with panel plugins in particular, because they might expect a particular data formatting, like this one. And sometimes a user is left to reverse-engineer how to fit their data into that, if at all. That has def been a pain point for me too.

Can you share some of your raw, unformatted data so we can try and mock it up?

1 Like

Thanks for the help!

If I do an Inspect → Data from the Gannt Visualization I get a “No Data” Message. That kind of makes sense since it’s not working.

If I switch the visualization to Table and then Format As Table, I can get the query to render and data looks as below.

I tried to cast to time type (since the help box states it needs a time type):

select component , CAST(analysis_date as time) as time , CAST(DATE_ADD(analysis_date, INTERVAL duration_sec SECOND) as time) as end_time
FROM result_metrics
WHERE $__timeFilter(analysis_date)

but I get the same error - and have now lost the date information, making the visualization non-helpful. Ii would think that this would also accept timestamp.