marcusolsson / grafana-gantt-panel

A panel plugin for Grafana to visualize Gantt charts.
Apache License 2.0
26 stars 12 forks source link

Using data with text, start and end time in one array #39

Closed PhilippDehner closed 3 years ago

PhilippDehner commented 3 years ago

I have data from influx which includes the name (-> text) and a start and end time (see screenshot). The problem is that it's not possible to select the text option, there's no option given to select.

Can this be done by an improvement of the panel? (Or would it be better to use another format of the data in the query? -> then we can close this issue and I will use the discussion tab)

gantt_data

marcusolsson commented 3 years ago

The data in your screenshot looks right to me at first glance. You need to Format as Table, which you seem to have, and you seem to have the required fields (String, Time, Time).

Could you check the DataFrame structure in the query inspector? I'd like to know the actual type of the fields are. The Dimension drop down filter based on the expected type. If the field isn't listed, that likely means that the type is wrong.

PhilippDehner commented 3 years ago

Could you check the DataFrame structure in the query inspector?

Here's the json, I hope, it's the right one.

https://gist.github.com/trophi20/68ad2b6cf9a8204cdef3319b147b78f5

marcusolsson commented 3 years ago

Thank you! From the JSON you gave me it looks like you have three separate (time series) data frames, each with a Time and Number field. This is not a supported format.

In order for to be able to use the Gantt panel, your data frame needs to have one data frame with three fields of type String, Time, Time. That being said, I'm not sure how you'd need to update your query (I'm not very familiar with InfluxDB). For starters, can you confirm that you've set Format as to Table?