utils.ts 296 B

123456789
  1. import { FieldDisplay } from '@grafana/data';
  2. export function filterDisplayItems(item: FieldDisplay) {
  3. return !item.field.custom?.hideFrom?.viz && !isNaN(item.display.numeric);
  4. }
  5. export function sumDisplayItemsReducer(acc: number, item: FieldDisplay) {
  6. return item.display.numeric + acc;
  7. }