diff --git a/packages/grafana-ui/src/types/data.ts b/packages/grafana-ui/src/types/data.ts index d8d67809ed8..992e11690d5 100644 --- a/packages/grafana-ui/src/types/data.ts +++ b/packages/grafana-ui/src/types/data.ts @@ -51,9 +51,9 @@ export enum NullValueMode { export type TimeSeriesVMs = TimeSeriesVM[]; export interface Column { - text: string; // name - type?: 'time' | 'number' | 'string' | 'object'; - filterable?: boolean; + text: string; // The column name + type?: 'time' | 'number' | 'string' | 'object'; // not used anywhere? can we remove? + filterable?: boolean; // currently only set by elasticsearch, and used in the table panel unit?: string; } diff --git a/packages/grafana-ui/src/utils/processTableData.ts b/packages/grafana-ui/src/utils/processTableData.ts index 9f81635da20..d4a91efd622 100644 --- a/packages/grafana-ui/src/utils/processTableData.ts +++ b/packages/grafana-ui/src/utils/processTableData.ts @@ -139,6 +139,7 @@ function convertTimeSeriesToTableData(timeSeries: TimeSeries): TableData { { text: 'Time', type: 'time', + unit: 'dateTimeAsIso', }, ], rows: timeSeries.datapoints,