GitHub - antvis/S2: ⚡️ A practical visualization library for tabular analysis. (original) (raw)

language 简体中文 | English

S2

S2 是 AntV 在多维交叉分析表格领域的解决方案,完全基于数据驱动的方式。通过提供底层能力库,基础组件,业务场景组件以及自由扩展的能力,让开发者基于自身场景自由选择,既能开箱即用,又能自由发挥。

简介快速开始图表示例在线体验

homepage

✨ 特性

🔨 快速开始

可以通过 NPM、Yarn 或者 pnpm 等包管理器来安装。

npm install @antv/s2 --save

安装成功之后,准备一个用于渲染的 DOM 容器,然后通过 import 导入对应的 S2 API 对象。

import { PivotSheet } from '@antv/s2';

async function bootstrap() { const container = document.getElementById('container');

const s2DataConfig = await fetch('https://gw.alipayobjects.com/os/bmw-prod/2a5dbbc8-d0a7-4d02-b7c9-34f6ca63cff6.json') .then(r => r.json())

const s2 = new PivotSheet(container, s2DataConfig, { width: 600, height: 300, });

await s2.render(); }

bootstrap()

result

📦 版本

包名 稳定版 包大小 下载量
@antv/s2 latest size download
@antv/s2-react latest size download
@antv/s2-react-components latest size download
@antv/s2-vue(停止维护) latest size download

🖥️ 兼容环境

EdgeEdge FirefoxFirefox ChromeChrome SafariSafari
Edge last 2 versions last 2 versions last 2 versions

@antv/s2-react@antv/s2-vue 见官方 React JavaScript 环境要求Vite 浏览器兼容性

🙋‍♂️ 问题反馈

如果你遇到了问题,或者对 IssuesDiscussions 列表的问题感兴趣,可以直接认领并尝试修复,帮助 S2 变得更好,期待在 贡献者列表 里看见你的头像。

请严格按照模版 提交 Issue 或在 Discussions 提问,在这之前强烈建议阅读 《⚠️ 提 Issue 前必读》

🤝 参与贡献 & ⌨️ 本地开发

S2 非常需要你的共建,请阅读 贡献指南 后提交 PR.

👁️ 项目洞察

Alt

👬 贡献者们

https://github.com/antvis/s2/graphs/contributors

📄 License

MIT@AntV