Files
Marcus Andersson cc3fc18076 Docs: enable packages reference docs for 7-beta (#23953)
* added packages reference menu item.

* removed the draft flag.

* Updated docs by running script.
2020-04-28 09:53:58 +02:00

3.1 KiB

+++

-----------------------------------------------------------------------

Do not edit this file. It is automatically generated by API Documenter.

-----------------------------------------------------------------------

title = "FieldCache" keywords = ["grafana","documentation","sdk","@grafana/data"] type = "docs" +++

FieldCache class

Signature

export declare class FieldCache 

Import

import { FieldCache } from '@grafana/data';

Constructors

Constructor Modifiers Description
constructor(data) Constructs a new instance of the FieldCache class

Properties

Property Modifiers Type Description
fields FieldWithIndex[]

Methods

Method Modifiers Description
getFieldByName(name) Returns the first field with the given name.
getFields(type)
getFirstFieldOfType(type)
hasFieldNamed(name)
hasFieldOfType(type)

constructor(data)

Constructs a new instance of the FieldCache class

Signature

constructor(data: DataFrame);

Parameters

Parameter Type Description
data DataFrame

fields property

Signature

fields: FieldWithIndex[];

getFieldByName method

Returns the first field with the given name.

Signature

getFieldByName(name: string): FieldWithIndex | undefined;

Parameters

Parameter Type Description
name string

Returns:

FieldWithIndex | undefined

getFields method

Signature

getFields(type?: FieldType): FieldWithIndex[];

Parameters

Parameter Type Description
type FieldType

Returns:

FieldWithIndex[]

getFirstFieldOfType method

Signature

getFirstFieldOfType(type: FieldType): FieldWithIndex | undefined;

Parameters

Parameter Type Description
type FieldType

Returns:

FieldWithIndex | undefined

hasFieldNamed method

Signature

hasFieldNamed(name: string): boolean;

Parameters

Parameter Type Description
name string

Returns:

boolean

hasFieldOfType method

Signature

hasFieldOfType(type: FieldType): boolean;

Parameters

Parameter Type Description
type FieldType

Returns:

boolean