Files
grafana/docs/sources/packages_api/data/constantvector.md
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

105 lines
1.9 KiB
Markdown

+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "ConstantVector"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## ConstantVector class
<b>Signature</b>
```typescript
export declare class ConstantVector<T = any> implements Vector<T>
```
<b>Import</b>
```typescript
import { ConstantVector } from '@grafana/data';
```
<b>Constructors</b>
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [constructor(value, len)](#constructor-valuelen) | | Constructs a new instance of the <code>ConstantVector</code> class |
<b>Properties</b>
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [length](#length-property) | | <code>number</code> | |
<b>Methods</b>
| Method | Modifiers | Description |
| --- | --- | --- |
| [get(index)](#get-method) | | |
| [toArray()](#toarray-method) | | |
| [toJSON()](#tojson-method) | | |
### constructor(value, len)
Constructs a new instance of the `ConstantVector` class
<b>Signature</b>
```typescript
constructor(value: T, len: number);
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| value | <code>T</code> | |
| len | <code>number</code> | |
### length property
<b>Signature</b>
```typescript
get length(): number;
```
### get method
<b>Signature</b>
```typescript
get(index: number): T;
```
<b>Parameters</b>
| Parameter | Type | Description |
| --- | --- | --- |
| index | <code>number</code> | |
<b>Returns:</b>
`T`
### toArray method
<b>Signature</b>
```typescript
toArray(): T[];
```
<b>Returns:</b>
`T[]`
### toJSON method
<b>Signature</b>
```typescript
toJSON(): T[];
```
<b>Returns:</b>
`T[]`