Skip to content

Commit

Permalink
Merge pull request #1333 from VisActor/release/0.19.21
Browse files Browse the repository at this point in the history
[Auto release] release 0.19.21
  • Loading branch information
neuqzxy authored Aug 5, 2024
2 parents 2ded57a + c769dd3 commit 8ea9242
Show file tree
Hide file tree
Showing 30 changed files with 252 additions and 80 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.19.20","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.19.21","nextBump":"patch"}]
15 changes: 15 additions & 0 deletions docs/assets/changelog/en/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# v0.19.20

2024-08-01


**🆕 New feature**

- **@visactor/vrender-core**: support array cornerRadius, closed [#1322](https://github.com/VisActor/VRender/issues/1322)
- **@visactor/vrender-core**: support catmull-rom and catmull-rom-closed curve, closed [#1320](https://github.com/VisActor/VRender/issues/1320)
- **@visactor/vrender**: support array cornerRadius, closed [#1322](https://github.com/VisActor/VRender/issues/1322)



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

# v0.19.19

2024-07-25
Expand Down
15 changes: 15 additions & 0 deletions docs/assets/changelog/zh/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# v0.19.20

2024-08-01


**🆕 新增功能**

- **@visactor/vrender-core**: support array cornerRadius, closed [#1322](https://github.com/VisActor/VRender/issues/1322)
- **@visactor/vrender-core**: support catmull-rom and catmull-rom-closed curve, closed [#1320](https://github.com/VisActor/VRender/issues/1320)
- **@visactor/vrender**: support array cornerRadius, closed [#1322](https://github.com/VisActor/VRender/issues/1322)



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

# v0.19.19

2024-07-25
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.10",
"@visactor/vgrammar": "~0.5.7",
"@visactor/vrender": "workspace:0.19.20",
"@visactor/vrender": "workspace:0.19.21",
"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.19.21",
"tag": "@visactor/react-vrender-utils_v0.19.21",
"date": "Mon, 05 Aug 2024 01:39:45 GMT",
"comments": {}
},
{
"version": "0.19.20",
"tag": "@visactor/react-vrender-utils_v0.19.20",
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 Wed, 31 Jul 2024 09:48:37 GMT and should not be manually modified.
This log was last generated on Mon, 05 Aug 2024 01:39:45 GMT and should not be manually modified.

## 0.19.21
Mon, 05 Aug 2024 01:39:45 GMT

_Version update only_

## 0.19.20
Wed, 31 Jul 2024 09:48:37 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.19.20",
"version": "0.19.21",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.19.20",
"@visactor/react-vrender": "workspace:0.19.20",
"@visactor/vrender": "workspace:0.19.21",
"@visactor/react-vrender": "workspace:0.19.21",
"@visactor/vutils": "~0.18.10",
"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.19.21",
"tag": "@visactor/react-vrender_v0.19.21",
"date": "Mon, 05 Aug 2024 01:39:45 GMT",
"comments": {}
},
{
"version": "0.19.20",
"tag": "@visactor/react-vrender_v0.19.20",
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 Wed, 31 Jul 2024 09:48:37 GMT and should not be manually modified.
This log was last generated on Mon, 05 Aug 2024 01:39:45 GMT and should not be manually modified.

## 0.19.21
Mon, 05 Aug 2024 01:39:45 GMT

_Version update only_

## 0.19.20
Wed, 31 Jul 2024 09:48:37 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.19.20",
"version": "0.19.21",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:0.19.20",
"@visactor/vrender": "workspace:0.19.21",
"@visactor/vutils": "~0.18.10",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
12 changes: 12 additions & 0 deletions packages/vrender-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@visactor/vrender-components",
"entries": [
{
"version": "0.19.21",
"tag": "@visactor/vrender-components_v0.19.21",
"date": "Mon, 05 Aug 2024 01:39:45 GMT",
"comments": {
"none": [
{
"comment": "feat: label line support custom path. feat @VisActor/VChart#3000"
}
]
}
},
{
"version": "0.19.20",
"tag": "@visactor/vrender-components_v0.19.20",
Expand Down
9 changes: 8 additions & 1 deletion packages/vrender-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @visactor/vrender-components

This log was last generated on Wed, 31 Jul 2024 09:48:37 GMT and should not be manually modified.
This log was last generated on Mon, 05 Aug 2024 01:39:45 GMT and should not be manually modified.

## 0.19.21
Mon, 05 Aug 2024 01:39:45 GMT

### Updates

- feat: label line support custom path. feat @VisActor/VChart#3000

## 0.19.20
Wed, 31 Jul 2024 09:48:37 GMT
Expand Down
96 changes: 64 additions & 32 deletions packages/vrender-components/__tests__/browser/examples/label-arc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@visactor/vrender';
import { createGroup, Stage, createArc } from '@visactor/vrender';
import { createRenderer } from '../../util/render';
import { ArcLabel } from '../../../src';
import { IPointLike } from '@visactor/vutils';

const pieGenerator = () => {
const spec: any = {
Expand Down Expand Up @@ -1266,7 +1267,8 @@ function createContent(stage: Stage) {
baseMarkGroupName: pieSpec.name,
data: pieSpec.children.map((c, index) => {
return {
// // text: 'test122344556778891234550987665544'
text: 'xx'
// text: 'test122344556778891234550987665544',
// text: latestData[index] ? latestData[index]?.type : undefined
// // text: originData[index].id
// // fill: c.attribute.fill,
Expand All @@ -1276,30 +1278,30 @@ function createContent(stage: Stage) {
// // lineWidth: 0
// // ...latestData[index]

textType: 'rich',
text: [
// {
// text: `NO.${index}🐾`,
// fontSize: 15,
// textAlign: 'right',
// textDecoration: 'underline',
// stroke: '#0f51b5'
// }
// textType: 'rich',
// text: [
// // {
// // text: `NO.${index}🐾`,
// // fontSize: 15,
// // textAlign: 'right',
// // textDecoration: 'underline',
// // stroke: '#0f51b5'
// // }

{
text: 'Mapbox',
fontWeight: 'bold',
fontSize: 25,
fill: '#3f51b5'
},
// {
// text: 'Mapbox',
// fontWeight: 'bold',
// fontSize: 25,
// fill: '#3f51b5'
// },

{
text: '替代方案',
fontStyle: 'italic',
textDecoration: 'underline',
fill: '#3f51b5'
}
]
// {
// text: '替代方案',
// fontStyle: 'italic',
// textDecoration: 'underline',
// fill: '#3f51b5'
// }
// ]

// type: 'html',
// text: '<p>这是一个html字符串</p>'
Expand All @@ -1315,22 +1317,52 @@ function createContent(stage: Stage) {
},
width: 800,
height: 500,
position: 'inside',
position: 'outside',

// position: 'inside-outer',

// textStyle: {
// // angle: 0
// fontSize: 16
// },
// line: {
// line1MinLength: 30,
// smooth: true,
// style: {
// lineWidth: 2,
// stroke: 'red'
// }
// },
line: {
line1MinLength: 40,
line2MinLength: 60,
// smooth: true,
customShape: (text, attrs, path) => {
console.log('attrs', text, attrs, path);
let points = attrs.points as IPointLike[];
// 绘制带圆角的折线(暂时用小转折拟合)
const direction = points[points.length - 1].x - points[0].x > 0 ? -1 : 1;
path.moveTo(points[0].x, points[0].y);
for (let i = 1; i < points.length - 1; i++) {
const p1 = points[i - 1];
const p2 = points[i % points.length];
const p3 = points[(i + 1) % points.length];
const { x: x1, y: y1 } = p1;
const { x: x2, y: y2 } = p2;
const { x: x3, y: y3 } = p3;

const k1 = (y2 - y1) / (x2 - x1);
const k2 = (y3 - y2) / (x3 - x2);
const deltaX = 3;
const deltaY1 = k1 * deltaX;
const deltaY2 = k2 * deltaX;

path.lineTo(p2.x + direction * deltaX, p2.y + direction * deltaY1); // 到点p1的上方
path.lineTo(p2.x - direction * deltaX, p2.y - direction * deltaY2); // 绘制圆弧
// path.quadraticCurveTo(p2.x - deltaX, p2.y - deltaY1, p2.x + deltaX, p2.y + deltaY2)
// path.quadraticCurveTo(p2.x - deltaX, p2.y - deltaY1, p2.x + deltaX, p2.y + deltaY2, 2)
}

path.lineTo(points[points.length - 1].x, points[points.length - 1].y);
return path;
},
style: {
lineWidth: 1,
stroke: 'red'
}
},
layout: {
// align: 'edge'
tangentConstraint: false
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.19.20",
"version": "0.19.21",
"description": "components library for dp visualization",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"analysis-core": "cross-env DEBUG='Bundler*' bundle -f umd -a -i core.ts"
},
"dependencies": {
"@visactor/vrender-core": "workspace:0.19.20",
"@visactor/vrender-kits": "workspace:0.19.20",
"@visactor/vrender-core": "workspace:0.19.21",
"@visactor/vrender-kits": "workspace:0.19.21",
"@visactor/vutils": "~0.18.10",
"@visactor/vscale": "~0.18.9"
},
Expand Down
Loading

0 comments on commit 8ea9242

Please sign in to comment.