fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
124 stars 17 forks source link

Time series plotted as table #58

Closed kedorlaomer closed 2 years ago

kedorlaomer commented 2 years ago

Trying to plot multiple time series as in https://github.com/fr-ser/grafana-sqlite-datasource/issues/43#issuecomment-848959105, I got only one time series: image This used to work in an older version of the plugin and grafana (I didn't track exactly when the regression happened). I'm using grafana 7.5.5 from docker and the latest plugin the automatic installer gives me. I even deleted the container and reinstalled to make sure I really have the latest version.

fr-ser commented 2 years ago

I tried just now with Grafana 7.5.5 and the latest plugin from Grafana as well as from this repo. All worked for me. Could you export your dashboard as JSON so I can take a more detailed look (at the full query and settings)?

WITH stocks(symbol, date, price) AS (VALUES
('MSFT', '2020-12-12', 39.81), ('AMZN', '2020-12-12', 77.9),
('MSFT', '2020-12-13', 41.1), ('AMZN', '2020-12-13', 75.6),
('MSFT', '2020-12-14', 38.2), ('AMZN', '2020-12-14', 88.2)
) 
SELECT
  date || 'T00:00:00Z' AS time,
  price AS value,
  symbol
FROM stocks
GROUP BY symbol, time
ORDER BY 1
mphuie commented 2 years ago

I'm running into this issue with Grafana 8.1.5. I also spun up a 7.5.5 container and getting the same results.

fr-ser commented 2 years ago

This issue is closed. Please open a new issue and provide a query (with some sample data) and maybe a screenshot of your problem.