pR0Ps / grafana-trackmap-panel

A panel for Grafana that visualizes GPS points as a line on an interactive map
https://grafana.com/plugins/pr0ps-trackmap-panel
Apache License 2.0
137 stars 61 forks source link

Types in query? #42

Closed DrMichael closed 4 years ago

DrMichael commented 4 years ago

Sorry, I could not find any doc about that...

I saw in examples, that you can set types for data points. How can that be done? I tried:

SELECT
  to_timestamp(floor((extract('epoch' FROM date) / 60)) * 60) AT TIME ZONE 'UTC' as time_sec,
 avg(latitude) AS lat,
 avg(longitude) AS lng,
 0 as type,
 null as address
FROM
  positions
WHERE
  $__timeFilter(date)
GROUP BY 1
ORDER BY 1 AS

and formatted as table, but that does not work. Formatting as timeseries works with:

SELECT
  to_timestamp(floor((extract('epoch' FROM date) / 60)) * 60) AT TIME ZONE 'UTC' as time,
    avg(latitude) AS lat,
    avg(longitude) AS lng
FROM
  positions
WHERE
  $__timeFilter(date)
GROUP BY 1
ORDER BY 1 ASC
bassmaster187 commented 4 years ago

This feature is in my fork of trackmappanel used by Teslalogger: https://github.com/bassmaster187/TeslaLogger

image

DrMichael commented 4 years ago

Ah. Which fork is it? Could it be merged into this here?

(Great piece of software, TeslaLogge r:-)

bassmaster187 commented 4 years ago

https://github.com/bassmaster187/grafana-trackmap-panel

I didn't make a pull request as it's pretty much only for the needs of TeslaLogger.

bassmaster187 commented 4 years ago

If there is a need besides Teslalogger and Teslamate, someone have to make a config panel for the different types of icons. Actually it's hard coded for my need.

pR0Ps commented 4 years ago

Closing since the feature mentioned is not part of this project.