# chartjs-plugin-zoom - v2.0.1

# Type aliases

# PanFunction

Ƭ PanFunction: (scale: Scale, delta: number, limits: LimitOptions) => boolean

# Type declaration

▸ (scale, delta, limits): boolean

# Parameters
Name Type
scale Scale
delta number
limits LimitOptions
# Returns

boolean

# Defined in

index.d.ts:35 (opens new window)


# ZoomFunction

Ƭ ZoomFunction: (scale: Scale, zoom: number, center: Point, limits: LimitOptions) => boolean

# Type declaration

▸ (scale, zoom, center, limits): boolean

# Parameters
Name Type
scale Scale
zoom number
center Point
limits LimitOptions
# Returns

boolean

# Defined in

index.d.ts:33 (opens new window)


# ZoomRectFunction

Ƭ ZoomRectFunction: (scale: Scale, from: number, to: number, limits: LimitOptions) => boolean

# Type declaration

▸ (scale, from, to, limits): boolean

# Parameters
Name Type
scale Scale
from number
to number
limits LimitOptions
# Returns

boolean

# Defined in

index.d.ts:34 (opens new window)

# Variables

# default

default: Plugin & { panFunctions: ScaleFunctions<PanFunction> ; zoomFunctions: ScaleFunctions<ZoomFunction> ; zoomRectFunctions: ScaleFunctions<ZoomRectFunction> }

# Defined in

index.d.ts:43 (opens new window)

# Functions

# getInitialScaleBounds

getInitialScaleBounds(chart): Record<string, Object>

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>

# Returns

Record<string, Object>

# Defined in

index.d.ts:57 (opens new window)


# getZoomLevel

getZoomLevel(chart): number

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>

# Returns

number

# Defined in

index.d.ts:56 (opens new window)


# isZoomedOrPanned

isZoomedOrPanned(chart): boolean

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>

# Returns

boolean

# Defined in

index.d.ts:58 (opens new window)


# pan

pan(chart, amount, scales?, mode?): void

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>
amount PanAmount
scales? Scale<CoreScaleOptions>[]
mode? "resize" | "reset" | "none" | "hide" | "show" | "default" | "active" | "zoom"

# Returns

void

# Defined in

index.d.ts:51 (opens new window)


# resetZoom

resetZoom(chart, mode?): void

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>
mode? "resize" | "reset" | "none" | "hide" | "show" | "default" | "active" | "zoom"

# Returns

void

# Defined in

index.d.ts:55 (opens new window)


# zoom

zoom(chart, amount, mode?): void

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>
amount ZoomAmount
mode? "resize" | "reset" | "none" | "hide" | "show" | "default" | "active" | "zoom"

# Returns

void

# Defined in

index.d.ts:52 (opens new window)


# zoomRect

zoomRect(chart, p0, p1, mode?): void

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>
p0 Point
p1 Point
mode? "resize" | "reset" | "none" | "hide" | "show" | "default" | "active" | "zoom"

# Returns

void

# Defined in

index.d.ts:53 (opens new window)


# zoomScale

zoomScale(chart, scaleId, range, mode?): void

# Parameters

Name Type
chart Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>
scaleId string
range ScaleRange
mode? "resize" | "reset" | "none" | "hide" | "show" | "default" | "active" | "zoom"

# Returns

void

# Defined in

index.d.ts:54 (opens new window)