Explorar o código

units: adds back velocity units. Fixes #14851

Daniel Lee %!s(int64=7) %!d(string=hai) anos
pai
achega
1fea09ba54
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      packages/grafana-ui/src/utils/valueFormats/categories.ts

+ 9 - 0
packages/grafana-ui/src/utils/valueFormats/categories.ts

@@ -299,6 +299,15 @@ export const getCategories = (): ValueFormatCategory[] => [
       { name: 'writes/min (wpm)', id: 'wpm', fn: simpleCountUnit('wpm') },
     ],
   },
+  {
+    name: 'velocity',
+    formats: [
+      { name: 'metres/second (m/s)', id: 'velocityms', fn: toFixedUnit('m/s') },
+      { name: 'kilometers/hour (km/h)', id: 'velocitykmh', fn: toFixedUnit('km/h') },
+      { name: 'miles/hour (mph)', id: 'velocitymph', fn: toFixedUnit('mph') },
+      { name: 'knot (kn)', id: 'velocityknot', fn: toFixedUnit('kn') },
+    ]
+  },
   {
     name: 'volume',
     formats: [