Home
Softono
a

antvis

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
3

Software by antvis

mcp-server-chart
Open Source

mcp-server-chart

# MCP Server Chart A Model Context Protocol server for generating charts using [AntV](https://github.com/antvis/). We can use this mcp server for _chart generation_ and _data analysis_. ![](https://badge.mcpx.dev?type=server "MCP Server") [![build](https://github.com/antvis/mcp-server-chart/actions/workflows/build.yml/badge.svg)](https://github.com/antvis/mcp-server-chart/actions/workflows/build.yml) [![npm Version](https://img.shields.io/npm/v/@antv/mcp-server-chart.svg)](https://www.npmjs.com/package/@antv/mcp-server-chart) [![npm License](https://img.shields.io/npm/l/@antv/mcp-server-chart.svg)](https://www.npmjs.com/package/@antv/mcp-server-chart) [![codecov](https://codecov.io/gh/antvis/mcp-server-chart/graph/badge.svg?token=7R98VGO5GL)](https://codecov.io/gh/antvis/mcp-server-chart) [![smithery installations badge](https://smithery.ai/badge/antvis/mcp-server-chart)](https://smithery.ai/servers/antvis/mcp-server-chart) ![Visitors](https://hitscounter.dev/api/hit?url=https://github.com/antvis/mcp-server-chart&label=Visitors&icon=graph-up&color=%23dc3545&message=&style=flat&tz=UTC) <img width="768" alt="mcp-server-chart technical digram" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*XVH-Srg-b9UAAAAAgGAAAAgAemJ7AQ/fmt.avif" /> This is a TypeScript-based MCP server that provides chart generation capabilities. It allows you to create various types of charts through MCP tools. You can also use it in [Dify](https://marketplace.dify.ai/plugins/antv/visualization). ## ๐Ÿ“‹ Table of Contents - [โœจ Features](#-features) - [๐Ÿค– Usage](#-usage) - [๐ŸŽจ Skill Usage](#-skill-usage) - [๐Ÿšฐ Run with SSE or Streamable transport](#-run-with-sse-or-streamable-transport) - [๐ŸŽฎ CLI Options](#-cli-options) - [โš™๏ธ Environment Variables](#%EF%B8%8F-environment-variables) - [VIS_REQUEST_SERVER](#-private-deployment) - [SERVICE_ID](#%EF%B8%8F-generate-records) - [DISABLED_TOOLS](#%EF%B8%8F-tool-filtering) - [๐Ÿ“  Private Deployment](#-private-deployment) - [๐Ÿ—บ๏ธ Generate Records](#%EF%B8%8F-generate-records) - [๐ŸŽ›๏ธ Tool Filtering](#%EF%B8%8F-tool-filtering) - [๐Ÿ”จ Development](#-development) - [๐Ÿ“„ License](#-license) ## โœจ Features Now 26+ charts supported. <img width="768" alt="mcp-server-chart preview" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*IyIRQIQHyKYAAAAAgCAAAAgAemJ7AQ/fmt.avif" /> 1. `generate_area_chart`: Generate an `area` chart, used to display the trend of data under a continuous independent variable, allowing observation of overall data trends. 1. `generate_bar_chart`: Generate a `bar` chart, used to compare values across different categories, suitable for horizontal comparisons. 1. `generate_boxplot_chart`: Generate a `boxplot`, used to display the distribution of data, including the median, quartiles, and outliers. 1. `generate_column_chart`: Generate a `column` chart, used to compare values across different categories, suitable for vertical comparisons. 1. `generate_district_map` - Generate a `district-map`, used to show administrative divisions and data distribution. 1. `generate_dual_axes_chart`: Generate a `dual-axes` chart, used to display the relationship between two variables with different units or ranges. 1. `generate_fishbone_diagram`: Generate a `fishbone` diagram, also known as an Ishikawa diagram, used to identify and display the root causes of a problem. 1. `generate_flow_diagram`: Generate a `flowchart`, used to display the steps and sequence of a process. 1. `generate_funnel_chart`: Generate a `funnel` chart, used to display data loss at different stages. 1. `generate_histogram_chart`: Generate a `histogram`, used to display the distribution of data by dividing it into intervals and counting the number of data points in each interval. 1. `generate_line_chart`: Generate a `line` chart, used to display the trend of data over time or another continuous variable. 1. `generate_liquid_chart`: Generate a `liquid` chart, used to display the proportion of data, visually representing percentages in the form of water-filled spheres. 1. `generate_mind_map`: Generate a `mind-map`, used to display thought processes and hierarchical information. 1. `generate_network_graph`: Generate a `network` graph, used to display relationships and connections between nodes. 1. `generate_organization_chart`: Generate an `organizational` chart, used to display the structure of an organization and personnel relationships. 1. `generate_path_map` - Generate a `path-map`, used to display route planning results for POIs. 1. `generate_pie_chart`: Generate a `pie` chart, used to display the proportion of data, dividing it into parts represented by sectors showing the percentage of each part. 1. `generate_pin_map` - Generate a `pin-map`, used to show the distribution of POIs. 1. `generate_radar_chart`: Generate a `radar` chart, used to display multi-dimensional data comprehensively, showing multiple dimensions in a radar-like format. 1. `generate_sankey_chart`: Generate a `sankey` chart, used to display data flow and volume, representing the movement of data between different nodes in a Sankey-style format. 1. `generate_scatter_chart`: Generate a `scatter` plot, used to display the relationship between two variables, showing data points as scattered dots on a coordinate system. 1. `generate_treemap_chart`: Generate a `treemap`, used to display hierarchical data, showing data in rectangular forms where the size of rectangles represents the value of the data. 1. `generate_venn_chart`: Generate a `venn` diagram, used to display relationships between sets, including intersections, unions, and differences. 1. `generate_violin_chart`: Generate a `violin` plot, used to display the distribution of data, combining features of boxplots and density plots to provide a more detailed view of the data distribution. 1. `generate_word_cloud_chart`: Generate a `word-cloud`, used to display the frequency of words in textual data, with font sizes indicating the frequency of each word. 1. `generate_spreadsheet`: Generate a `spreadsheet` or pivot table for displaying tabular data. When 'rows' or 'values' fields are provided, it renders as a pivot table (cross-tabulation); otherwise, it renders as a regular table. > [!NOTE] > The above geographic visualization chart generation tool uses [AMap service](https://lbs.amap.com/) and currently only supports map generation within China. ## ๐Ÿค– Usage To use with `Desktop APP`, such as Claude, VSCode, [Cline](https://cline.bot/mcp-marketplace), Cherry Studio, Cursor, and so on, add the MCP server config below. On Mac system: ```json { "mcpServers": { "mcp-server-chart": { "command": "npx", "args": ["-y", "@antv/mcp-server-chart"] } } } ``` On Window system: ```json { "mcpServers": { "mcp-server-chart": { "command": "cmd", "args": ["/c", "npx", "-y", "@antv/mcp-server-chart"] } } } ``` Also, you can use it on [aliyun](https://bailian.console.aliyun.com/?tab=mcp#/mcp-market/detail/antv-visualization-chart), [modelscope](https://www.modelscope.cn/mcp/servers/@antvis/mcp-server-chart), [glama.ai](https://glama.ai/mcp/servers/@antvis/mcp-server-chart), [smithery.ai](https://smithery.ai/servers/@antvis/mcp-server-chart) or others with HTTP, SSE Protocol. ## ๐ŸŽจ Skill Usage If you are using an AI IDE with skill support (like **Claude Code**), you can use the `chart-visualization` skill to automatically select the best chart type and generate visualizations. You can add the skill from [https://github.com/antvis/chart-visualization-skills](https://github.com/antvis/chart-visualization-skills) using: ```bash npx skills add antvis/chart-visualization-skills ``` Then provide your data or describe the visualization you want. The skill will intelligently choose from 25+ chart types and generate the chart for you. ## ๐Ÿšฐ Run with SSE or Streamable transport ### Run directly Install the package globally. ```bash npm install -g @antv/mcp-server-chart ``` Run the server with your preferred transport option: ```bash # For SSE transport (default endpoint: /sse) mcp-server-chart --transport sse # For Streamable transport with custom endpoint mcp-server-chart --transport streamable ``` Then you can access the server at: - SSE transport: `http://localhost:1122/sse` - Streamable transport: `http://localhost:1122/mcp` ### Docker deploy Enter the docker directory. ```bash cd docker ``` Deploy using docker-compose. ```bash docker compose up -d ``` Then you can access the server at: - SSE transport: `http://localhost:1123/sse` - Streamable transport: `http://localhost:1122/mcp` ## ๐ŸŽฎ CLI Options You can also use the following CLI options when running the MCP server. Command options by run cli with `-H`. ```plain MCP Server Chart CLI Options: --transport, -t Specify the transport protocol: "stdio", "sse", or "streamable" (default: "stdio") --host, -h Specify the host for SSE or streamable transport (default: localhost) --port, -p Specify the port for SSE or streamable transport (default: 1122) --endpoint, -e Specify the endpoint for the transport: - For SSE: default is "/sse" - For streamable: default is "/mcp" --help, -H Show this help message ``` ## โš™๏ธ Environment Variables | Variable | Description | Default | Example | | -------------------- | :--------------------------------------------------------- | -------------------------------------------- | --------------------------------------------- | | `VIS_REQUEST_SERVER` | Custom chart generation service URL for private deployment | `https://antv-studio.alipay.com/api/gpt-vis` | `https://your-server.com/api/chart` | | `SERVICE_ID` | Service identifier for chart generation records | - | `your-service-id-123` | | `DISABLED_TOOLS` | Comma-separated list of tool names to disable | - | `generate_fishbone_diagram,generate_mind_map` | ### ๐Ÿ“  Private Deployment `MCP Server Chart` provides a free chart generation service by default. For users with a need for private deployment, they can try using `VIS_REQUEST_SERVER` to customize their own chart generation service. ```json { "mcpServers": { "mcp-server-chart": { "command": "npx", "args": ["-y", "@antv/mcp-server-chart"], "env": { "VIS_REQUEST_SERVER": "<YOUR_VIS_REQUEST_SERVER>" } } } } ``` You can use AntV's project [GPT-Vis-SSR](https://github.com/antvis/GPT-Vis/tree/main/bindings/gpt-vis-ssr) to deploy an HTTP service in a private environment, and then pass the URL address through env `VIS_REQUEST_SERVER`. - **Method**: `POST` - **Parameter**: Which will be passed to `GPT-Vis-SSR` for rendering. Such as, `{ "type": "line", "data": [{ "time": "2025-05", "value": 512 }, { "time": "2025-06", "value": 1024 }] }`. - **Return**: The return object of HTTP service. - **success**: `boolean` Whether generate chart image successfully. - **resultObj**: `string` The chart image url. - **errorMessage**: `string` When `success = false`, return the error message. > [!NOTE] > The private deployment solution currently does not support geographic visualization chart generation include 3 tools: `geographic-district-map`, `geographic-path-map`, `geographic-pin-map`. ### ๐Ÿ—บ๏ธ Generate Records By default, users are required to save the results themselves, but we also provide a service for viewing the chart generation records, which requires users to generate a service identifier for themselves and configure it. Use Alipay to scan and open the mini program to generate a personal service identifier (click the "My" menu below, enter the "My Services" page, click the "Generate" button, and click the "Copy" button after success): <img alt="my service identifier website" width="240" src="https://mdn.alipayobjects.com/huamei_dxq8v0/afts/img/dASoTLt6EywAAAAARqAAAAgADu43AQFr/fmt.webp" /> Next, you need to add the `SERVICE_ID` environment variable to the MCP server configuration. For example, the configuration for Mac is as follows (for Windows systems, just add the `env` variable): ```json { "mcpServers": { "AntV Map": { "command": "npx", "args": ["-y", "@antv/mcp-server-chart"], "env": { "SERVICE_ID": "***********************************" } } } } ``` After updating the MCP Server configuration, you need to restart your AI client application and check again whether you have started and connected to the MCP Server successfully. Then you can try to generate the map again. After the generation is successful, you can go to the "My Map" page of the mini program to view your map generation records. <img alt="my map records website" width="240" src="https://mdn.alipayobjects.com/huamei_dxq8v0/afts/img/RacFR7emR3QAAAAAUkAAAAgADu43AQFr/original" /> ### ๐ŸŽ›๏ธ Tool Filtering You can disable specific chart generation tools using the `DISABLED_TOOLS` environment variable. This is useful when certain tools have compatibility issues with your MCP client or when you want to limit the available functionality. ```json { "mcpServers": { "mcp-server-chart": { "command": "npx", "args": ["-y", "@antv/mcp-server-chart"], "env": { "DISABLED_TOOLS": "generate_fishbone_diagram,generate_mind_map" } } } } ``` **Available tool names for filtering** See the [โœจ Features](#-features). ## ๐Ÿ”จ Development Install dependencies: ```bash npm install ``` Build the server: ```bash npm run build ``` Start the MCP server: ```bash npm run start ``` Start the MCP server with SSE transport: ```bash node build/index.js -t sse ``` Start the MCP server with Streamable transport: ```bash node build/index.js -t streamable ``` ## ๐Ÿ“„ License MIT@[AntV](https://github.com/antvis).

