Skip to content

Commit

Permalink
Merge pull request #527 from VisActor/release/0.14.1
Browse files Browse the repository at this point in the history
[Auto release] release 0.14.1
  • Loading branch information
xile611 authored Sep 2, 2024
2 parents 90aa5da + a139429 commit 6846a80
Show file tree
Hide file tree
Showing 33 changed files with 545 additions and 305 deletions.
302 changes: 151 additions & 151 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

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":"vgrammarMain","version":"0.14.0","mainProject":"@visactor/vgrammar-core","nextBump":"minor"}]
[{"definitionName":"lockStepVersion","policyName":"vgrammarMain","version":"0.14.1","mainProject":"@visactor/vgrammar-core","nextBump":"patch"}]
28 changes: 14 additions & 14 deletions docs/dev-demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
"devDependencies": {
"@internal/eslint-config": "workspace:*",
"@internal/ts-config": "workspace:*",
"@visactor/vutils": "~0.18.14",
"@visactor/vgrammar": "workspace:0.14.0",
"@visactor/vgrammar-core": "workspace:0.14.0",
"@visactor/vgrammar-hierarchy": "workspace:0.14.0",
"@visactor/vgrammar-sankey": "workspace:0.14.0",
"@visactor/vgrammar-projection": "workspace:0.14.0",
"@visactor/vgrammar-wordcloud": "workspace:0.14.0",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.0",
"@visactor/vgrammar-plot": "workspace:0.14.0",
"@visactor/vrender-core": "0.20.0",
"@visactor/vrender-kits": "0.20.0",
"@visactor/vrender": "0.20.0",
"@visactor/vutils": "~0.18.15",
"@visactor/vgrammar": "workspace:0.14.1",
"@visactor/vgrammar-core": "workspace:0.14.1",
"@visactor/vgrammar-hierarchy": "workspace:0.14.1",
"@visactor/vgrammar-sankey": "workspace:0.14.1",
"@visactor/vgrammar-projection": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.1",
"@visactor/vgrammar-plot": "workspace:0.14.1",
"@visactor/vrender-core": "0.20.1",
"@visactor/vrender-kits": "0.20.1",
"@visactor/vrender": "0.20.1",
"d3-scale-chromatic": "^3.0.0",
"lodash": "4.17.21",
"typescript": "4.9.5",
"vite": "3.2.6",
"@visactor/vgrammar-util": "workspace:0.14.0",
"@visactor/vgrammar-coordinate": "workspace:0.14.0",
"@visactor/vgrammar-util": "workspace:0.14.1",
"@visactor/vgrammar-coordinate": "workspace:0.14.1",
"@vitejs/plugin-react": "3.1.0"
}
}
30 changes: 15 additions & 15 deletions docs/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
},
"dependencies": {
"@arco-design/web-react": "2.46.1",
"@visactor/vutils": "~0.18.14",
"@visactor/vgrammar": "workspace:0.14.0",
"@visactor/vgrammar-core": "workspace:0.14.0",
"@visactor/vgrammar-hierarchy": "workspace:0.14.0",
"@visactor/vgrammar-sankey": "workspace:0.14.0",
"@visactor/vgrammar-projection": "workspace:0.14.0",
"@visactor/vgrammar-wordcloud": "workspace:0.14.0",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.0",
"@visactor/vgrammar-plot": "workspace:0.14.0",
"@visactor/vgrammar-util": "workspace:0.14.0",
"@visactor/vgrammar-coordinate": "workspace:0.14.0",
"@visactor/vgrammar-venn": "workspace:0.14.0",
"@visactor/vrender-core": "0.20.0",
"@visactor/vrender-kits": "0.20.0",
"@visactor/vrender": "0.20.0",
"@visactor/vutils": "~0.18.15",
"@visactor/vgrammar": "workspace:0.14.1",
"@visactor/vgrammar-core": "workspace:0.14.1",
"@visactor/vgrammar-hierarchy": "workspace:0.14.1",
"@visactor/vgrammar-sankey": "workspace:0.14.1",
"@visactor/vgrammar-projection": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.1",
"@visactor/vgrammar-plot": "workspace:0.14.1",
"@visactor/vgrammar-util": "workspace:0.14.1",
"@visactor/vgrammar-coordinate": "workspace:0.14.1",
"@visactor/vgrammar-venn": "workspace:0.14.1",
"@visactor/vrender-core": "0.20.1",
"@visactor/vrender-kits": "0.20.1",
"@visactor/vrender": "0.20.1",
"markdown-it": "^13.0.0",
"highlight.js": "^11.8.0",
"axios": "^1.4.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/vgrammar-coordinate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vgrammar-coordinate",
"version": "0.14.0",
"version": "0.14.1",
"description": "Coordinates for VGrammar",
"keywords": [
"coordinate",
Expand Down Expand Up @@ -34,8 +34,8 @@
"test-check": "DEBUG=jest jest --forceExit --detectOpenHandles --silent false --verbose false --runInBand"
},
"dependencies": {
"@visactor/vutils": "~0.18.14",
"@visactor/vgrammar-util": "workspace:0.14.0"
"@visactor/vutils": "~0.18.15",
"@visactor/vgrammar-util": "workspace:0.14.1"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
24 changes: 24 additions & 0 deletions packages/vgrammar-core/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
{
"name": "@visactor/vgrammar-core",
"entries": [
{
"version": "0.14.1",
"tag": "@visactor/vgrammar-core_v0.14.1",
"date": "Mon, 02 Sep 2024 02:02:24 GMT",
"comments": {
"none": [
{
"comment": "feat: treemap transform supports custom valueField"
},
{
"comment": "feat: support inverse of sankey\n\n"
},
{
"comment": "fix: fix error of no animation when direction change\n\n"
},
{
"comment": "fix: fix warning about `willReadFrequently`\n\n"
},
{
"comment": "perf: optimize performance of label component"
}
]
}
},
{
"version": "0.14.0",
"tag": "@visactor/vgrammar-core_v0.14.0",
Expand Down
19 changes: 18 additions & 1 deletion packages/vgrammar-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# Change Log - @visactor/vgrammar-core

This log was last generated on Thu, 15 Aug 2024 08:29:53 GMT and should not be manually modified.
This log was last generated on Mon, 02 Sep 2024 02:02:24 GMT and should not be manually modified.

## 0.14.1
Mon, 02 Sep 2024 02:02:24 GMT

### Updates

- feat: treemap transform supports custom valueField
- feat: support inverse of sankey


- fix: fix error of no animation when direction change


- fix: fix warning about `willReadFrequently`


- perf: optimize performance of label component

## 0.14.0
Thu, 15 Aug 2024 08:29:53 GMT
Expand Down
18 changes: 9 additions & 9 deletions packages/vgrammar-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vgrammar-core",
"version": "0.14.0",
"version": "0.14.1",
"description": "VGrammar is a visual grammar library",
"keywords": [
"grammar",
Expand Down Expand Up @@ -35,14 +35,14 @@
"test-check": "DEBUG=jest jest --forceExit --detectOpenHandles --silent false --verbose false --runInBand"
},
"dependencies": {
"@visactor/vutils": "~0.18.14",
"@visactor/vdataset": "~0.18.14",
"@visactor/vgrammar-coordinate": "workspace:0.14.0",
"@visactor/vgrammar-util": "workspace:0.14.0",
"@visactor/vscale": "~0.18.14",
"@visactor/vrender-core": "0.20.0",
"@visactor/vrender-kits": "0.20.0",
"@visactor/vrender-components": "0.20.0"
"@visactor/vutils": "~0.18.15",
"@visactor/vdataset": "~0.18.15",
"@visactor/vgrammar-coordinate": "workspace:0.14.1",
"@visactor/vgrammar-util": "workspace:0.14.1",
"@visactor/vscale": "~0.18.15",
"@visactor/vrender-core": "0.20.1",
"@visactor/vrender-kits": "0.20.1",
"@visactor/vrender-components": "0.20.1"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
19 changes: 12 additions & 7 deletions packages/vgrammar-core/src/component/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export const generateLabelAttributes = (

const data: any[] = addition.data ?? [];
const themeDatum = currentTheme?.data?.[0] ?? {};

if (data && data.length > 0) {
data.forEach((d, index) => {
if (mark.elements[index]) {
Expand All @@ -80,6 +79,10 @@ export const generateLabelAttributes = (
}
});
} else {
const mergeAttributes = (attributes: any, themeDatum: any) => {
const { data: labelData, ...restAttribute } = attributes;
return { data: labelData, ...merge({}, themeDatum, restAttribute) };
};
// process by order of elements
mark.elements.forEach(element => {
const graphicItem = element.getGraphicItem();
Expand All @@ -89,23 +92,21 @@ export const generateLabelAttributes = (

datum.forEach((entry: any) => {
const attributes = invokeEncoder(encoder, entry, element, labelParameters);
data.push(merge({}, themeDatum, attributes));
data.push(mergeAttributes(attributes, themeDatum));
});
} else {
const attributes = invokeEncoder(encoder, element.getDatum(), element, labelParameters);
const datum = merge({}, themeDatum, attributes);
data.push(datum);
data.push(mergeAttributes(attributes, themeDatum));
}
}
});
}

const graphicItemName = mark.graphicItem?.name;
return merge(
const result = merge(
{},
currentTheme,
{
data,
baseMarkGroupName: graphicItemName,
// FIXME: hack
// 标签是对数据顺序有强要求的场景,因为顺序会影响标签躲避结果;而目前没有机制保证 vrender 图元顺序与数据顺序一致。
Expand All @@ -114,10 +115,14 @@ export const generateLabelAttributes = (
},
addition ?? {}
);
result.data = data ?? currentTheme.data;
return result;
})
.filter(label => !isNil(label));

return merge({}, labelTheme, { size: groupSize, dataLabels });
const result = merge({}, labelTheme, { size: groupSize });
result.dataLabels = dataLabels;
return result;
};

export class Label extends Component implements ILabel {
Expand Down
14 changes: 5 additions & 9 deletions packages/vgrammar-core/src/component/player.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { isArray, isString, merge, mixin } from '@visactor/vutils';
import type { IGraphic } from '@visactor/vrender-core';
import type {
ContinuousPlayerAttributes,
DiscretePlayerAttributes,
IDiscretePlayer
} from '@visactor/vrender-components';
import type { ContinuousPlayerAttributes, DiscretePlayerAttributes } from '@visactor/vrender-components';
// eslint-disable-next-line no-duplicate-imports
// eslint-disable-next-line no-duplicate-imports
import { ContinuousPlayer, DiscretePlayer } from '@visactor/vrender-components';
Expand Down Expand Up @@ -93,28 +89,28 @@ export class Player extends Component implements IPlayer {

play() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.play();
return this;
}

pause() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.pause();
return this;
}

backward() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.backward();
return this;
}

forward() {
// FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component
const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;
const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;
player.forward();
return this;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/vgrammar-core/src/view/View.ts
Original file line number Diff line number Diff line change
Expand Up @@ -923,13 +923,13 @@ export default class View extends EventEmitter implements IView {
diff.prev.length === 1 && diff.next.length === 1 && diff.prev[0].markType === diff.next[0].markType;
const enableMarkMorphConfig =
diff.prev.every(mark => mark.getMorphConfig().morph) && diff.next.every(mark => mark.getMorphConfig().morph);
if (matched && runningConfig.reuse) {
if ((runningConfig.morph && enableMarkMorphConfig) || runningConfig.morphAll) {
(this as any).addMorphMarks?.({ prev: diff.prev, next: diff.next });
} else if (matched && runningConfig.reuse) {
diff.next[0].reuse(diff.prev[0]);
diff.prev[0].detachAll();
diff.prev[0].clear();
this._cachedGrammars.unrecord(diff.prev[0]);
} else if ((runningConfig.morph && enableMarkMorphConfig) || runningConfig.morphAll) {
(this as any).addMorphMarks?.({ prev: diff.prev, next: diff.next });
}
});
}
Expand Down
18 changes: 9 additions & 9 deletions packages/vgrammar-full/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vgrammar-full",
"version": "0.14.0",
"version": "0.14.1",
"description": "full packages of vgrammar.",
"keywords": [
"visualization",
Expand Down Expand Up @@ -33,14 +33,14 @@
"test": ""
},
"dependencies": {
"@visactor/vgrammar-core": "workspace:0.14.0",
"@visactor/vgrammar-hierarchy": "workspace:0.14.0",
"@visactor/vgrammar-plot": "workspace:0.14.0",
"@visactor/vgrammar-projection": "workspace:0.14.0",
"@visactor/vgrammar-sankey": "workspace:0.14.0",
"@visactor/vgrammar-wordcloud": "workspace:0.14.0",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.0",
"@visactor/vgrammar-venn": "workspace:0.14.0"
"@visactor/vgrammar-core": "workspace:0.14.1",
"@visactor/vgrammar-hierarchy": "workspace:0.14.1",
"@visactor/vgrammar-plot": "workspace:0.14.1",
"@visactor/vgrammar-projection": "workspace:0.14.1",
"@visactor/vgrammar-sankey": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.1",
"@visactor/vgrammar-venn": "workspace:0.14.1"
},
"devDependencies": {
"d3-array": "1.x",
Expand Down
Loading

0 comments on commit 6846a80

Please sign in to comment.