Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/v8.0/packages_api/data/indexvector.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/v8.0/packages_api/data/indexvector/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
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.
IndexVector class
IndexVector is a simple vector implementation that returns the index value for each element in the vector. It is functionally equivolant a vector backed by an array with values: [0,1,2,...,length-1]
Signature
export declare class IndexVector extends FunctionalVector<number> Import
import { IndexVector } from '@grafana/data';Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| constructor(len) | Constructs a new instance of the IndexVector class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| length | number |
Methods
| Method | Modifiers | Description |
|---|---|---|
| get(index) | ||
| newField(len) | static | Returns a field representing the range [0 … length-1] |
constructor(len)
Constructs a new instance of the IndexVector class
Signature
constructor(len: number);Parameters
| Parameter | Type | Description |
|---|---|---|
| len | number |
length property
Signature
get length(): number;get method
Signature
get(index: number): number;Parameters
| Parameter | Type | Description |
|---|---|---|
| index | number |
Returns:
number
newField method
Returns a field representing the range [0 … length-1]
Signature
static newField(len: number): Field<number>;Parameters
| Parameter | Type | Description |
|---|---|---|
| len | number |
Returns:
Field<number>