11 Star 25 Fork 11

antv-s2 / antv-s2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

简体中文 | English

S2

数据驱动的多维分析表格。

npm Version Version ci test status Coverage release-date

npm bundle size Discussions issues-helper License: MIT@AntV

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

🏠 官网

homepage

✨ 特性

  1. 多维交叉分析: 告别单一分析维度,全面拥抱任意维度的自由组合分析。
  2. 高性能:能支持全量百万数据下 <8s 渲染,也能通过局部下钻来实现秒级渲染。
  3. 高扩展性:支持任意的自定义扩展(包括但不局限于布局,样式,交互,数据 hook 流等)。
  4. 开箱即用:提供不同分析场景下开箱即用的 React, Vue3 版本表组件及配套分析组件,只需要简单的配置即可轻松实现复杂场景的表渲染。
  5. 可交互:支持丰富的交互形式(单选、圈选、行选、列选、冻结行头、宽高拖拽,自定义交互等)

📦 安装

$ npm install @antv/s2
# yarn add @antv/s2

🔨 使用

1. 数据准备

s2DataConfig
const s2DataConfig = {
  fields: {
    rows: ['province', 'city'],
    columns: ['type'],
    values: ['price'],
  },
  data: [
     {
      province: '浙江',
      city: '杭州',
      type: '',
      price: '1',
    },
    {
      province: '浙江',
      city: '杭州',
      type: '纸张',
      price: '2',
    },
    {
      province: '浙江',
      city: '舟山',
      type: '',
      price: '17',
    },
    {
      province: '浙江',
      city: '舟山',
      type: '纸张',
      price: '0.5',
    },
    {
      province: '吉林',
      city: '长春',
      type: '',
      price: '8',
    },
    {
      province: '吉林',
      city: '白山',
      type: '',
      price: '9',
    },
    {
      province: '吉林',
      city: '长春',
      type: ' 纸张',
      price: '3',
    },
    {
      province: '吉林',
      city: '白山',
      type: '纸张',
      price: '1',
    },
  ],
};

2. 配置项准备

const s2Options = {
  width: 600,
  height: 600,
}

3. 渲染

<div id="container"></div>
import { PivotSheet } from '@antv/s2';

const container = document.getElementById('container');

const s2 = new PivotSheet(container, s2DataConfig, s2Options);

s2.render();

4. 结果

result

📦 Packages

Package Latest Beta Alpha Size Download
@antv/s2 latest beta alpha size download
@antv/s2-react latest beta alpha size download
@antv/s2-vue latest beta alpha size download

👤 Author

@AntV

🤝 参与贡献

git clone git@github.com:antvis/S2.git

cd S2

# 安装依赖
yarn # 或者 yarn bootstrap

# 打包
yarn build

# 调试 s2-core
yarn core:start

# 调试 s2-react
yarn react:playground

# 调试 s2-vue
yarn vue:playground

# 单元测试
yarn test

# 代码风格和类型检测
yarn lint

# 本地启动官网
yarn site:bootstrap
yarn site:start

📧 联系我们

S2 S2

👬 Contributors

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

📄 License

MIT@AntV

The MIT License (MIT) Copyright (c) 2021 AntV Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

⚡️ Practical analytical Table rendering core lib. 展开 收起
TypeScript 等 5 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/antv-s2/antv-s2.git
git@gitee.com:antv-s2/antv-s2.git
antv-s2
antv-s2
antv-s2
master

搜索帮助