Set proper elevation unit

This commit is contained in:
Adrian Kumpf
2022-06-24 23:17:31 +02:00
parent 04d30765cf
commit 4b22a8015e
+36 -4
View File
@@ -22,7 +22,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"iteration": 1656103313502,
"iteration": 1656105310502,
"links": [
{
"icon": "dashboard",
@@ -1228,13 +1228,41 @@
{
"matcher": {
"id": "byRegexp",
"options": "/Elevation.*/"
"options": ".*_m$"
},
"properties": [
{
"id": "unit",
"value": "lengthm"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": ".*_ft$"
},
"properties": [
{
"id": "unit",
"value": "feet"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": "elevation_.*"
},
"properties": [
{
"id": "displayName",
"value": "Elevation"
},
{
"id": "color",
"value": {
"fixedColor": "#3274D9",
"fixedColor": "semi-dark-blue",
"mode": "fixed"
}
}
@@ -1263,11 +1291,15 @@
"pluginVersion": "8.5.4",
"targets": [
{
"datasource": {
"type": "postgres",
"uid": "PC98BA2F4D77E1A42"
},
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n\t$__time(date),\n\tROUND(convert_m(elevation, '$alternative_length_unit')) AS \"Elevation [$alternative_length_unit]\"\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC",
"rawSql": "SELECT\n\t$__time(date),\n\tROUND(convert_m(elevation, '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC",
"refId": "A",
"select": [
[