[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-70682":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":37,"readmeContent":38,"aiSummary":39,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":40,"discoverSource":41},70682,"G2","antvis\u002FG2","antvis","📊 The concise and progressive visualization grammar.","https:\u002F\u002Fg2.antv.antgroup.com",null,"TypeScript",12555,1665,243,173,0,2,3,9,6,76.07,"MIT License",false,"v5",true,[27,28,29,30,31,32,33,34,35,36],"animation","canvas","chart","grammar","graphics","hacktoberfest","interaction","svg","visualization","webgl","2026-06-12 04:00:56","\u003Cimg src=\"https:\u002F\u002Fgw.alipayobjects.com\u002Fzos\u002Fantfincdn\u002FR8sN%24GNdh6\u002Flanguage.svg\" width=\"18\"> English | [简体中文](.\u002FREADME.zh-CN.md)\n\n\u003Ch1 align=\"center\">\n\u003Cb>G2: The Concise and Progressive Visualization Grammar\u003C\u002Fb>\n\u003C\u002Fh1>\n\n\u003Cdiv align=\"center\">\n\nG2 is a visualization grammar for dashboard building, data exploration and storytelling.\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F4408\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F4408\" alt=\"antvis%2FG2 | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n[![Build Status](https:\u002F\u002Fgithub.com\u002Fantvis\u002FG2\u002Factions\u002Fworkflows\u002Fbuild.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fantvis\u002FG2\u002Factions\u002Fworkflows\u002Fbuild.yml)\n[![Coverage Status](https:\u002F\u002Fimg.shields.io\u002Fcoveralls\u002Fgithub\u002Fantvis\u002Fg2\u002Fv5.svg)](https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fantvis\u002Fg2?branch=v5)\n[![npm Version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@antv\u002Fg2.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@antv\u002Fg2)\n[![npm Download](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002F@antv\u002Fg2.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@antv\u002Fg2)\n[![npm License](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fl\u002F@antv\u002Fg2.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@antv\u002Fg2)\n[![Ask DeepWiki](https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg)](https:\u002F\u002Fdeepwiki.com\u002Fantvis\u002FG2)\n\n![examples](https:\u002F\u002Fmdn.alipayobjects.com\u002Fhuamei_qa8qxu\u002Fafts\u002Fimg\u002FA*_GfqQoRCqQkAAAAAAAAAAAAADmJ7AQ\u002Ffmt.webp)\n\n\u003C\u002Fdiv>\n\nG2 is named after Leland Wilkinson’s book _The Grammar of Graphics_ and was profoundly inspired by it in the very beginning. Here are some resources you can begin with:\n\n- [Introduction](https:\u002F\u002Fg2.antv.antgroup.com\u002Fmanual\u002Fintroduction\u002Fwhat-is-g2) - a brief overview and G2's motivations\n- [Examples](https:\u002F\u002Fg2.antv.antgroup.com\u002Fexamples) - a large number of demos to learn from and copy-paste\n- [Tutorials](https:\u002F\u002Fg2.antv.antgroup.com\u002Fmanual\u002Fquick-start) - interactive case-driven guides of G2's core concepts\n- [API Reference](https:\u002F\u002Fg2.antv.antgroup.com\u002Fapi\u002Foverview) - complete documentation for all visualization components\n\n\n## ✨ Features\n\n- **Progressive Usage** - The main objective of G2 is to help you get meaningful visualizations quickly with concise declarations and it infers the rest. But you can configure much more for complex and advanced situations.\n- **Declarative API** - We employs a functional declarative API to specify chart options in a programmatic fashion, which contributes to better logic reuse and more flexible code organization.\n- **High Extensibility** - To satisfy specific needs, G2 provides a convenient and consistent mechanism to extend everything you can imagine, whether a scale, a transform, a mark, etc,. You can even customize a brand new visualization tool based on this mechanism.\n- **Comprehensive Grammar** - G2 rejects a chart typology in favor of marks, transforms, scales, coordinates, and compositions. In addition to static visual representations, it's possible to declare data-driven animations and apply well-designed action-based interactions to plots as well.\n- **Powerful Renderer** - There is a powerful renderer [G](https:\u002F\u002Fgithub.com\u002Fantvis\u002FG) under G2 to generate web-based visualizations using Canvas, SVG or WebGL. The plenty of plugins it has benefit G2 from rendering charts with novel styles such as hand-drawn and fully embracing the ecosystem of [D3](https:\u002F\u002Fgithub.com\u002Fd3\u002Fd3).\n\n## 🔨 Getting Started\n\nG2 is usually installed via a package manager such as npm or Yarn.\n\n```bash\n$ npm install @antv\u002Fg2\n```\n\n```bash\n$ yarn add @antv\u002Fg2\n```\n\nThe Chart object then can be imported from G2.\n\n```html\n\u003Cdiv id=\"container\">\u003C\u002Fdiv>\n```\n\n```js\nimport { Chart } from '@antv\u002Fg2';\n\n\u002F\u002F A tabular data to be visualized.\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\u002F\u002F Instantiate a new chart.\nconst chart = new Chart({\n  container: 'container',\n});\n\n\u002F\u002F Specify visualization.\nchart\n  .interval() \u002F\u002F Create an interval mark and add it to the chart.\n  .data(data) \u002F\u002F Bind data for this mark.\n  .encode('x', 'genre') \u002F\u002F Assign genre column to x position channel.\n  .encode('y', 'sold') \u002F\u002F Assign sold column to y position channel.\n  .encode('color', 'genre'); \u002F\u002F Assign genre column to color channel.\n\n\u002F\u002F Render visualization.\nchart.render();\n```\n\nIf all goes well, you can get the following lovely bar chart!\n\n\u003Cimg src=\"https:\u002F\u002Fmdn.alipayobjects.com\u002Fhuamei_qa8qxu\u002Fafts\u002Fimg\u002FA*XqCnTbkpAkQAAAAAAAAAAAAADmJ7AQ\u002Ffmt.webp\" width=\"640\" alt=\"example\">\n\n## 🌍 Ecosystem\n\n- [g2-react](https:\u002F\u002Fgithub.com\u002Fpearmini\u002Fg2-react) - The lightweight React component for G2, without extra features.\n- [g2-extensions](https:\u002F\u002Fgithub.com\u002Fantvis\u002Fg2-extensions) - The one-stop shop for official G2 extensions, such as 3d visualization, automated visual analytics, etc.\n- [ant-design-charts](https:\u002F\u002Fgithub.com\u002Fant-design\u002Fant-design-charts) - The React chart library, based on [G2](https:\u002F\u002Fgithub.com\u002Fantvis\u002FG2), [G6](https:\u002F\u002Fgithub.com\u002Fantvis\u002FG6), [X6](https:\u002F\u002Fgithub.com\u002Fantvis\u002FX6), [L7Plot](https:\u002F\u002Fgithub.com\u002Fantvis\u002FL7Plot).\n- [More...](https:\u002F\u002Fgithub.com\u002Fantvis\u002FG2\u002Fdiscussions\u002F5772)\n\n## 📮 Contributing\n\nThis project exists thanks to all the people who contribute.\n\nAnd thank you to all our backers! 🙏\n\n\u003Ca href=\"https:\u002F\u002Fopenomy.app\u002Fgithub\u002Fantvis\u002FG2\" target=\"_blank\" style=\"display: block; width: 100%;\" align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fopenomy.app\u002Fsvg?repo=antvis\u002FG2&chart=bubble&latestMonth=3\" target=\"_blank\" alt=\"Contribution Leaderboard\" style=\"display: block; width: 100%;\" \u002F>\n \u003C\u002Fa>\n\n- [Issues](https:\u002F\u002Fgithub.com\u002Fantvis\u002Fg2\u002Fissues) - report bugs or request features\n- [Contributing Guide](https:\u002F\u002Fgithub.com\u002Fantvis\u002Fg2\u002Fblob\u002Fv5\u002FCONTRIBUTING.md) - help build G2\n- [Discussions](https:\u002F\u002Fgithub.com\u002Fantvis\u002FG2\u002Fdiscussions) - discuss on GitHub or in DingTalk group(30233731, 35686967, 44788198)\n\n\u003Cimg src=\"https:\u002F\u002Fgw.alipayobjects.com\u002Fzos\u002Fantfincdn\u002FhTzzaqgHgQ\u002FAntv%252520G2%252520%26%252520G2Plot.png\" width=\"200\" height=\"266\" alt=\"code\"\u002F>\n\n## 📑 Paper\n\nBairui Su, Zhiwei Wang, Zhifeng Lin, Xiaojuan Liao, Zihan Zhou, Minfeng Zhu, Wei Chen. [G2: A customizable web-based framework for authoring interactive visualizations](https:\u002F\u002Fwww.sciencedirect.com\u002Fscience\u002Farticle\u002Fpii\u002FS2468502X26000033). Visual Informatics, 2026.\n\n```\n@article{su2026g2,\n  author={Bairui Su, Zhiwei Wang, Zhifeng Lin, Xiaojuan Liao, Zihan Zhou, Minfeng Zhu, Wei Chen},\n  title={G2: A customizable web-based framework for authoring interactive visualizations},\n  journal={Visual Informatics},\n  year={2026},\n  url={https:\u002F\u002Fdoi.org\u002F10.1016\u002Fj.visinf.2026.100307}\n}\n```\n\n## 📄 License\n\nMIT@[AntV](https:\u002F\u002Fgithub.com\u002Fantvis).\n","G2 是一个用于构建仪表板、数据探索和故事讲述的可视化语法库。它采用声明式API，允许用户通过简洁的配置快速创建有意义的可视化效果，并支持更复杂的自定义设置。G2 的核心特性包括渐进式使用体验、高度可扩展性以及全面的图形语法，这使得它能够处理从简单到复杂的各种可视化需求。此外，G2 支持动画与交互功能，增强了用户体验。该工具非常适合需要灵活且强大的数据可视化解决方案的应用场景，如数据分析平台、业务监控系统等。","2026-06-11 03:33:36","high_star"]