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