Skip to content

Commit

Permalink
Merge pull request #1509 from VisActor/release/0.20.10
Browse files Browse the repository at this point in the history
[Auto release] release 0.20.10
  • Loading branch information
neuqzxy authored Oct 23, 2024
2 parents 7279e29 + b008ce1 commit 4531e5d
Show file tree
Hide file tree
Showing 46 changed files with 823 additions and 356 deletions.
26 changes: 13 additions & 13 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":"vrenderMain","version":"0.20.9","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.20.10","nextBump":"patch"}]
26 changes: 26 additions & 0 deletions docs/assets/changelog/en/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# v0.20.9

2024-10-15


**🆕 New feature**

- **@visactor/vrender-components**: support axis label `firstVisible` in autoHide and linear axis sampling
- **@visactor/vrender-components**: add `interactInvertType` for smartInvert
- **@visactor/vrender-core**: text support keep-all, closed [#1466](https://github.com/VisActor/VRender/issues/1466)

**🐛 Bug fix**

- **@visactor/vrender-components**: fix smartInvert when `outsideEnable` is true
- **@visactor/vrender-components**: fix max width of arc label in left
- **@visactor/vrender-components**: fix `pager.space` of discrete legend
- **@visactor/vrender-components**: fix smart invert when only has intercet width base mark
- **@visactor/vrender-components**: fix `legend.item.label.space` when has value
- **@visactor/vrender-components**: legend scroll critical value leads last page not render. fix@VisActor/VChart[#3172](https://github.com/VisActor/VRender/issues/3172)
- **@visactor/vrender-kits**: fix max width of arc label in left
- **@visactor/vrender-core**: fix max width of arc label in left



[more detail about v0.20.9](https://github.com/VisActor/VRender/releases/tag/v0.20.9)

# v0.20.8

2024-09-30
Expand Down
26 changes: 26 additions & 0 deletions docs/assets/changelog/zh/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# v0.20.9

2024-10-15


**🆕 新增功能**

- **@visactor/vrender-components**: support axis label `firstVisible` in autoHide and linear axis sampling
- **@visactor/vrender-components**: add `interactInvertType` for smartInvert
- **@visactor/vrender-core**: text support keep-all, closed [#1466](https://github.com/VisActor/VRender/issues/1466)

**🐛 功能修复**

- **@visactor/vrender-components**: fix smartInvert when `outsideEnable` is true
- **@visactor/vrender-components**: fix max width of arc label in left
- **@visactor/vrender-components**: fix `pager.space` of discrete legend
- **@visactor/vrender-components**: fix smart invert when only has intercet width base mark
- **@visactor/vrender-components**: fix `legend.item.label.space` when has value
- **@visactor/vrender-components**: legend scroll critical value leads last page not render. fix@VisActor/VChart[#3172](https://github.com/VisActor/VRender/issues/3172)
- **@visactor/vrender-kits**: fix max width of arc label in left
- **@visactor/vrender-core**: fix max width of arc label in left



[更多详情请查看 v0.20.9](https://github.com/VisActor/VRender/releases/tag/v0.20.9)

# v0.20.8

2024-09-30
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@visactor/vchart": "1.3.0",
"@visactor/vutils": "~0.18.17",
"@visactor/vgrammar": "~0.5.7",
"@visactor/vrender": "workspace:0.20.9",
"@visactor/vrender": "workspace:0.20.10",
"markdown-it": "^13.0.0",
"highlight.js": "^11.8.0",
"axios": "^1.4.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender-utils/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender-utils",
"entries": [
{
"version": "0.20.10",
"tag": "@visactor/react-vrender-utils_v0.20.10",
"date": "Wed, 23 Oct 2024 08:37:33 GMT",
"comments": {}
},
{
"version": "0.20.9",
"tag": "@visactor/react-vrender-utils_v0.20.9",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender-utils

This log was last generated on Tue, 15 Oct 2024 03:50:15 GMT and should not be manually modified.
This log was last generated on Wed, 23 Oct 2024 08:37:33 GMT and should not be manually modified.

## 0.20.10
Wed, 23 Oct 2024 08:37:33 GMT

_Version update only_

## 0.20.9
Tue, 15 Oct 2024 03:50:15 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/react-vrender-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender-utils",
"version": "0.20.9",
"version": "0.20.10",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.20.9",
"@visactor/react-vrender": "workspace:0.20.9",
"@visactor/vrender": "workspace:0.20.10",
"@visactor/react-vrender": "workspace:0.20.10",
"@visactor/vutils": "~0.18.17",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender",
"entries": [
{
"version": "0.20.10",
"tag": "@visactor/react-vrender_v0.20.10",
"date": "Wed, 23 Oct 2024 08:37:33 GMT",
"comments": {}
},
{
"version": "0.20.9",
"tag": "@visactor/react-vrender_v0.20.9",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender

This log was last generated on Tue, 15 Oct 2024 03:50:15 GMT and should not be manually modified.
This log was last generated on Wed, 23 Oct 2024 08:37:33 GMT and should not be manually modified.

## 0.20.10
Wed, 23 Oct 2024 08:37:33 GMT

_Version update only_

## 0.20.9
Tue, 15 Oct 2024 03:50:15 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/react-vrender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender",
"version": "0.20.9",
"version": "0.20.10",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.20.9",
"@visactor/vrender": "workspace:0.20.10",
"@visactor/vutils": "~0.18.17",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
6 changes: 6 additions & 0 deletions packages/vrender-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/vrender-components",
"entries": [
{
"version": "0.20.10",
"tag": "@visactor/vrender-components_v0.20.10",
"date": "Wed, 23 Oct 2024 08:37:33 GMT",
"comments": {}
},
{
"version": "0.20.9",
"tag": "@visactor/vrender-components_v0.20.9",
Expand Down
7 changes: 6 additions & 1 deletion packages/vrender-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/vrender-components

This log was last generated on Tue, 15 Oct 2024 03:50:15 GMT and should not be manually modified.
This log was last generated on Wed, 23 Oct 2024 08:37:33 GMT and should not be manually modified.

## 0.20.10
Wed, 23 Oct 2024 08:37:33 GMT

_Version update only_

## 0.20.9
Tue, 15 Oct 2024 03:50:15 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/vrender-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vrender-components",
"version": "0.20.9",
"version": "0.20.10",
"description": "components library for dp visualization",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -26,8 +26,8 @@
"dependencies": {
"@visactor/vutils": "~0.18.17",
"@visactor/vscale": "~0.18.17",
"@visactor/vrender-core": "workspace:0.20.9",
"@visactor/vrender-kits": "workspace:0.20.9"
"@visactor/vrender-core": "workspace:0.20.10",
"@visactor/vrender-kits": "workspace:0.20.10"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
14 changes: 8 additions & 6 deletions packages/vrender-components/src/axis/overlap/auto-hide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,21 @@ export function autoHide(labels: IText[], config: HideConfig) {
do {
items = reduce(items, sep);
} while (items.length >= 3 && hasOverlap(items, sep));
/**
* 0.17.10 之前,当最后label个数小于3 的时候,才做最后的label强制显示的策略
*/

const shouldCheck = (length: number, visibility: boolean) => length < 3 || visibility;
const shouldCheck = (length: number, visibility: boolean, checkLength: boolean = true) => {
return checkLength ? length < 3 || visibility : visibility;
};

const checkFirst = shouldCheck(items.length, config.firstVisible);
const checkFirst = shouldCheck(items.length, config.firstVisible, false);
/**
* 0.17.10 之前,当最后 label 个数小于 3 的时候,才做最后的label强制显示的策略
*/
let checkLast = shouldCheck(items.length, config.lastVisible);

const firstSourceItem = source[0];
const lastSourceItem = last(source);

if (intersect(firstSourceItem, lastSourceItem, sep)) {
if (intersect(firstSourceItem, lastSourceItem, sep) && checkFirst && checkLast) {
lastSourceItem.setAttribute('opacity', 0); // Or firstSourceItem, depending on preference
checkLast = false;
}
Expand Down
8 changes: 3 additions & 5 deletions packages/vrender-components/src/axis/tick-data/continuous.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,11 @@ export const continuousTicks = (scale: ContinuousScale, op: ITickDataOpt): ITick
items = samplingMethod(items, labelGap);
}

const shouldCheck = (length: number, visibility: boolean) => length < 3 || visibility;

const checkFirst = shouldCheck(items.length, op.labelFirstVisible);
let checkLast = shouldCheck(items.length, op.labelLastVisible);
const checkFirst = op.labelFirstVisible;
let checkLast = op.labelLastVisible; // 这里和 auto-hide 里的逻辑有差异,不根据 length 自动强制显示最后一个(会引起 vtable 较多 badcase)。

if (intersect(firstSourceItem as any, lastSourceItem as any, labelGap)) {
if (items.includes(lastSourceItem) && items.length > 1) {
if (items.includes(lastSourceItem) && items.length > 1 && checkFirst && checkLast) {
items.splice(items.indexOf(lastSourceItem), 1);
checkLast = false;
}
Expand Down
Loading

0 comments on commit 4531e5d

Please sign in to comment.