Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

CSVReader class

Signature

typescript
export declare class CSVReader 

Import

typescript
import { CSVReader } from '@grafana/data';

Constructors

ConstructorModifiersDescription
constructor(options)Constructs a new instance of the CSVReader class

Properties

PropertyModifiersTypeDescription
callbackCSVParseCallbacks
configCSVConfig
currentMutableDataFrame
dataMutableDataFrame[]
stateParseState

Methods

MethodModifiersDescription
readCSV(text)

constructor(options)

Constructs a new instance of the CSVReader class

Signature

typescript
constructor(options?: CSVOptions);

Parameters

ParameterTypeDescription
optionsCSVOptions

callback property

Signature

typescript
callback?: CSVParseCallbacks;

config property

Signature

typescript
config: CSVConfig;

current property

Signature

typescript
current: MutableDataFrame;

data property

Signature

typescript
data: MutableDataFrame[];

state property

Signature

typescript
state: ParseState;

readCSV method

Signature

typescript
readCSV(text: string): MutableDataFrame[];

Parameters

ParameterTypeDescription
textstring

Returns:

MutableDataFrame[]