mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataFrame: convert from row based to a columnar value format (#18391)
This commit is contained in:
8
public/app/plugins/datasource/input/utils.ts
Normal file
8
public/app/plugins/datasource/input/utils.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { toDataFrame, DataFrameDTO, toCSV } from '@grafana/data';
|
||||
|
||||
export function dataFrameToCSV(dto?: DataFrameDTO[]) {
|
||||
if (!dto || !dto.length) {
|
||||
return '';
|
||||
}
|
||||
return toCSV(dto.map(v => toDataFrame(dto)));
|
||||
}
|
||||
Reference in New Issue
Block a user