Skip to content

Commit

Permalink
Merge pull request #2029 from VisActor/release/1.4.2
Browse files Browse the repository at this point in the history
[Auto release] release 1.4.2
  • Loading branch information
fangsmile committed Jul 3, 2024
2 parents 09f15d2 + 99e4c8a commit 7e6e3a2
Show file tree
Hide file tree
Showing 60 changed files with 2,488 additions and 1,091 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ $ rush change-all

3. Submit all code and create a Pull Request on Github, inviting others to review it.

### Promotion Task Contribution Guide
A promotion task refers to the action of publicly releasing materials related to VisActor, such as articles, demos, videos, etc., across various media channels.

You can create a new issue, select the type others and tag it with promotion. Then, post it along with relevant links, screenshots, summaries, etc.

For example, see https://github.com/VisActor/VChart/issues/2858.

Every quarter, we will select some promotional works for VisActor and provide the authors with material rewards.

## Embrace the VisActor Community

In addition to contributing code to VisActor, we encourage you to participate in other activities that will make the community more prosperous, such as:
Expand Down
13 changes: 12 additions & 1 deletion CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,18 @@ $ rush docs
$ rush change-all
```

3. 提交所有代码,并在 Github 创建 Pull Request,邀请其他人进行 review

4. 提交所有代码,并在 Github 创建 Pull Request,邀请其他人进行 review



### 推广任务贡献指南

推广任务是指你将和VisActor相关的文章、demo、视频 等素材,公开发布到各种媒体渠道的行为。
你可以新建一个 issue,类型选择 `others` 打上 `promotion` 的标签,然后将相关链接,截图,简介等一起发布即可。
例如:[https://github.com/VisActor/VChart/issues/2858](https://github.com/VisActor/VChart/issues/2858)

每个季度我们会评选一些推广VisActor的作品,给予作者一定的物质奖励。

## 拥抱 VisActor 社区

Expand Down
2 changes: 2 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.4.1","mainProject":"@visactor/vtable","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.4.2","mainProject":"@visactor/vtable","nextBump":"patch"}]
37 changes: 37 additions & 0 deletions docs/assets/changelog/en/important-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# v1.0.0

2024-05-21

**💥 Breaking change**

- **@visactor/vtable**: If the user has previously passed in rowTree and columnTree for the pivot table, under this usage, the result returned by the getCellOriginRecord interface changes from the previous object to an array structure, and if no default aggregation was previously performed, the SUM aggregation rule will be used for data calculation. If you want to cancel the numerical calculation rule, you can specify the aggregation rule as NONE for the indicator.

Configuration examples, you can also refer to [Tutorial](https://visactor.io/vtable/guide/data_analysis/pivot_table_dataAnalysis)
```
records:[{
region: '中南',
province: '广西',
year: '2016',
quarter: '2016-Q1',
sales: 'NULL',
profit: 1546
}],
dataConfig:{
aggregationRules: [
{
indicatorKey: 'sales',
field: 'sales',
aggregationType: VTable.TYPES.AggregationType.NONE,
}
]
}
```
**🆕 New feature**

- **@visactor/vtable**: rows and tree can combined use [#1644](https://github.com/VisActor/VTable/issues/1644)
- **@visactor/vtable**: add virtual option for rowTree and columnTree [#1644](https://github.com/VisActor/VTable/issues/1644)



[more detail about v1.0.0](https://github.com/VisActor/VTable/releases/tag/v1.0.0)
7 changes: 7 additions & 0 deletions docs/assets/changelog/menu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"menu": "changelog",
"children": [
{
"path": "important-release",
"title": {
"zh": "重大版本",
"en": "Important Release"
}
},
{
"path": "release",
"title": {
Expand Down
39 changes: 39 additions & 0 deletions docs/assets/changelog/zh/important-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

# v1.0.0

2024-05-21

**💥 Breaking change**

- **@visactor/vtable**: 透视表如果之前用户传入了rowTree和columnTree,在此用法下,getCellOriginRecord接口返回结果由之前对象变为数组结构,并且之前没有做默认聚合目前会使用SUM聚会规则进行数据计算,如果想取消数值计算规则可以为指标指定聚合规则为NONE。

配置示例,也可以参考[教程](https://visactor.io/vtable/guide/data_analysis/pivot_table_dataAnalysis)
```
records:[{
region: '中南',
province: '广西',
year: '2016',
quarter: '2016-Q1',
sales: 'NULL',
profit: 1546
}],
dataConfig:{
aggregationRules: [
{
indicatorKey: 'sales', //指标名称
field: 'sales', //指标依据字段
aggregationType: VTable.TYPES.AggregationType.NONE, //不做聚合 匹配到其中对应数据获取其对应field的值
}
]
}
```

**🆕 新增功能**

- **@visactor/vtable**: 自定义树形表头customTree可以和透视分析能力结合使用 [#1644](https://github.com/VisActor/VTable/issues/1644)
- **@visactor/vtable**: 在 rowTree & columnTree 中加入virtual option [#1644](https://github.com/VisActor/VTable/issues/1644)



[更多详情请查看 v1.0.0](https://github.com/VisActor/VTable/releases/tag/v1.0.0)
171 changes: 171 additions & 0 deletions docs/assets/demo/en/basic-functionality/pivot-table-corner-title.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
---
category: examples
group: Basic Features
title: Display dimension names in pivot table headers
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/pivot-table-corner-title.png
link: '../guide/table_type/Pivot_table/pivot_table_useage'
option: PivotTable#corner
---

# Display dimension names in pivot table headers

If you set the header title display content basis to `'all'`, the header cell content will be the concatenation of the row dimension name and the column dimension name.

titleOnDimension The corner title displays content based on:

- 'column' column dimension name as header cell content
- 'row' row dimension name as header cell content
- 'none' means the header cell content is empty
- 'all' means the header cell content is the concatenation of the row dimension name and the column dimension name

## Key Configurations

- `PivotTable`
- `columns`
- `rows`
- `indicators`
- `corner.titleOnDimension` Corner title display content based on

## Code Demo

```javascript livedemo template=vtable
let tableInstance;
fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_Pivot_Chart_data.json')
.then(res => res.json())
.then(data => {
const option = {
records: data,
rows: [
{
dimensionKey: 'Category',
title: 'Category',
headerStyle: {
textStick: true,
bgColor(arg) {
if (arg.dataValue === 'Row Totals') {
return '#ff9900';
}
return '#ECF1F5';
}
},
width: 'auto'
},
{
dimensionKey: 'Sub-Category',
title: 'Sub-Catogery',
headerStyle: {
textStick: true
},
width: 'auto'
}
],
columns: [
{
dimensionKey: 'Region',
title: 'Region',
headerStyle: {
textStick: true
},
width: 'auto'
},
{
dimensionKey: 'Segment',
title: 'Segment',
headerStyle: {
textStick: true
},
width: 'auto'
}
],
indicators: [
{
indicatorKey: 'Quantity',
title: 'Quantity',
width: 'auto',
sort: true,
headerStyle: {
fontWeight: 'normal'
},
style: {
padding: [16, 28, 16, 28],
color(args) {
if (args.dataValue >= 0) return 'black';
return 'red';
},
bgColor(arg) {
const rowHeaderPaths = arg.cellHeaderPaths.rowHeaderPaths;
if (rowHeaderPaths?.[1]?.value === 'Sub Totals') {
return '#ba54ba';
} else if (rowHeaderPaths?.[0]?.value === 'Row Totals') {
return '#ff9900';
}
return undefined;
}
}
},
{
indicatorKey: 'Sales',
title: 'Sales',
width: 'auto',
sort: true,
headerStyle: {
fontWeight: 'normal'
},
format: rec => {
return '$' + Number(rec).toFixed(2);
},
style: {
padding: [16, 28, 16, 28],
color(args) {
if (args.dataValue >= 0) return 'black';
return 'red';
},
bgColor(arg) {
const rowHeaderPaths = arg.cellHeaderPaths.rowHeaderPaths;
if (rowHeaderPaths?.[1]?.value === 'Sub Totals') {
return '#ba54ba';
} else if (rowHeaderPaths?.[0]?.value === 'Row Totals') {
return '#ff9900';
}
return undefined;
}
}
},
{
indicatorKey: 'Profit',
title: 'Profit',
width: 'auto',
showSort: false,
headerStyle: {
fontWeight: 'normal'
},
format: rec => {
return '$' + Number(rec).toFixed(2);
},
style: {
padding: [16, 28, 16, 28],
color(args) {
if (args.dataValue >= 0) return 'black';
return 'red';
},
bgColor(arg) {
const rowHeaderPaths = arg.cellHeaderPaths.rowHeaderPaths;
if (rowHeaderPaths?.[1]?.value === 'Sub Totals') {
return '#ba54ba';
} else if (rowHeaderPaths?.[0]?.value === 'Row Totals') {
return '#ff9900';
}
return undefined;
}
}
}
],
corner: {
titleOnDimension: 'all'
},
widthMode: 'standard'
};
tableInstance = new VTable.PivotTable(document.getElementById(CONTAINER_ID), option);
window['tableInstance'] = tableInstance;
});
```
Loading

0 comments on commit 7e6e3a2

Please sign in to comment.