{"_id":"@alantheknight/g6","_rev":"2-891df164e61094263c769b8ca9369a75","name":"@alantheknight/g6","dist-tags":{"latest":"5.0.480"},"versions":{"5.0.48":{"name":"@alantheknight/g6","version":"5.0.48","keywords":["antv","g6","graph","graph analysis","graph editor","graph visualization","relational data"],"author":{"name":"https://github.com/orgs/antvis/people"},"license":"MIT","_id":"@alantheknight/g6@5.0.48","maintainers":[{"name":"alantheknight","email":"alantheknight@yandex.com"}],"homepage":"https://g6.antv.antgroup.com/","bugs":{"url":"https://github.com/antvis/g6/issues"},"dist":{"shasum":"4f4486ec83b970e0c3fc25172d51fb93824657cc","tarball":"https://registry.npmjs.org/@alantheknight/g6/-/g6-5.0.48.tgz","fileCount":2056,"integrity":"sha512-Lb+IUTRS5hkG0FDrD0z0TjUqy57+3+Si398P9t2ShZUGrHpCPqNvy4OYqpTN0lb4jQtAB1KcRjuoP8j6faHPkw==","signatures":[{"sig":"MEUCIDpINAOewSFq1kXC+pbwRNF1B4g8VzS7sPT5U/NGUO6kAiEAxGjSMn+U0YEsDcY7SMvDyA8V6E/PShHNcaul6+/z4+k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7155606},"main":"lib/index.js","_from":"file:alantheknight-g6-5.0.48.tgz","types":"lib/index.d.ts","module":"esm/index.js","scripts":{"ci":"run-s lint type-check build","dev":"vite","fix":"eslint ./src ./__tests__ --fix && prettier ./src __tests__ --write ","tag":"node ./scripts/tag.mjs","jest":"node --expose-gc --max-old-space-size=1024 --unhandled-rejections=strict ../../node_modules/jest/bin/jest --coverage --logHeapUsage --detectOpenHandles","lint":"eslint ./src __tests__ --quiet && prettier ./src __tests__ --check","size":"limit-size","test":"jest","build":"run-p build:*","start":"rimraf ./lib && tsc --module commonjs --outDir lib --watch","readme":"cp ../../README.* ./","version":"node ./scripts/version.mjs","coverage":"jest --coverage","build:cjs":"rimraf ./lib && tsc --module commonjs --outDir lib -p tsconfig.build.json","build:esm":"rimraf ./esm && tsc --module ESNext --outDir esm -p tsconfig.build.json","build:umd":"rimraf ./dist && rollup -c && npm run size","test:unit":"npm run jest __tests__/unit","bundle-vis":"cross-env BUNDLE_VIS=1 npm run build:umd","type-check":"tsc --noEmit","coverage:open":"open coverage/lcov-report/index.html","build:dev:watch":"npm run build:esm -- --watch","test:integration":"npm run jest __tests__/integration"},"_npmUser":{"name":"alantheknight","actor":{"name":"alantheknight","type":"user","email":"alantheknight@yandex.com"},"email":"alantheknight@yandex.com"},"_resolved":"/private/var/folders/zx/49z4ktcx2gbfytk7gv342g6c0000gn/T/af4b4da93f337e55382fa1c5a8969572/alantheknight-g6-5.0.48.tgz","_integrity":"sha512-Lb+IUTRS5hkG0FDrD0z0TjUqy57+3+Si398P9t2ShZUGrHpCPqNvy4OYqpTN0lb4jQtAB1KcRjuoP8j6faHPkw==","limit-size":[{"gzip":true,"path":"dist/g6.min.js","limit":"330 Kb"},{"path":"dist/g6.min.js","limit":"1.1 Mb"}],"repository":{"url":"git+https://github.com/antvis/g6.git","type":"git"},"_npmVersion":"10.8.2","description":"A Graph Visualization Framework in JavaScript","directories":{},"_nodeVersion":"18.20.5","dependencies":{"@antv/g":"^6.1.24","@antv/util":"^3.3.10","@antv/layout":"1.2.14-beta.9","bubblesets-js":"^2.3.4","@antv/g-canvas":"^2.0.43","@antv/graphlib":"^2.0.4","@antv/algorithm":"^0.1.26","@antv/component":"^2.1.3","@antv/hierarchy":"^0.6.14","@antv/event-emitter":"^0.1.3","@antv/g-plugin-dragndrop":"^2.0.35"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"cross-env":"^7.0.3","@antv/g-svg":"^2.0.38","@antv/vendor":"^1.0.11","@antv/g-webgl":"^2.0.47","xmlserializer":"^0.6.1","@types/hull.js":"^1.0.4","@antv/layout-gpu":"^1.1.7","jest-canvas-mock":"^2.5.2","jest-random-mock":"^1.0.0","@antv/layout-wasm":"^1.4.2","@types/xmlserializer":"^0.6.6"},"_npmOperationalInternal":{"tmp":"tmp/g6_5.0.48_1750777669824_0.4390630550729966","host":"s3://npm-registry-packages-npm-production"}},"5.0.480":{"name":"@alantheknight/g6","version":"5.0.480","description":"A Graph Visualization Framework in JavaScript","keywords":["antv","g6","graph","graph analysis","graph editor","graph visualization","relational data"],"homepage":"https://g6.antv.antgroup.com/","bugs":{"url":"https://github.com/antvis/g6/issues"},"repository":{"type":"git","url":"git+https://github.com/antvis/g6.git"},"license":"MIT","author":{"name":"https://github.com/orgs/antvis/people"},"main":"lib/index.js","module":"esm/index.js","types":"lib/index.d.ts","dependencies":{"@antv/algorithm":"^0.1.26","@antv/component":"^2.1.3","@antv/event-emitter":"^0.1.3","@antv/g":"^6.1.24","@antv/g-canvas":"^2.0.43","@antv/g-plugin-dragndrop":"^2.0.35","@antv/graphlib":"^2.0.4","@antv/hierarchy":"^0.6.14","@antv/layout":"1.2.14-beta.9","@antv/util":"^3.3.10","bubblesets-js":"^2.3.4"},"devDependencies":{"@antv/g-svg":"^2.0.38","@antv/g-webgl":"^2.0.47","@antv/layout-gpu":"^1.1.7","@antv/layout-wasm":"^1.4.2","@antv/vendor":"^1.0.11","@types/hull.js":"^1.0.4","@types/xmlserializer":"^0.6.6","cross-env":"^7.0.3","jest-canvas-mock":"^2.5.2","jest-random-mock":"^1.0.0","xmlserializer":"^0.6.1"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"limit-size":[{"gzip":true,"limit":"330 Kb","path":"dist/g6.min.js"},{"limit":"1.1 Mb","path":"dist/g6.min.js"}],"scripts":{"build":"run-p build:*","build:cjs":"rimraf ./lib && tsc --module commonjs --outDir lib -p tsconfig.build.json","build:dev:watch":"npm run build:esm -- --watch","build:esm":"rimraf ./esm && tsc --module ESNext --outDir esm -p tsconfig.build.json","build:umd":"rimraf ./dist && rollup -c && npm run size","bundle-vis":"cross-env BUNDLE_VIS=1 npm run build:umd","ci":"run-s lint type-check build","coverage":"jest --coverage","coverage:open":"open coverage/lcov-report/index.html","dev":"vite","fix":"eslint ./src ./__tests__ --fix && prettier ./src __tests__ --write ","jest":"node --expose-gc --max-old-space-size=1024 --unhandled-rejections=strict ../../node_modules/jest/bin/jest --coverage --logHeapUsage --detectOpenHandles","lint":"eslint ./src __tests__ --quiet && prettier ./src __tests__ --check","readme":"cp ../../README.* ./","size":"limit-size","start":"rimraf ./lib && tsc --module commonjs --outDir lib --watch","tag":"node ./scripts/tag.mjs","test":"jest","test:integration":"npm run jest __tests__/integration","test:unit":"npm run jest __tests__/unit","type-check":"tsc --noEmit","version":"node ./scripts/version.mjs"},"_id":"@alantheknight/g6@5.0.480","_integrity":"sha512-iS7gC9maw41cWe2hxUx2mExHx4EhNeMhlNJVKYh/fUlkKiDjwxU7K7HEviKZZvzKjXFreMvugj2R3Sl9eXB24Q==","_resolved":"/private/var/folders/zx/49z4ktcx2gbfytk7gv342g6c0000gn/T/90fa1cc248d3b4848937d82ca2edad4b/alantheknight-g6-5.0.480.tgz","_from":"file:alantheknight-g6-5.0.480.tgz","_nodeVersion":"18.20.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-iS7gC9maw41cWe2hxUx2mExHx4EhNeMhlNJVKYh/fUlkKiDjwxU7K7HEviKZZvzKjXFreMvugj2R3Sl9eXB24Q==","shasum":"d145f6ca53d2d7b1768b304f8d55d81597db8d2f","tarball":"https://registry.npmjs.org/@alantheknight/g6/-/g6-5.0.480.tgz","fileCount":2056,"unpackedSize":7157094,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHJJ3GUTo34VW9X9MyhEurXEQeVumL3Dd5vBESk3HhMUAiEAkGPtsoSFBadUc+lu9HStu+5FNzoeKlu2BmYfl7kifno="}]},"_npmUser":{"name":"alantheknight","email":"alantheknight@yandex.com","actor":{"name":"alantheknight","email":"alantheknight@yandex.com","type":"user"}},"directories":{},"maintainers":[{"name":"alantheknight","email":"alantheknight@yandex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/g6_5.0.480_1750779322138_0.07678283431031274"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-24T15:07:49.757Z","modified":"2025-06-24T15:35:22.509Z","5.0.48":"2025-06-24T15:07:50.101Z","5.0.480":"2025-06-24T15:35:22.350Z"},"bugs":{"url":"https://github.com/antvis/g6/issues"},"author":{"name":"https://github.com/orgs/antvis/people"},"license":"MIT","homepage":"https://g6.antv.antgroup.com/","keywords":["antv","g6","graph","graph analysis","graph editor","graph visualization","relational data"],"repository":{"type":"git","url":"git+https://github.com/antvis/g6.git"},"description":"A Graph Visualization Framework in JavaScript","maintainers":[{"name":"alantheknight","email":"alantheknight@yandex.com"}],"readme":"<img src=\"https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg\" width=\"18\"> [English](./README.md) | 简体中文\n\n<h1 align=\"center\">\n<b>G6：图可视分析引擎</b>\n</h1>\n\n![](https://user-images.githubusercontent.com/6113694/45008751-ea465300-b036-11e8-8e2a-166cbb338ce2.png)\n\n[![npm Version](https://img.shields.io/npm/v/@antv/g6.svg)](https://www.npmjs.com/package/@antv/g6)\n[![Build Status](https://github.com/antvis/G6/actions/workflows/build.yml/badge.svg)](https://github.com/antvis/G6/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/antvis/G6/badge.svg)](https://coveralls.io/github/antvis/G6)\n[![npm Download](https://img.shields.io/npm/dm/@antv/g6.svg)](https://www.npmjs.com/package/@antv/g6)\n![typescript](https://img.shields.io/badge/language-typescript-blue.svg)\n[![npm License](https://img.shields.io/npm/l/@antv/g6.svg)](https://www.npmjs.com/package/@antv/g6)\n\n<p align=\"center\">\n  <a href=\"https://g6.antv.antgroup.com/manual/introduction\">简介</a> •\n  <a href=\"https://g6.antv.antgroup.com/examples\">图表示例</a> •\n  <a href=\"https://g6.antv.antgroup.com/manual/getting-started/quick-start\">快速开始</a> •\n  <a href=\"https://g6.antv.antgroup.com/api/graph/method\">API</a>\n</p>\n\n[G6](https://github.com/antvis/g6) 是一个图可视化引擎。它提供了图的绘制、布局、分析、交互、动画、主题、插件等图可视化和分析的基础能力。基于 G6，用户可以快速搭建自己的图可视化分析应用，让关系数据变得简单，透明，有意义。\n\n<img src='https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*_PJ5SZELwq0AAAAAAAAAAAAADmJ7AQ/original' width=550 alt='' />\n\n<img src='https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*zTjwQaXokeQAAAAAAAAAAABkARQnAQ' width=550 alt='' />\n\n<img src='https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*zau8QJcVpDQAAAAAAAAAAABkARQnAQ' height=200 alt='' /><img src='https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RIlETY_S6IoAAAAAAAAAAABkARQnAQ' height=200 alt='' />\n\n<img src='https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*cDzXR4jIWr8AAAAAAAAAAABkARQnAQ' height=150 alt='' /><img src='https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*HTasSJGC4koAAAAAAAAAAABkARQnAQ' height=150 alt='' />\n\n<img src=\"https://user-images.githubusercontent.com/6113694/44995293-02858600-afd5-11e8-840c-349e4730d63d.gif\" height=150 alt='' /><img src=\"https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*I9OdTbXJIi0AAAAAAAAAAABkARQnAQ\" height=150 alt='' /><img src=\"https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*xoufSYcjK2AAAAAAAAAAAABkARQnAQ\" height=150 alt='' />\n\n## ✨ 特性\n\nG6 作为一款专业的图可视化引擎，具有以下特性：\n\n- **丰富的元素**：内置丰富的节点、边、Combo UI 元素，样式配置丰富，支持数据回调，且具备有灵活扩展自定义元素的机制。\n- **可控的交互**：内置 10+ 交互行为，且提供丰富的各类事件，便于扩展自定义的交互行为。\n- **高性能布局**：内置 10+ 常用的图布局，部分基于 GPU、Rust 并行计算提升性能，支持自定义布局。\n- **便捷的组件**：优化内置组件功能及性能，且有灵活的扩展性，便于业务实现定制能力。\n- **多主题色板**：提供了亮色、暗色两套内置主题，在 AntV 新色板前提下，融入 20+ 常用社区色板。\n- **多环境渲染**：发挥 [G](https://github.com/antvis/g) 能力， 支持 Canvas、SVG 以及 WebGL，和 Node.js 服务端渲染；基于 WebGL 提供强大 3D 渲染和空间交互的插件包。\n- **React 体系**：利用 React 前端生态，支持 React 节点，大大丰富 G6 的节点呈现样式。\n\n## 🔨 开始使用\n\n可以通过 NPM 或 Yarn 等包管理器来安装。\n\n```bash\n$ npm install @antv/g6\n```\n\n成功安装之后，可以通过 import 导入 `Graph` 对象。\n\n```html\n<div id=\"container\"></div>\n```\n\n```js\nimport { Graph } from '@antv/g6';\n\n// 准备数据\nconst data = {\n  nodes: [\n    /* your nodes data */\n  ],\n  edges: [\n    /* your edges data */\n  ],\n};\n\n// 初始化图表实例\nconst graph = new Graph({\n  container: 'container',\n  data,\n  node: {\n    palette: {\n      type: 'group',\n      field: 'cluster',\n    },\n  },\n  layout: {\n    type: 'force',\n  },\n  behaviors: ['drag-canvas', 'drag-node'],\n});\n\n// 渲染图\ngraph.render();\n```\n\n一切顺利，你可以得到下面的力导图!\n\n<img src=\"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*ue4iTYurc6sAAAAAAAAAAAAADmJ7AQ/fmt.webp\" height=\"300\" />\n\n## 🌍 生态\n\n- **Ant Design Charts**： React 图表库，基于 G2、G6、X6、L7。\n- **Graphin**：基于 G6 的 React 简单封装，以及图可视化应用研发的 SDK。\n\n更多生态开源项目，欢迎 PR 收录进来。\n\n## 📮 贡献\n\n感谢所有为这个项目做出贡献的人，感谢所有支持者！🙏\n\n<a href=\"https://openomy.app/github/antvis/G6\" target=\"_blank\" style=\"display: block; width: 100%;\" align=\"center\">\n  <img src=\"https://openomy.app/svg?repo=antvis/G6&chart=bubble&latestMonth=3\" target=\"_blank\" alt=\"Contribution Leaderboard\" style=\"display: block; width: 100%;\" />\n </a>\n\n- **问题反馈**：使用过程遇到的 G6 的问题，欢迎提交 Issue，并附上可以复现问题的最小案例代码。\n- **贡献指南**：如何参与到 G6 的[开发和贡献](https://g6.antv.antgroup.com/manual/contribute)。\n- **想法讨论**：在 GitHub Discussion 上或者钉钉群里面讨论。\n\n<div>\n  <img src=\"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*CQoGSoFBzaUAAAAAAAAAAAAADmJ7AQ/fmt.webp\" height=\"256\" />\n</div>\n\n## 📄 License\n\n[MIT](./LICENSE).\n","readmeFilename":"README.zh-CN.md"}