Closed sgofferj closed 4 years ago
Hey Sqofferj, the panel should work with a influxDB datasource.
Have you set the Format as
to Table
instead of the default Time series
?
@Drazair Thanks! I just tried Table but I still don't get anything. I'm probably missing something basic. Could you advise on how exactly the query should look like?
Never mind... I wrote "longitude as lon" instead on "longitude" as lon... It works fine with Table. Thanks a lot!
It just stopped working and I didn't change anything. That's my query:
SELECT "latitude" as lat, "longitude" as lon, "time" as time_index FROM "device_tracker.ulefone_gps" WHERE $timeFilter
I selected "Format as table". The query inspector shows that data is returned and the data looks good...
Object
xhrStatus:"complete"
request:Object
method:"GET"
url:"api/datasources/proxy/5/query"
params:Object
db:"home_assistant"
q:"SELECT "latitude" as lat, "longitude" as lon, "time" as time_index FROM "device_tracker.ulefone_gps" WHERE time >= now() - 24h"
epoch:"ms"
data:null
precision:"ms"
response:Object
results:Array[1]
0:Object
statement_id:0
series:Array[1]
0:Object
name:"device_tracker.ulefone_gps"
columns:Array[3]
0:"time_index"
1:"lat"
2:"lon"
values:Array[188]
0:Array[1570439118300,61.255225,24.05604166666667]
1:Array[1570439152205,61.25527666666667,24.055926666666664]
2:Array[1570439284125,61.25527666666667,24.055926666666664]
3:Array[1570439317209,61.25527666666667,24.055926666666664]
4:Array[1570439519238,61.25527666666667,24.055926666666664]
5:Array[1570439989218,61.25525833333333,24.055991666666667]
6:Array[1570440055118,61.25521666666667,24.056109999999997]
7:Array[1570440088349,61.255333333333326,24.056648333333335]
8:Array[1570440121152,61.255154999999995,24.056748333333335]
[...]
Browser console shows no error. Grafana log shows no error.
Updated to Grafana 6.4.2. Now I see an error in the console:
Panel data error: TypeError: "L.heatLayer is not a function" metrics_panel_ctrl.ts:202:6
value module.js:10
value module.js:10
emit index.js:129
emit emitter.ts:11
handleQueryResult sdk.ts:1
next metrics_panel_ctrl.ts:82
RxJS 8
__tryOrUnsub
next
_next
next
_next
next
next
nextInfiniteTimeWindow
next PanelModel.ts:5
RxJS 19
__tryOrUnsub
next
_next
next
notifyNext
_next
next
_next
next
next
_next
next
_next
next
_next
next
_next
next
o
Angular 6
f
f
$digest
evalAsync
p
n
Hey Sgofferj,
Sorry for the late reply, had some other assignments that took all my time.
I just tried downloading the newest version of Gafana, and I'm not getting any errors. Are you using any other plugins?
That was a good hint... Yes, I am using the trackmap panel (https://github.com/pR0Ps/grafana-trackmap-panel) on the same dashboard. Deleted it for testing now and without it, Track Map works... I also tried 2 Track Map panels in one dashboard but that also doesn't work. Now the error message kinda makes sense also. I suppose, Track Map just uses a reference implementation of Leaflet, using "L" as the name. And trackmap probably does the same...
I'm going to close this issue since it's been solved, and the problem with the conflict between plugins have its own issue ( #5 )
Not sure if this a support or feature request. I'm trying to visualize track data from an InfluxDB source. The data is stored in "longitude" and "latitude". I have tried the following queries without success:
I'm not sure in which format the plugin is expecting the data. Would you kindly advise? In case, it's not yet possible to use data from InfluxDB, please consider this a feature request.