Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: this.datapoints is undefined #331

Open
rsiddle opened this issue Aug 12, 2021 · 0 comments
Open

TypeError: this.datapoints is undefined #331

rsiddle opened this issue Aug 12, 2021 · 0 comments

Comments

@rsiddle
Copy link

rsiddle commented Aug 12, 2021

Versions
Grafana: 8.0.3
Worldmap-panel: 0.3.3
Datasource: TimescaleDB

Query format: Timeseries

The following query used to work with Grafana 7.X.X and Worldmap-panel 0.3.2.

The country returns a 3 letter country code as shown in the data/countries_3letter.json file. I believe the problem appears to be that the data source no longer returns the result as expected by the plugin with multiple data points.

SELECT
date as time,
country as metric,
count(country) as total
FROM entries
WHERE
  date BETWEEN '2021-08-05T10:06:29.165Z' AND '2021-08-12T10:06:29.165Z'
  AND profile in (
      'https://example.com'
  ) 
GROUP BY date, country, metric
ORDER BY date

When isolating the query to return only one country, in the example below, "Japan" (jpn), it works as expected, with the caveat being it only shows one data point.

SELECT
date as time,
country as metric,
count(country) as total
FROM entries
WHERE
  date BETWEEN '2021-08-05T10:06:29.165Z' AND '2021-08-12T10:06:29.165Z'
  AND profile in (
      'https://example.com'
  ) 
  AND country = 'jpn'
GROUP BY date, country, metric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant