# chartjs-plugin-zoom - v1.2.0

# 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:33 (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:32 (opens new window)

# Variables

# default

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

# Defined in

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

# Functions

# getInitialScaleBounds

getInitialScaleBounds(chart): Record<string, Object>

# Parameters

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

# Returns

Record<string, Object>

# Defined in

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


# getZoomLevel

getZoomLevel(chart): number

# Parameters

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

# Returns

number

# Defined in

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


# isZoomedOrPanned

isZoomedOrPanned(chart): boolean

# Parameters

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

# Returns

boolean

# Defined in

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


# pan

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

# Parameters

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

# Returns

void

# Defined in

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


# resetZoom

resetZoom(chart, mode?): void

# Parameters

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

# Returns

void

# Defined in

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


# zoom

zoom(chart, amount, mode?): void

# Parameters

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

# Returns

void

# Defined in

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


# zoomScale

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

# Parameters

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

# Returns

void

# Defined in

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