{"name":"@antv/g2","version":"5.1.2","description":"the Grammar of Graphics in Javascript","license":"MIT","main":"lib/index.js","module":"esm/index.js","types":"lib/index.d.ts","exports":{".":{"types":"./lib/index.d.ts","import":"./esm/index.js","require":"./lib/index.js"}},"scripts":{"dev":"vite","dev:link":"cross-env LINK=1 vite","clean":"rimraf lib esm dist","lint-staged":"lint-staged","size":"limit-size","lint":"eslint ./src ./__tests__ && prettier ./src ./__tests__ --check ","fix":"eslint ./src ./__tests__ --fix && prettier ./src ./__tests__ --write ","test":"node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/ --coverage -i  --logHeapUsage","test:unit":"node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/unit/ --coverage -i  --logHeapUsage","test:integration":"node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/integration/ --coverage -i  --logHeapUsage","build:umd":"rimraf ./dist && rollup -c && npm run size","build:cjs":"rimraf ./lib && tsc --module commonjs --outDir lib","build:esm":"rimraf ./esm && tsc --module ESNext --outDir esm","build":"run-p build:*","bundle-vis":"cross-env BUNDLE_VIS=1 run-p build:umd","ci":"run-s lint test build","prepublishOnly":"npm run ci","prepare":"husky install","upload":"node scripts/upload/snapshot.js","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s"},"sideEffects":["./esm/index.js"],"keywords":["antv","g2","visualization","chart","grammar","graphics","interaction","animation"],"dependencies":{"@antv/coord":"^0.4.1","@antv/event-emitter":"^0.1.3","@antv/g":"^5.18.6","@antv/g-canvas":"^1.11.5","@antv/g-plugin-3d":"^1.9.14","@antv/g-plugin-dragndrop":"^1.8.3","@antv/gui":"^0.5.0","@antv/path-util":"^3.0.1","@antv/scale":"^0.4.7","@antv/util":"^3.3.2","d3-array":"^3.2.2","d3-dsv":"^3.0.1","d3-force":"^3.0.0","d3-format":"^3.1.0","d3-geo":"^3.0.1","d3-hierarchy":"^3.1.2","d3-path":"^3.1.0","d3-scale-chromatic":"^3.0.0","d3-shape":"^3.1.0","d3-voronoi":"^1.1.4","flru":"^1.0.2","fmin":"^0.0.2","pdfast":"^0.2.0"},"devDependencies":{"@antv/data-set":"^0.11.8","@antv/g-plugin-3d":"^1.9.5","@antv/g-plugin-control":"^1.9.5","@antv/g-plugin-rough-canvas-renderer":"^1.7.9","@antv/g-plugin-rough-svg-renderer":"^1.7.9","@antv/g-svg":"^1.10.7","@antv/g-webgl":"^1.9.8","@commitlint/cli":"^11.0.0","@commitlint/config-conventional":"^17.4.4","@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^15.2.1","@rollup/plugin-terser":"^0.4.3","@types/d3-array":"3.0.5","@types/d3-path":"^3.0.0","@types/d3-shape":"^3.0.2","@types/jest":"^26.0.20","@types/pixelmatch":"^5.2.4","@types/pngjs":"^6.0.1","@typescript-eslint/eslint-plugin":"^4.18.0","@typescript-eslint/parser":"^4.18.0","ali-oss":"^6.17.1","archiver":"^5.3.1","canvas":"2.11.0","conventional-changelog-cli":"^2.2.2","cross-env":"^7.0.3","d3-dsv":"^3.0.1","d3-fetch":"^3.0.1","d3-geo-projection":"^4.0.0","d3-hierarchy":"^3.1.2","d3-interpolate":"^3.0.1","d3-random":"^3.0.1","d3-regression":"^1.3.10","eslint":"^7.22.0","eslint-plugin-import":"^2.22.1","fecha":"^4.2.3","husky":"^7.0.0","jest":"^26.0.1","jsdom":"^19.0.0","limit-size":"^0.1.4","lint-staged":"^10.5.4","npm-run-all":"^4.1.5","pixelmatch":"5.3.0","pngjs":"^6.0.0","prettier":"^2.2.1","reflect-metadata":"^0.1.13","rimraf":"^3.0.2","rollup":"^2.39.0","rollup-plugin-polyfill-node":"^0.8.0","rollup-plugin-typescript2":"^0.35.0","rollup-plugin-visualizer":"^5.9.2","topojson":"^3.0.2","ts-jest":"^26.5.1","typescript":"^4.1.5","vite":"^3.1.0","xmlserializer":"^0.6.1"},"lint-staged":{"*.{ts,tsx}":["eslint --fix","prettier --write","git add"]},"limit-size":[{"path":"dist/g2.min.js","limit":"400 Kb","gzip":true},{"path":"dist/g2.min.js","limit":"1.5 Mb"}],"author":{"name":"AntV","url":"https://antv.vision/"},"repository":{"type":"git","url":"git+https://github.com/antvis/g2.git"},"bugs":{"url":"https://github.com/antvis/g2/issues"},"gitHead":"7618ceda843786e277f049bbaac7cb0e1833cb10","homepage":"https://github.com/antvis/g2#readme","_id":"@antv/g2@5.1.2","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-kXDDbJXHMfAIfvsfxbQFr7jqFfHdVgwl2vSkwPSyHvULsWRhXuiyFcCXgSKI/NHMHofIF7L2hIrrRs3VxmitrQ==","shasum":"7a9308dd7e8c9b22fed68bf830f84e46cc5b08e0","tarball":"http://registry-npm.ywwl.com/@antv/g2/download/@antv/g2-5.1.2.tgz","fileCount":2835,"unpackedSize":8249977,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFF4Kc2rgEKxPun4hGrhWgTBHNDAf+o7wiTs3qmd4TXQIgOJnHRKpmDOXMp9D/iVlq+Z1aqlbalEZGYAPSF+svXHw="}],"size":1646457,"noattachment":false,"key":"/@antv/g2/-/@antv/g2-5.1.2.tgz"},"_npmUser":{"name":"pearmini","email":"subairui@icloud.com"},"directories":{},"maintainers":[{"name":"lvisei","email":"yunji.me@outlook.com"},{"name":"yisi.wang","email":"aptx.wang@gmail.com"},{"name":"basketduck","email":"hiphone96@gmail.com"},{"name":"biupiubiupiu","email":"lcx.seima@gmail.com"},{"name":"flash1","email":"2523863783@qq.com"},{"name":"dreammy23","email":"caomengyuan2015@163.com"},{"name":"laixingui.lxg","email":"laixingui.lxg@alibaba-inc.com"},{"name":"zhangjunjie-loki","email":"zhangjunjie0730@163.com"},{"name":"rainy25ghz","email":"1748420480@qq.com"},{"name":"zeyuwang","email":"zywangx@gmail.com"},{"name":"yanxiong","email":"496845051@qq.com"},{"name":"susiwen8","email":"susiwen8@gmail.com"},{"name":"freestyle21","email":"675861708@qq.com"},{"name":"soundquiet","email":"fulingsun515@gmail.com"},{"name":"elaine.q.10","email":"yilin.qyl@antfin.com"},{"name":"sturuby","email":"xingya.shi@gmail.com"},{"name":"sakuya223","email":"360965398@qq.com"},{"name":"serializedowen","email":"wjh199455@gmail.com"},{"name":"xdzhao","email":"zhaoxiaodong@zju.edu.cn"},{"name":"yangzhanmei","email":"15809244435@163.com"},{"name":"wjgogogo","email":"906626481@qq.com"},{"name":"leungwensen","email":"leungwensen@gmail.com"},{"name":"dori","email":"418466938@qq.com"},{"name":"iaaron","email":"943720372@qq.com"},{"name":"yard","email":"zjwengyidong@outlook.com"},{"name":"simaq","email":"sima.zhang1990@gmail.com"},{"name":"dxq613","email":"dxq613@gmail.com"},{"name":"intchous","email":"h.a.p.p.y.y.x.d@163.com"},{"name":"susan_ann","email":"lisuwe_n@163.com"},{"name":"jinke.li","email":"jinke.li666@gmail.com"},{"name":"lzxue","email":"120635640@qq.com"},{"name":"army8735","email":"army8735@qq.com"},{"name":"atool","email":"i@hust.cc"},{"name":"baizn","email":"576375879@qq.com"},{"name":"dengfuping","email":"dengfuping_private@163.com"},{"name":"neoddish","email":"neoddish@outlook.com"},{"name":"jeffy2012","email":"yuanjiefeng@gmail.com"},{"name":"zqlu","email":"zqlu.cn@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"pomelo-nwu","email":"czynwu@gmail.com"},{"name":"kopiluwaky","email":"yanyanwang93@gmail.com"},{"name":"ccnuzindex","email":"ccnuzindex@gmail.com"},{"name":"panyuqi","email":"pyqiverson@gmail.com"},{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},{"name":"zengyue","email":"yezengyue@gmail.com"},{"name":"kasmine","email":"736929286@qq.com"},{"name":"boyu.zlj","email":"boyu.zlj@antfin.com"},{"name":"l1ud0ngq1","email":"lliudongqi@gmail.com"},{"name":"newbyvector","email":"vectorse@126.com"},{"name":"winniexing","email":"wanyingxing@gmail.com"},{"name":"chenluli","email":"chenluuli@gmail.com"},{"name":"kn9117","email":"1175863618@qq.com"},{"name":"xdddst","email":"deng25st@163.com"},{"name":"semious2020","email":"semious@163.com"},{"name":"esora","email":"tygyh2012@gmail.com"},{"name":"nadia_liu","email":"1803275951@qq.com"},{"name":"bbsqq","email":"1491812683@qq.com"},{"name":"mxz96102","email":"mxz96102@qq.com"},{"name":"openwayne","email":"openwayne@gmail.com"},{"name":"pearmini","email":"subairui@icloud.com"},{"name":"pddpd","email":"pddpengdi@gmail.com"},{"name":"yiqianyao","email":"2912401452@qq.com"},{"name":"zhanba","email":"c5e1856@gmail.com"},{"name":"cxxxxxn","email":"christy05.chen@gmail.com"},{"name":"siqishen","email":"sersishen@gmail.com"},{"name":"boyyangzai","email":"2365539910@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/g2_5.1.2_1694574919255_0.5576700506913401"},"_hasShrinkwrap":false,"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>G2 5.0</b>\n</h1>\n\n<div align=\"center\">\n\n简洁的渐进式可视化语法，用于构建仪表盘、数据探索以及数据讲故事。\n\n<p align=\"center\">\n  <a href=\"https://g2.antv.antgroup.com/manual/introduction/what-is-g2\">介绍</a> •\n  <a href=\"https://g2.antv.antgroup.com/examples\">案例</a> •\n  <a href=\"https://g2.antv.antgroup.com/manual/introduction/getting-started\">教程</a> •\n  <a href=\"https://g2.antv.antgroup.com/api/overview\">API</a>\n</p>\n\n[![Build Status](https://github.com/antvis/g2/workflows/build/badge.svg?branch=v5)](https://github.com/antvis//actions)\n[![Coverage Status](https://img.shields.io/coveralls/github/antvis/g2/v5.svg)](https://coveralls.io/github/antvis/g2?branch=v5)\n[![npm Version](https://img.shields.io/npm/v/@antv/g2.svg)](https://www.npmjs.com/package/@antv/g2)\n[![npm Download](https://img.shields.io/npm/dm/@antv/g2.svg)](https://www.npmjs.com/package/@antv/g2)\n[![npm License](https://img.shields.io/npm/l/@antv/g2.svg)](https://www.npmjs.com/package/@antv/g2)\n\n![examples](https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*_GfqQoRCqQkAAAAAAAAAAAAADmJ7AQ/fmt.webp)\n\n</div>\n\nG2 起源于 Leland Wilkinson 的图形语法：《The Grammar of Graphics》，但又不止于图形语法。\n\n## ✨ 特色\n\n- **渐进式语法**：结合工业和学术实践，实现图形语法、动画语法和交互语法。\n- **丰富的标记**：内置 10+ 基础标记，8+ 高阶标记。\n- **高可扩展性**：提供统一机制扩展所有可视化组件。\n- **个性化风格**：支持手绘、圆角、纹理等风格。\n- **多环境渲染**：支持 Canvas、SVG 以及 WebGL，和 Node.js 服务端渲染。\n\n## 🔨 开始使用\n\n可以通过 NPM 或 Yarn 等包管理器来安装。\n\n```bash\n$ npm install @antv/g2\n```\n\n```bash\n$ yarn add @antv/g2\n```\n\n成功安装之后，可以通过 import 导入 Chart 对象。\n\n```html\n<div id=\"container\"></div>\n```\n\n```js\nimport { Chart } from '@antv/g2';\n\n// 准备数据\nconst data = [\n  { genre: 'Sports', sold: 275 },\n  { genre: 'Strategy', sold: 115 },\n  { genre: 'Action', sold: 120 },\n  { genre: 'Shooter', sold: 350 },\n  { genre: 'Other', sold: 150 },\n];\n\n// 初始化图表实例\nconst chart = new Chart({\n  container: 'container',\n});\n\n// 声明可视化\nchart\n  .interval()                 // 创建一个 Interval 标记\n  .data(data)                 // 绑定数据\n  .encode('x', 'genre')       // 编码 x 通道\n  .encode('y', 'sold')        // 编码 y 通道\n  .encode('color', 'genre');  // 编码 color 通道\n\n// 渲染可视化\nchart.render();\n```\n\n如果一切顺利，你可以得到下面的柱状图!\n\n<img src=\"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*XqCnTbkpAkQAAAAAAAAAAAAADmJ7AQ/fmt.webp\" width=\"640\" alt=\"example\">\n\n## 🌍 生态\n\n- [g2-react](https://github.com/pearmini/g2-react) - G2 的轻量级 React 组件，没有额外特性。\n- [g2-extensions](https://github.com/antvis/g2-extensions) - G2 的一系列插件库，包含 3D 和智能可视化等。\n- [ant-design-charts](https://github.com/ant-design/ant-design-charts) - React 图表库，基于 [G2](https://github.com/antvis/G2), [G6](https://github.com/antvis/G6), [X6](https://github.com/antvis/X6), [L7Plot](https://github.com/antvis/L7Plot).\n- [更多...](https://github.com/antvis/G2/discussions/5772)\n\n## 📮 参与贡献\n\n- [问题](https://github.com/antvis/g2/issues)： 报告 bug 或者提出需求\n- [贡献指南](https://github.com/antvis/g2/blob/v5/CONTRIBUTING.zh-CN.md)：参与建设 G2\n- [讨论](https://github.com/antvis/G2/discussions)：在 GitHub 上或者钉钉群里面讨论（30233731, 35686967, 44788198）\n\n<img src=\"https://gw.alipayobjects.com/zos/antfincdn/hTzzaqgHgQ/Antv%252520G2%252520%26%252520G2Plot.png\" width=\"200\" height=\"266\" alt=\"code\"/>\n\n## 📄 许可证\n\nMIT@[AntV](https://github.com/antvis).\n","publish_time":1694574919694,"_cnpm_publish_time":1694574919694,"dist-tags":{"alpha":"5.3.4-alpha.0","beta":"5.3.6-beta.4","latest":"5.4.8","v3-latest":"3.5.19"}}