-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: 完善 2.0 版本文档 * docs: 所有 demo 替换成 React 18 * docs: 增加多行文本 & 自定义行列头 的文档 * docs: 增加多行文本 demo * docs: 完善 G 插件和绘制 G2 图表文档和示例 * docs: 完善分析组件相关文档 * docs: 增加暗黑主题文档 * docs: 增加复制导出文档和示例 * docs: 完善基础类 API 文档 * docs: 完善组件 API 文档 * docs: 完善绘图属性文档 * docs: 完善 tooltip 示例 * docs: 更新贡献指南 * docs: 增加 wip 迁移指南 * docs: 修复 React Demo 无法运行 * docs: 修复所有无法允许的 React 和 自定义单元格 Demo * docs: 增加 目录 tag, 顶部公告, 首页新闻 * fix: 自定义排序错误 * feat(docs): 更新排序文档 * docs: 更新排序组件说明 * docs: 修复排序demo * chore: 解决冲突 * docs: 更新自定义单元格章节 * docs: 完善表形态相关文档, 剥离行列冻结 demo * docs: 更新 README 错误的图片和示例 * docs: 更新序号文档 * refactor: 细化 condition 类型 * docs: 更新 condition 文档 * docs: 更新所有 API 文档 * docs: 新增自定义数据集文档 * docs: 更新自定义 icon 文档 * docs: 更新对齐方式文档 * docs: 完善获取数据和交互的文档示例 * docs: 增加自定义数据集文档 * refactor: drawObjectText => drawCustomContent * refactor: 迁移 type util 位置 * refactor: 多行文本配置从 theme 移动端到 s2Option.style * feat: 完善交互文档和示例, 调整 selectedCellHighlight 默认值 * refactor: 重构复制导出 API & 默认开启 * build: 修复打包错误 * refactor: 重构 seriesNumber 配置,收敛到 seriesNumber 命名空间下 * docs: 更新 seriesNumber 文档 * test: 快照更新 * docs: 更新 performance 数据 * docs: layout 文档位置迁移 * docs: 完善表头, 自定义 icon 文档 & 修复在线体验打不开 * docs: 优化文档 * docs: 更新数据流程文档 * docs: 更新布局文档插图 * docs: 更改交互文档 demo 链接 * docs: 更新数据流和布局文档 * docs: 更新 faq * docs: 完善分析组件 & 行列宽高拖拽 & 迁移指南文档 * docs: 完善文档 * docs: 完善宽高拖拽文档 * docs: 修复导航栏样式错误 * docs: 更新组内排序文档 * docs: 更新数据流迁移文档 * docs: 更新版本发布时间说明 * docs: 修复无法运行和展示错误的示例 * docs: 修复文档示例错误和单测 * build: 修复打包错误 * build: 修复 size-limit 找不到 * docs: 更新冻结行头文档 --------- Co-authored-by: 沫君 <[email protected]> Co-authored-by: wjgogogo <[email protected]>
- Loading branch information
1 parent
ddc1283
commit 2df2032
Showing
575 changed files
with
14,798 additions
and
7,939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,35 +12,44 @@ A practical visualization library for tabular analysis. | |
<img src="https://img.shields.io/npm/dm/@antv/s2.svg" alt="npm"/> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@antv/s2" target="_blank"> | ||
<img alt="Version" src="https://img.shields.io/npm/v/@antv/s2/latest.svg" alt="version"> | ||
<img src="https://img.shields.io/npm/v/@antv/s2/latest.svg?logo=npm" alt="latest version"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@antv/s2" target="_blank"> | ||
<img alt="Version" src="https://img.shields.io/npm/v/@antv/s2/beta.svg" alt="version"> | ||
<img src="https://img.shields.io/npm/v/@antv/s2/next.svg?logo=npm" alt="next version"> | ||
</a> | ||
<a href="https://github.com/antvis/S2/actions/workflows/test.yml" target="_blank"> | ||
<img src="https://github.com/antvis/S2/actions/workflows/test.yml/badge.svg" alt="ci test status"/> | ||
</a> | ||
<a href="https://codecov.io/gh/antvis/S2" target="_blank"> | ||
<img src="https://codecov.io/gh/antvis/S2/branch/master/graph/badge.svg" alt="Coverage"/> | ||
<img src="https://codecov.io/gh/antvis/S2/branch/next/graph/badge.svg" alt="test coverage"/> | ||
</a> | ||
<a href="https://github.com/antvis/S2/releases" target="_blank"> | ||
<img src="https://img.shields.io/github/release-date/antvis/S2" alt="release-date"/> | ||
<img src="https://img.shields.io/github/release-date/antvis/S2" alt="release date"/> | ||
</a> | ||
</p> | ||
|
||
<p> | ||
<a href="https://www.npmjs.com/package/@antv/s2" target="_blank"> | ||
<img alt="npm bundle size" src="https://img.badgesize.io/https:/unpkg.com/@antv/s2@latest/dist/index.min.js?label=gzip%20size&compression=gzip" alt="bundle size"/> | ||
<img src="https://img.badgesize.io/https:/unpkg.com/@antv/s2@next/dist/index.min.js?label=gzip%20size&compression=gzip" alt="npm bundle size" /> | ||
</a> | ||
<a href="https://github.com/antvis/S2/discussions" target="_blank"> | ||
<img src="https://img.shields.io/badge/discussions-on%20github-blue" alt="Discussions"/> | ||
<img src="https://img.shields.io/badge/discussions-on%20github-blue" alt="GitHub discussions"/> | ||
</a> | ||
<a href="https://github.com/actions-cool/issues-helper" target="_blank"> | ||
<img src="https://img.shields.io/badge/using-issues--helper-blueviolet" alt="issues-helper"/> | ||
<img src="https://img.shields.io/badge/using-issues--helper-blueviolet" alt="issues helper"/> | ||
</a> | ||
<a href="https://github.com/antvis/S2/blob/master/LICENSE" target="_blank" target="_blank"> | ||
<img alt="License: MIT@AntV" src="https://img.shields.io/badge/[email protected]" alt="license"/> | ||
<a href="https://github.com/antvis/S2/blob/next/LICENSE" target="_blank"> | ||
<img src="https://img.shields.io/badge/[email protected]" alt="License: MIT@AntV" /> | ||
</a> | ||
<a href="https://github.com/antvis/S2/graphs/contributors" target="_blank"> | ||
<img src="https://img.shields.io/github/contributors/antvis/S2" alt="contributors"/> | ||
<a/> | ||
<a href="https://github.com/antvis/S2/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed" > | ||
<img src="https://img.shields.io/github/issues-closed/antvis/S2" alt="issues closed"/> | ||
<a/> | ||
<a href="https://github.com/antvis/S2/pulls" target="_blank"> | ||
<img src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg" alt="pr welcome"/> | ||
<a/> | ||
</p> | ||
|
||
</div> | ||
|
@@ -68,9 +77,9 @@ demo components and expansion capabilities, it allows developers to use it quick | |
## 📦 Installation | ||
|
||
```bash | ||
$ npm install @antv/s2 --save | ||
# yarn add @antv/s2 --save | ||
# pnpm install @antv/s2 --save | ||
$ npm install @antv/s2@next --save | ||
# yarn add @antv/s2@next | ||
# pnpm add @antv/s2@next | ||
``` | ||
|
||
## 🔨 Getting Started | ||
|
@@ -137,6 +146,28 @@ const s2DataConfig = { | |
price: '1', | ||
}, | ||
], | ||
meta: [ | ||
{ | ||
field: 'price', | ||
name: '价格', | ||
}, | ||
{ | ||
field: 'province', | ||
name: '省份', | ||
}, | ||
{ | ||
field: 'city', | ||
name: '城市', | ||
}, | ||
{ | ||
field: 'type', | ||
name: '类别', | ||
}, | ||
{ | ||
field: 'sub_type', | ||
name: '子类别', | ||
}, | ||
], | ||
}; | ||
``` | ||
|
||
|
@@ -154,30 +185,42 @@ const s2Options = { | |
### 3. Component Rendering | ||
|
||
```html | ||
<div id="container"></div> | ||
<div id="container" /> | ||
``` | ||
|
||
```ts | ||
import { PivotSheet } from '@antv/s2'; | ||
|
||
const container = document.getElementById('container'); | ||
async function bootstrap() { | ||
const container = document.getElementById('container'); | ||
|
||
const s2 = new PivotSheet(container, s2DataConfig, s2Options); | ||
|
||
const s2 = new PivotSheet(container, s2DataCfg, s2Options); | ||
await s2.render(); | ||
} | ||
|
||
s2.render(); | ||
bootstrap() | ||
``` | ||
|
||
### 4. Preview | ||
|
||
![result](https://gw.alipayobjects.com/zos/antfincdn/vCukbtVNvl/616f7ef1-e626-4225-99f8-dc8f6ca630dd.png) | ||
![result](https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*aTPcT4aKOq4AAAAAAAAAAAAADmJ7AQ/original) | ||
|
||
### 📦 Packages | ||
|
||
| Package | Latest | Beta | Alpha | Next | Size | Download | | ||
| - | - | - | - | - | - | - | | ||
| [@antv/s2](https://github.com/antvis/S2/tree/master/packages/s2-core) | ![latest](https://img.shields.io/npm/v/@antv/s2/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2/next.svg) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2.svg) | | ||
| [@antv/s2-react](https://github.com/antvis/S2/tree/master/packages/s2-react) | ![latest](https://img.shields.io/npm/v/@antv/s2-react/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2-react/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2-react/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2-react/next.svg)| ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-react@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-react.svg) | | ||
| [@antv/s2-vue](https://github.com/antvis/S2/tree/master/packages/s2-vue) | ![latest](https://img.shields.io/npm/v/@antv/s2-vue/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2-vue/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2-vue/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2-vue/next.svg) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-vue@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-vue.svg) | | ||
| [@antv/s2](https://github.com/antvis/S2/tree/next/packages/s2-core) | ![latest](https://img.shields.io/npm/v/@antv/s2/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2/next.svg) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2.svg) | | ||
| [@antv/s2-react](https://github.com/antvis/S2/tree/next/packages/s2-react) | ![latest](https://img.shields.io/npm/v/@antv/s2-react/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2-react/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2-react/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2-react/next.svg)| ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-react@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-react.svg) | | ||
| [@antv/s2-vue](https://github.com/antvis/S2/tree/next/packages/s2-vue) | ![latest](https://img.shields.io/npm/v/@antv/s2-vue/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2-vue/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2-vue/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2-vue/next.svg) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-vue@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-vue.svg) | | ||
|
||
### 🖥️ Browser Compatibility | ||
|
||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari | | ||
| --- | --- | --- | --- | | ||
| Edge | last 2 versions | last 2 versions | last 2 versions | | ||
|
||
`@antv/s2-react` and `@antv/s2-vue` see [React JavaScript environment requirements](https://zh-hans.reactjs.org/docs/javascript-environment-requirements.html) 和 [Vite browser compatibility](https://cn.vitejs.dev/guide/build.html#browser-compatibility) | ||
|
||
## 👤 Author | ||
|
||
|
Oops, something went wrong.