ERP & Business AI Agents
4.1K Github Stars
chart-visualization-skills
Open Source

chart-visualization-skills

# Chart Visualization Skills > Turning data into a visual language for better thinking. <img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*ZFK8SrovcqgAAAAAAAAAAAAAemJ7AQ/original" width="16" /> AntV ![stars](https://img.shields.io/github/stars/antvis?style=social), initiated by Ant Group and open-sourced starting in 2017, reimagines data visualization by embedding the theory of graphical grammar into the JavaScript language. In response to rigid chart libraries that force a trade-off between flexibility and usability, we have categorized data visualization techniques into four series: 2, 6, 7, and 8, which respectively represent _statistical analysis_, _graph analysis_, _geographical analysis_, and _unstructured data visualization_. We have expanded these capabilities across different levels, including chart libraries, R&D tools, and AI-powered intelligent visualization. ## Overview In the era of data-driven decision-making, efficient and accurate data visualization and analysis are paramount. AntV offers a professional suite of visualization solutions, providing a robust toolkit and a comprehensive set of skills for the entire workflowโ€”from chart design and interactive exploration to in-depth data analysis. It empowers users to swiftly transform complex datasets into intuitive visual charts, significantly lowering the barrier to creation through intelligent design specifications and a rich library of components. Whether for daily reporting, dynamic dashboards, or sophisticated interactive analysis, AntV delivers reliable support. By integrating AI capabilities, these tools further streamline and automate the generation and optimization of visualizations. This allows analysts to focus more on uncovering insights and driving business decisions, truly making data visible and understandable. > [!WARNING] > This project only merges AI-generated code. > > **How to contribute:** > 1. Submit an issue describing the problem clearly > 2. Assign it to @copilot with your requirements ## Usage Add this marketplace to Claude Code: ```bash /plugin marketplace add antvis/chart-visualization-skills ``` Or you can directly install the skills for your multiple agents: ```bash npx skills add antvis/chart-visualization-skills ``` ## Available Skills - ๐Ÿ“Š **chart-visualization**: A comprehensive chart generation skill powered by AntV that provides 26+ chart types for intelligent data visualization. `Chart Visualization` intelligently selects the most appropriate chart type from 26+ available options, extracts parameters based on detailed specifications, and generates high-quality chart images. It covers time series, comparisons, part-to-whole, relationships, geographic, hierarchical, statistical, and specialized visualizations. - ๐ŸŽจ **infographic-creator**: Create beautiful infographics based on given text content. Use when users request to create infographics. `Infographic Creator` uses AntV Infographic to transform data, information, and knowledge into a perceptible visual language. It combines visual design with data visualization, providing 50+ templates including lists, sequences, hierarchies, comparisons, relations, and charts. It compresses complex information with intuitive symbols to help audiences quickly understand and remember key points. - ๐Ÿ–ผ๏ธ **icon-retrieval**: Search and retrieve icon SVG strings from icon library. Returns up to 5 matching icons by default (customizable). `Icon Search` helps users find appropriate icons for various use cases including infographics, web development, design, and more. Search by keywords to discover available icons and retrieve their SVG strings directly. Each search returns up to 5 matching icons by default (customizable via topK parameter) with their URLs and complete SVG content. - ๐Ÿ“ **narrative-text-visualization**: Generate structured narrative text visualizations from data using T8 Syntax. `Narrative Text Visualization` (T8) transforms unstructured data into semantically rich narrative reports using T8 Syntax - a declarative Markdown-like language for creating data narratives with entity annotations. It's LLM-friendly and framework-agnostic, working seamlessly with HTML, React, and Vue. Perfect for creating data analysis reports, summaries, and insights documents with entities like metrics, values, trends, and dimensions properly labeled. Features include built-in mini charts, standardized styling, and professional formatting. Supports authentic data sources and provides lightweight, technology-agnostic rendering. - ๐Ÿ“‹ **antv-s2-expert**: S2 multi-dimensional cross-analysis table development assistant. Use when users need help with S2 pivot tables, table sheets, or any @antv/s2 related development. `AntV S2 Expert` helps users develop with the S2 multi-dimensional cross-analysis table engine. It provides comprehensive guidance on `@antv/s2` core engine, `@antv/s2-react` and `@antv/s2-vue` framework bindings, `@antv/s2-react-components` advanced analysis components, and `@antv/s2-ssr` server-side rendering. Covers pivot tables, table sheets, custom cells, theming, events, interactions, sorting, totals, tooltips, frozen rows/columns, icons, pagination, and more. - ๐Ÿ•ธ๏ธ **antv-g6-graph**: G6 v5 graph visualization code generator. Use when users need to generate G6 graphs โ€” network graphs, tree graphs, flow charts, mind maps, and any relational or graph-structured data visualization with the G6 library. `AntV G6 Graph` generates accurate, runnable G6 v5 code following best practices. It covers core graph initialization, data structures (nodes, edges, combos), 10+ layout algorithms (force, dagre, circular, grid, mindmap, fishbone, etc.), all built-in node/edge/combo types, state management, 15+ behaviors (drag-canvas, zoom-canvas, click-select, lasso, etc.), 10+ plugins (minimap, tooltip, toolbar, legend, timebar, etc.), custom element development, transforms, and animation. Built-in guard rails prevent common v4โ†’v5 migration pitfalls such as using deprecated `G6.Graph()` constructors, `graph.data()` APIs, or Mode-based behavior configuration. - ๐Ÿ“ˆ **antv-g2-chart**: G2 v5 chart code generator. Use when users need to generate G2 charts โ€” bar charts, line charts, pie charts, scatter plots, area charts, heatmaps, and any statistical data visualization with the G2 library. `AntV G2 Chart` generates accurate, runnable G2 v5 code following Spec Mode best practices. It covers 30+ chart types (interval, line, area, point, rect, cell, treemap, sankey, chord, wordCloud, gauge, and more), data transforms (stackY, dodgeX, binX, fold, etc.), coordinate systems (cartesian, polar, theta, radial), scales, interactions (brush, slider, legend filter), components (axis, legend, tooltip, annotation), and multi-view compositions. Built-in guard rails prevent common v4โ†’v5 migration pitfalls such as using deprecated chain APIs, invalid palette names, or referencing `d3` in user code. **Evaluation Results** Harness Engineering approach has been rigorously tested against 174 chart generation test cases, demonstrating significant improvements over baseline methods: | **Model** | **G2** | **G6** | | :---: | :---: | :---: | | qwen3-coder-480b-a35b-instruct | โœจ 98.2% <sup><sub>+17.7%</sub></sup> | 94.8% <sup><sub>+15.6%</sub></sup> | | Kimi-K2.5 | 97.7% <sup><sub>+17.2%</sub></sup> | 96.9% <sup><sub>+17.7%</sub></sup> | | GLM-5.1 | 93.6% <sup><sub>+13.1%</sub></sup> | 92.8% <sup><sub>+13.6%</sub></sup> | | DeepSeek-V3.2 | 90.8% <sup><sub>+10.3%</sub></sup> | โœจ 97.9% <sup><sub>+18.7%</sub></sup> | | Context7 <sub>Baseline</sub> | 80.5% | 79.2% | The results show that Harness Engineering enables LLMs to achieve near-production-ready accuracy (up to 98.2%), significantly outperforming the Context7 baseline approach. > [!TIP] > More skills are coming soon. ## Library Usage [![npm version](https://img.shields.io/npm/v/%40antv%2Fchart-visualization-skills)](https://www.npmjs.com/package/@antv/chart-visualization-skills) ![license](https://img.shields.io/github/license/antvis/chart-visualization-skills) It can be used as a library in your Node.js projects with `CLI` and `API`. ### CLI Usage We also provide a CLI tool named `antv` for easy usage in your terminal, Install globally: ```bash npm install -g @antv/chart-visualization-skills ``` **Retrieve or list skills by query**: ```bash # Retrieve skills by query (metadata only) antv retrieve "bar chart" --library g2 --topk 10 # Retrieve skills with full markdown content (core constraints auto-prepended) antv retrieve "bar chart" --library g2 --content # Retrieve skills and output as JSON antv retrieve "bar chart" --library g2 --output json # Get a skill by its exact ID antv get g2-mark-interval-basic --library g2 # List all available skills antv list --library g2 --category core # List skills and output as JSON antv list --output json # Show skill info (core constraints from SKILL.md) antv info --library g2 # Show skill info as JSON antv info --library g2 --output json ``` **Usage for the command**: ``` Usage: antv [options] [command] CLI tool for AntV chart visualization skills retrieval Options: -V, --version output the version number -h, --help display help for command Commands: retrieve [options] <query> Search for skills matching a query get [options] <id> Get a skill by its exact ID list [options] List all available skills info [options] Show skill info from SKILL.md help [command] display help for command Options for retrieve: --library <lib> Filter by library (e.g. g2, g6) --topk <n> Number of results to return (default: 7) --content Include markdown content body in results; core constraints (SKILL.md Section 1-2) are always prepended as the first result --output <format> Output format: json | text (default: "text") ``` > Note: `--content` always prepends the library's core constraints (Section 1 & 2 of SKILL.md, up to the `<!-- CONSTRAINTS:END -->` marker) as the first result, ensuring the model receives essential rules alongside the reference documents. ### API Usage ```typescript import { retrieve } from '@antv/chart-visualization-skills'; // Metadata only (no content) const skills = retrieve('bar chart', { library: 'g2', topK: 5 }); // With full markdown content (core constraints auto-prepended as first result) const skills = retrieve('bar chart', { library: 'g2', topK: 5, content: true }); // With content but without core constraints const skills = retrieve('bar chart', { library: 'g2', topK: 5, content: true, includeInfo: false }); ``` ```typescript retrieve(query: string, options?: RetrieveOptions): Skill[] interface RetrieveOptions { library?: string; // Library filter, e.g. 'g2' or 'g6' topK?: number; // Number of results (default: 7) content?: boolean; // Include markdown content body (default: false) includeInfo?: boolean; // Prepend SKILL.md core constraints (default: same as content) } ``` | Option | Type | Default | Description | | :--- | :--- | :--- | :--- | | `library` | `string` | all | Library filter (`g2` or `g6`) | | `topK` | `number` | `7` | Number of results | | `content` | `boolean` | `false` | Include markdown content body | | `includeInfo` | `boolean` | same as `content` | Prepend SKILL.md core constraints (Section 1-2) as first result | > Notes: > - Default retrieval returns lightweight result objects without the `content` field. > - `content: true` returns markdown content body (frontmatter metadata is excluded). > - When `includeInfo` is true (the default when `content: true`), the core constraints block โ€” SKILL.md up to `<!-- CONSTRAINTS:END -->` โ€” is injected as the first element (id prefixed with `__info__`), ensuring the model always sees the essential rules. ```typescript import { info } from '@antv/chart-visualization-skills'; const skillInfo = info('g2'); // => { name: 'antv-g2-chart', description: '...', content: '...', constraintsContent: '...' } ``` ```typescript info(library?: string): SkillInfo | undefined interface SkillInfo { name: string; description: string; content: string; // Full SKILL.md body (after frontmatter) constraintsContent: string; // SKILL.md body up to <!-- CONSTRAINTS:END --> marker; injected by retrieve when includeInfo: true } ``` | Parameter | Type | Default | Description | | :--- | :--- | :--- | :--- | | `library` | `string` | `'g2'` | Library to get info for (`g2` or `g6`) | ## License MIT License - see the [LICENSE](LICENSE) file for details.

