logo

X6

  • Tutorials
  • API
  • Examples
  • Q&A
  • Change Log
  • XFlow
  • Productsantv logo arrow
  • 2.x
  • Introduction
  • Quickstart
  • Basic
    • Graph
    • Nodes
    • Edges
    • Connection Pile
    • Interaction
    • Events
    • Data Serialization
  • 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 Version 2.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

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

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
xtechLiven Experience technology
© Copyright 2025 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 feature

Usage

We provide a standalone plugin package @antv/x6-plugin-minimap to use the mini-map feature.

# npm
$ npm install @antv/x6-plugin-minimap --save
# yarn
$ yarn add @antv/x6-plugin-minimap

Then we use it in the code like this:

import { MiniMap } from '@antv/x6-plugin-minimap'
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 it is scalable
minScalenumber0.01The minimum scale ratio
maxScalenumber16The maximum scale ratio
graphOptionsGraph.OptionsnullOptions for creating the mini-map Graph