logo

X6

  • Tutorials
  • API
  • Examples
  • Q&A
  • Change Log
  • Productsantv logo arrow
  • 3.x
  • Introduction
  • Quickstart
  • Basic
    • Graph
    • Nodes
    • Edges
    • Ports
    • Interaction
    • Events
    • Data Serialization
    • Animation
  • Intermediate
    • Connection Points
    • Tools
    • Group
    • React Nodes
    • Vue Nodes
    • Angular Nodes
    • HTML Nodes
  • Plugin
    • Graphic Transformations
    • Snapline
    • Clipboard
    • Keyboard
    • History
    • Selection Box
    • Scroller
    • Dnd
    • Mini Map
    • Stencil
    • Export
  • Upgrade to 3.x
  • Developer Tools

Mini Map

Previous
Dnd
Next
Stencil

Resource

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library
WeaveFox-AI Coding Assistant

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference
weavefoxWeaveFox-AI Developer Community

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-Interactive solution
weavefoxWeaveFox-AI Coding Assistant
© Copyright 2026 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

This chapter mainly introduces knowledge related to the Mini Map plugin. By reading, you can learn about

  • How to use the Mini Map plugin

Usage

You can enable the mini-map with the MiniMap plugin. Example:

import { Graph, MiniMap } from '@antv/x6'
const graph = new Graph({
background: {
color: '#F2F7FA',
},
})
graph.use(
new MiniMap({
container: document.getElementById('minimap'),
}),
)

Demo

  • Move the mini-map viewport to move the canvas.
  • Zoom the mini-map viewport to zoom the canvas.

Options

Property NameTypeDefault ValueRequiredDescription
containerHTMLElement-✓️The container to mount the mini-map
widthnumber300The width of the mini-map
heightnumber200The height of the mini-map
paddingnumber10The padding margin of the mini-map container
scalablebooleantrueWhether scaling is enabled
minScalenumber0.01The minimum scale ratio
maxScalenumber16The maximum scale ratio
graphOptionsGraph.Options{}Options for the internal mini-map Graph
createGraph(options: Graph.Options) => Graphoptions => new Graph(options)Custom method to create the internal mini-map Graph