AI Tools Data Visualisation
339 Github Stars
X6
Open Source

X6

<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English | [็ฎ€ไฝ“ไธญๆ–‡](/README.zh-CN.md) <h1 align="center"> <b>X6: Graph Editing and Visualization Engine</b> </h1> <p align="center"><img alt="x6 flow" src="./flow.svg"></p> <p align="center"> <a href="https://www.npmjs.com/package/@antv/x6"><img alt="NPM Package" src="https://img.shields.io/npm/v/@antv/x6.svg?logo=npm&style=for-the-badge"></a> <a href="https://github.com/antvis/X6/actions/workflows/build.yml"><img alt="build" src="https://img.shields.io/github/actions/workflow/status/antvis/x6/build.yml?branch=master&style=for-the-badge&logo=github"></a> <a href="https://app.codecov.io/gh/antvis/X6"><img alt="coverage" src="https://img.shields.io/codecov/c/gh/antvis/x6?logo=codecov&style=for-the-badge&token=15CO54WYUV"></a> <img alt="Package size" src="https://img.badgesize.io/https://unpkg.com/@antv/x6?compression=gzip&style=for-the-badge" /> <a href="https://www.npmjs.com/package/@antv/x6"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/@antv/x6?logo=npm&style=for-the-badge"></a> <img src="https://img.shields.io/github/license/antvis/x6?style=for-the-badge" alt="MIT License"> <a href="https://www.typescriptlang.org"><img alt="Language" src="https://img.shields.io/badge/language-TypeScript-blue.svg?style=for-the-badge"></a> <a href="https://github.com/antvis/x6/pulls"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=for-the-badge"></a> <a href="https://x6.antv.antgroup.com"><img alt="website" src="https://img.shields.io/static/v1?label=&labelColor=505050&message=website&color=0076D6&style=for-the-badge&logo=google-chrome&logoColor=f5f5f5"></a> <a href="https://deepwiki.com/antvis/X6"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a> </p> <p align="center"> <a href="https://trendshift.io/repositories/4515" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4515" alt="antvis%2FX6 | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </p> <p align="center"> <a href="https://x6.antv.antgroup.com/tutorial/about">Official Documentation</a> โ€ข <a href="https://x6.antv.antgroup.com/tutorial/getting-started">Quick Start</a> โ€ข <a href="https://x6.antv.antgroup.com/examples">Graph Examples</a> โ€ข <a href="https://www.yuque.com/antv/x6/tox1ukbz5cw57qfy">FAQ</a> โ€ข <a href="https://codesandbox.io/s/mo-ban-55i8dp">Demo Template</a> โ€ข <a href="https://github.com/lloydzhou/awesome-x6">Awesome X6</a> </p> AntV `X6` is a graph editing engine based on HTML and SVG, providing low-cost customization capabilities and out-of-the-box built-in extensions that make it easy to quickly build applications such as DAG diagrams, ER diagrams, flowcharts, lineage graphs, and more. We hope developers can use X6 to rapidly build various graph editing applications they need, making process relationship data controllable, interactive, and visualized. ## โœจ Features As a professional graph editing and visualization engine, X6 has the following features: - ๐ŸŒฑ _Highly Customizable_: Supports customizing node styles and interactions using SVG / HTML / React / Vue / Angular, with a comprehensive `event system` that allows listening to any events occurring within the chart. - ๐Ÿš€ _Out-of-the-Box_: Built-in `10+` graph editing extensions, such as lasso selection, alignment lines, minimap, etc. - ๐Ÿงฒ _Data-Driven_: Based on the `MVC` architecture, allowing users to focus more on data logic and business logic. - ๐Ÿ’ฏ _Server-Side Rendering_: Supports server-side rendering with good browser compatibility. ## ๐Ÿ”จ Getting Started You can install via package managers like NPM or Yarn. ```bash # npm $ npm install @antv/x6 --save # yarn $ yarn add @antv/x6 ``` After successful installation, you can import the `Graph` object using import. ```html <div id="container" style="width: 600px; height: 400px"></div> ``` ```ts import { Graph } from '@antv/x6' const graph = new Graph({ container: document.getElementById('container'), grid: true, }) const source = graph.addNode({ x: 300, y: 40, width: 80, height: 40, label: 'Hello', }); const target = graph.addNode({ x: 420, y: 180, width: 80, height: 40, label: 'World', }); graph.addEdge({ source, target, }); ``` If everything goes smoothly, you will get a simple flowchart canvas as shown below. <img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*3rpsRLQl7dgAAAAAQyAAAAgAemJ7AQ/fmt.avif" height="300" /> ## ๐Ÿง‘๐Ÿปโ€๐Ÿ’ป Local Development ```shell # Install project dependencies and initialize build $ pnpm install # Start examples to view results pnpm run start:examples ``` ## ๐Ÿ“ฎ Contribution Thank you to everyone who has contributed to this project and all supporters! ๐Ÿ™ <a href="https://openomy.app/github/antvis/X6" target="_blank" style="display: block; width: 100%;" align="center"> <img src="https://openomy.app/svg?repo=antvis/X6&chart=bubble&latestMonth=12" target="_blank" alt="Contribution Leaderboard" style="display: block; height: 400px" /> </a> - **Issue Feedback**: If you encounter any issues with X6 during use, feel free to submit an Issue along with minimal reproducible code. - **Contribution Guide**: How to participate in the [development and contribution](./CONTRIBUTING.md) of X6. - **Discussion Ideas**: Discuss on GitHub Discussion or DingTalk group. ## ๐Ÿ“„ License [MIT](./LICENSE).

Diagramming & Flowcharts
6.6K Github Stars