Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

TypeError: this.datapoints is undefined #331

@rsiddle

Description

@rsiddle

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions