From 9451823b46027603f472c51b5664eefae34fd7de Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Wed, 30 Jul 2025 20:41:30 +0800 Subject: [PATCH 1/7] feat: support compare sankey chart --- .../compare-sankey/compare-sankey-sub-data.ts | 61 ++++ .../compare-sankey-sub-nodes.ts | 17 + .../compare-sankey-transformer.ts | 17 + .../charts/compare-sankey/compare-sankey.ts | 343 ++++++++++++++++++ .../src/charts/compare-sankey/constants.ts | 0 .../src/charts/compare-sankey/index.ts | 2 + .../src/charts/compare-sankey/interface.ts | 34 ++ .../src/charts/compare-sankey/util.ts | 0 8 files changed, 474 insertions(+) create mode 100644 packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-data.ts create mode 100644 packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-nodes.ts create mode 100644 packages/vchart-extension/src/charts/compare-sankey/compare-sankey-transformer.ts create mode 100644 packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts create mode 100644 packages/vchart-extension/src/charts/compare-sankey/constants.ts create mode 100644 packages/vchart-extension/src/charts/compare-sankey/index.ts create mode 100644 packages/vchart-extension/src/charts/compare-sankey/interface.ts create mode 100644 packages/vchart-extension/src/charts/compare-sankey/util.ts diff --git a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-data.ts b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-data.ts new file mode 100644 index 0000000000..62afaa0d71 --- /dev/null +++ b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-data.ts @@ -0,0 +1,61 @@ +import type { DataView } from '@visactor/vdataset'; +import { field, isFunction } from '@visactor/vutils'; +import { computeNodeValues, computeHierarchicNodeLinks } from '@visactor/vlayouts/es/sankey/hierarchy'; +import type { SankeyNodeElement } from '@visactor/vlayouts/es/sankey/interface'; + +export interface ICompareSankeyLayoutOpt { + rawData: () => DataView; + nodeKey: string; + subNodeGap: number; +} + +export const compareSankeySubData = (data: Array, opt: ICompareSankeyLayoutOpt) => { + const viewData = data[0] as DataView; + if (!viewData.latestData?.length) { + return {}; + } + // 读取参数 + const rawDataTree = opt.rawData().latestData[0]; + const subNodeGap = opt.subNodeGap; + const keyFunc = isFunction(opt.nodeKey) ? opt.nodeKey : opt.nodeKey ? field(opt.nodeKey as string) : null; + + const subNodeMap: { [key: string]: any } = {}; + rawDataTree.subNode.forEach((sunGroup: any) => { + subNodeMap[sunGroup.type] = computeHierarchicNodeLinks(sunGroup.nodes, keyFunc); + computeNodeValues(subNodeMap[sunGroup.type].nodes); + }); + const subCount = Object.keys(subNodeMap).length; + + const subNodes: any[] = []; + viewData.latestData[0].nodes.forEach((n: SankeyNodeElement) => { + let path: (string | number)[] = []; + if (n.targetLinks.length) { + const link = n.targetLinks[0]; + path = [...link.parents]; + } + path.push(n.key); + // 根据path获取sub的节点 + // 当前已使用比例 + let currentY = n.y0; + const totalSize = n.y1 - n.y0 - (subCount - 1) * subNodeGap; + const totalValue = n.value; + rawDataTree.subNode.forEach((sunGroup: any) => { + const subNode = (subNodeMap[sunGroup.type].nodes as SankeyNodeElement[]).find(subN => subN.key === n.key); + if (!subNode) { + return; + } + const percent = subNode.value / totalValue; + subNode.x0 = n.x0; + subNode.x1 = n.x1; + subNode.y0 = currentY; + subNode.y1 = currentY + totalSize * percent; + // @ts-ignore + subNode.type = sunGroup.type; + // @ts-ignore + subNode.sourceNode = n; + currentY += totalSize * percent + subNodeGap; + subNodes.push(subNode); + }); + }); + return subNodeMap; +}; diff --git a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-nodes.ts b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-nodes.ts new file mode 100644 index 0000000000..bb826e39e0 --- /dev/null +++ b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-sub-nodes.ts @@ -0,0 +1,17 @@ +import type { DataView } from '@visactor/vdataset'; + +export const compareSankeySubNodes = (data: Array) => { + const viewData = data[0] as DataView; + if (!viewData.latestData) { + return []; + } + const subData = Object.keys(viewData.latestData); + if (!subData.length) { + return {}; + } + const subNodes: any[] = []; + subData.forEach(key => { + subNodes.push(...viewData.latestData[key].nodes); + }); + return [{ nodes: subNodes }]; +}; diff --git a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-transformer.ts b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-transformer.ts new file mode 100644 index 0000000000..c6d653d32f --- /dev/null +++ b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey-transformer.ts @@ -0,0 +1,17 @@ +import type { ICompareSankeyChartSpecBase } from './interface'; +import { SankeyChartSpecTransformer } from '@visactor/vchart'; + +export class CompareSankeyChartSpecTransformer extends SankeyChartSpecTransformer { + transformSpec(spec: ICompareSankeyChartSpecBase): void { + super.transformSpec(spec); + } + + _getDefaultSeriesSpec(spec: ICompareSankeyChartSpecBase) { + const seriesSpec = super._getDefaultSeriesSpec(spec); + (seriesSpec as ICompareSankeyChartSpecBase).subNodeGap = spec.subNodeGap; + (seriesSpec as ICompareSankeyChartSpecBase).compareNodeColor = spec.compareNodeColor; + (seriesSpec as ICompareSankeyChartSpecBase).compareLinkColor = spec.compareLinkColor; + (seriesSpec as ICompareSankeyChartSpecBase).activeLink = spec.activeLink; + return seriesSpec; + } +} diff --git a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts new file mode 100644 index 0000000000..4d098b4741 --- /dev/null +++ b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts @@ -0,0 +1,343 @@ +import { DEFAULT_DATA_KEY } from './../../../../vchart/src/constant/data'; +import type { SankeyLinkElement } from '@visactor/vlayouts/es/sankey'; +import type { ICompareSankeyChartSpecBase, ICompareSankeySeriesSpecBase } from './interface'; +import type { Datum, ILinkPathMarkSpec, IRectMarkSpec } from '@visactor/vchart'; +import { + VChart, + SankeyChart, + SankeySeries, + registerMarkFilterTransform, + registerDataSetInstanceTransform, + STATE_VALUE_ENUM, + AttributeLevel, + getDatumOfGraphic, + DEFAULT_DATA_INDEX +} from '@visactor/vchart'; +import { DataView } from '@visactor/vdataset'; +import { CompareSankeyChartSpecTransformer } from './compare-sankey-transformer'; +import { compareSankeySubNodes } from './compare-sankey-sub-nodes'; +import type { IGlyphMark, ILinkPathMark, IMarkGraphic } from '@visactor/vchart/src/mark/interface'; +import { compareSankeySubData } from './compare-sankey-sub-data'; + +export class CompareSankeyChart extends SankeyChart { + type = 'compareSankey'; + static type = 'compareSankey'; + + declare _spec: ICompareSankeyChartSpecBase; + + static readonly transformerConstructor = CompareSankeyChartSpecTransformer; + readonly transformerConstructor = CompareSankeyChartSpecTransformer; +} + +export class CompareSankeySeries extends SankeySeries { + protected _arrowData?: DataView; + + private _subData: DataView; + + private _activeLinkData: DataView; + private _activeLinkMark: ILinkPathMark; + + initData() { + super.initData(); + // 此时 viewData 已经初始化完成 + // 创建 第二层 viewDataActive + // + const { dataSet } = this._option; + + const compareSubData = new DataView(dataSet, { name: `compare-sankey-sub-data-${this.id}-data` }); + compareSubData.parse([this.getViewData()], { + type: 'dataview' + }); + this._subData = compareSubData; + + const compareNodeData = new DataView(dataSet, { name: `compare-sankey-node-${this.id}-data` }); + compareNodeData.parse([compareSubData], { + type: 'dataview' + }); + + // 注册对比布局函数,计算拆解 nodes 的信息 + registerDataSetInstanceTransform(this._dataSet, 'compareSankeySubData', compareSankeySubData); + compareSubData.transform({ + type: 'compareSankeySubData', + options: { + rawData: () => this.getRawData(), + valueField: this._valueField, + nodeKey: this._spec.nodeKey, + subNodeGap: this._spec.subNodeGap ?? 2 + } + }); + registerDataSetInstanceTransform(this._dataSet, 'compareSankeySubNodes', compareSankeySubNodes); + compareNodeData.transform({ + type: 'compareSankeySubNodes' + }); + this._nodesSeriesData.parse([compareNodeData], { + type: 'dataview' + }); + + // 激活时的linkData + this._activeLinkData = new DataView(dataSet, { name: `compare-sankey-link-${this.id}-data` }); + } + + initEvent() { + super.initEvent(); + this._activeLinkData?.target.addListener('change', this.activeLinkDataUpdate.bind(this)); + } + + initMark() { + super.initMark(); + + const linkMark = this._createMark( + { ...SankeySeries.mark.link, name: 'activeLink' }, + { + dataView: this._activeLinkData + } + ) as ILinkPathMark; + if (linkMark) { + this._activeLinkMark = linkMark; + } + } + compileData() { + super.compileData(); + this._activeLinkMark?.compileData(); + } + + _initLinkMarkStyle() { + super._initLinkMarkStyle(); + (this._activeLinkMark as IGlyphMark).setGlyphConfig({ + direction: this.direction + }); + + this.setMarkStyle( + this._activeLinkMark, + { + x0: (datum: Datum) => datum.x0, + x1: (datum: Datum) => datum.x1, + y0: (datum: Datum) => datum.y0, + y1: (datum: Datum) => datum.y1, + thickness: (datum: Datum) => datum.thickness + }, + STATE_VALUE_ENUM.STATE_NORMAL, + AttributeLevel.Series + ); + + this.setMarkStyle( + this._activeLinkMark, + { + fill: this._fillActiveLink + }, + STATE_VALUE_ENUM.STATE_NORMAL, + AttributeLevel.User_Mark + ); + } + + _initNodeMarkStyle() { + super._initNodeMarkStyle(); + if (this._spec.compareNodeColor) { + this.setMarkStyle( + this._nodeMark, + { + fill: this._fillCompareNode + }, + 'normal', + AttributeLevel.User_Mark + ); + } + } + + private activeLinkDataUpdate() { + this._activeLinkMark.getData().updateData(); + } + + protected _fillCompareNode = (datum: Datum) => { + if (this._spec.compareNodeColor?.[datum.type]) { + return this._spec.compareNodeColor[datum.type]; + } + return this._spec.node.style?.fill ?? this._fillByNode(datum); + }; + + protected _fillActiveLink = (datum: Datum) => { + if (this._spec.compareLinkColor?.[datum.type]) { + return this._spec.compareLinkColor[datum.type]; + } + return this._spec.link.style?.fill ?? this._fillByLink(datum); + }; + + protected _handleNodeRelatedClick(graphic: IMarkGraphic) { + const nodeDatum = getDatumOfGraphic(graphic) as Datum; + // 节点 + const allNodeElements = this._nodeMark.getGraphics(); + if (!allNodeElements || !allNodeElements.length) { + return; + } + // 边 + const allLinkElements = this._linkMark.getGraphics(); + if (!allLinkElements || !allLinkElements.length) { + return; + } + + // 原始 link 全部进入blur状态 + allLinkElements.forEach(el => { + el.removeState([STATE_VALUE_ENUM.STATE_SANKEY_EMPHASIS]); + }); + this._highLightElements(allLinkElements, []); + + const nodeDatums = allNodeElements.map(el => getDatumOfGraphic(el) as Datum); + const pickNodeDatums = nodeDatums.filter(d => d.key === nodeDatum.key); + // 层级型数据 + const highlightLinksData: any[] = []; + // 高亮节点key + const highlightNodeKeys: (string | number)[] = []; + + // 上游路径始终只选取第一个 + this._activeTargetLink( + nodeDatum, + pickNodeDatums, + allNodeElements, + allLinkElements, + highlightNodeKeys, + highlightLinksData + ); + this._activeSourceLink( + nodeDatum, + pickNodeDatums, + nodeDatums, + allNodeElements, + highlightNodeKeys, + highlightLinksData + ); + this._highLightElements(allNodeElements, highlightNodeKeys); + this._activeLinkData.parseNewData(highlightLinksData); + + this._needClear = true; + } + + private _activeTargetLink( + nodeDatum: Datum, + pickNodeDatums: Datum[], + allNodeElements: IMarkGraphic[], + allLinkElements: IMarkGraphic[], + highlightNodeKeys: (string | number)[], + highlightLinksData: any[] + ) { + this._handleClearEmpty(); + const sourceNode = nodeDatum.sourceNode; + // 上游路径始终只选取第一个 + const firstTarget = sourceNode.targetLinks[0]; + if (!firstTarget) { + return; + } + let percent = 0; + pickNodeDatums.forEach(n => { + const link = n.targetLinks.find((l: any) => l.key === firstTarget.key); + if (link) { + const p = link.value / firstTarget.value; + const key = firstTarget.key + '_' + n.type; + const activeLink = { + ...firstTarget, + // 起点重新分配 + y0: firstTarget.y0 - firstTarget.thickness / 2 + (percent + p / 2) * firstTarget.thickness, + y1: n.y0 + (p * firstTarget.thickness) / 2, + thickness: p * firstTarget.thickness, + key, + type: n.type, + [DEFAULT_DATA_INDEX]: highlightLinksData.length, + [DEFAULT_DATA_KEY]: key + }; + highlightLinksData.push(activeLink); + percent += p; + } + }); + + // 第一个 path 中上流路径上的 node 全部高亮 + highlightNodeKeys.push(...firstTarget.parents, nodeDatum.key); + const linkKeys: string[] = []; + // 找到对应的原始 link 也都高亮 + for (let i = 0; i < firstTarget.parents.length - 1; i++) { + linkKeys.push(firstTarget.parents[i] + '-' + firstTarget.parents[i + 1]); + } + this._highLightElements(allLinkElements, linkKeys); + } + + private _activeSourceLink( + nodeDatum: Datum, + pickNodeDatums: Datum[], + allNodeDatums: Datum[], + allNodeElements: IMarkGraphic[], + highlightNodeKeys: (string | number)[], + highlightLinksData: any[] + ) { + this._handleClearEmpty(); + const sourceNode = nodeDatum.sourceNode; + // 下游路径始需要全部处理 + const sourceLinks = sourceNode.sourceLinks; + if (!sourceLinks?.length) { + return; + } + + const highNodeKeys: any[] = []; + const sourceValueTemp: { [key: string]: number } = {}; + sourceLinks.forEach((sourceLink: SankeyLinkElement) => { + highlightNodeKeys.push(sourceLink.target); + pickNodeDatums.forEach((n, index) => { + sourceValueTemp[n.type] = sourceValueTemp[n.type] ?? 0; + const link = n.sourceLinks.find((l: SankeyLinkElement) => l.key === sourceLink.key); + if (link) { + const p = link.value / n.value; + const totalSize = n.y1 - n.y0; + const size = totalSize * p; + const key = sourceLink.key + '_' + n.type; + const activeLink = { + ...sourceLink, + // 起点重新分配 + y0: n.y0 + sourceValueTemp[n.type] * totalSize + size / 2, + thickness: size, + key, + type: n.type, + [DEFAULT_DATA_INDEX]: highlightLinksData.length, + [DEFAULT_DATA_KEY]: key + }; + // y1 分为第一个和在其他 + if (index === 0) { + // 与原始link的起点 + activeLink.y1 = sourceLink.y1 - sourceLink.thickness / 2 + size / 2; + } else { + // 与目标子 node 的 y0 对齐 + const targetNode = allNodeDatums.find(_n => _n.key === link.target && _n.type === n.type); + if (targetNode) { + activeLink.y1 = targetNode.y0 + size / 2; + } else { + // 错误的情况 + return; + } + } + highlightLinksData.push(activeLink); + sourceValueTemp[n.type] += p; + } + }); + }); + } + + protected _handleClearEmpty() { + super._handleClearEmpty(); + this._activeLinkData.parseNewData([]); + + // 同时需要清除 hover + const allNodeElements = this._nodeMark.getGraphics(); + if (!allNodeElements || !allNodeElements.length) { + return; + } + allNodeElements.forEach(el => { + el.removeState(STATE_VALUE_ENUM.STATE_HOVER); + }); + } +} + +export const registerCompareSankeyChart = (option?: { VChart?: typeof VChart }) => { + registerMarkFilterTransform(); + + const vchartConstructor = option?.VChart || VChart; + if (vchartConstructor) { + vchartConstructor.useChart([CompareSankeyChart]); + vchartConstructor.useSeries([CompareSankeySeries]); + } +}; diff --git a/packages/vchart-extension/src/charts/compare-sankey/constants.ts b/packages/vchart-extension/src/charts/compare-sankey/constants.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/vchart-extension/src/charts/compare-sankey/index.ts b/packages/vchart-extension/src/charts/compare-sankey/index.ts new file mode 100644 index 0000000000..c9ba9ddf83 --- /dev/null +++ b/packages/vchart-extension/src/charts/compare-sankey/index.ts @@ -0,0 +1,2 @@ +export * from './interface'; +export * from './compare-sankey'; diff --git a/packages/vchart-extension/src/charts/compare-sankey/interface.ts b/packages/vchart-extension/src/charts/compare-sankey/interface.ts new file mode 100644 index 0000000000..e8415ffc96 --- /dev/null +++ b/packages/vchart-extension/src/charts/compare-sankey/interface.ts @@ -0,0 +1,34 @@ +import type { ISankeyChartSpec, ISankeySeriesSpec, ILinkPathMarkSpec } from '@visactor/vchart'; + +export interface ICompareSankeySpec { + /** + * 子节点间距 + */ + subNodeGap?: number; + /** + * 对比节点颜色 + */ + compareNodeColor?: { [key: string]: string }; + /** + * 对比边点颜色 + */ + compareLinkColor?: { [key: string]: string }; + /** + * 对比边样式 + */ + activeLink?: { + style: ILinkPathMarkSpec; + }; +} + +export interface ICompareSankeySeriesSpecBase extends ISankeySeriesSpec, ICompareSankeySpec {} + +export interface ICompareSankeyChartSpecBase extends ISankeyChartSpec, ICompareSankeySpec {} + +export interface ICompareSankeySeriesSpec extends Omit { + type: 'compareSankey'; +} + +export interface ICompareSankeyChartSpec extends Omit { + type: 'compareSankey'; +} diff --git a/packages/vchart-extension/src/charts/compare-sankey/util.ts b/packages/vchart-extension/src/charts/compare-sankey/util.ts new file mode 100644 index 0000000000..e69de29bb2 From a275de0d8daa318d8e7db145c0a77ec846940fbd Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Wed, 30 Jul 2025 20:42:57 +0800 Subject: [PATCH 2/7] feat: support compare sankey chart --- common/config/rush/pnpm-lock.yaml | 214 +++++++++++--------- packages/vchart/package.json | 2 +- packages/vchart/src/chart/index.ts | 3 +- packages/vchart/src/series/sankey/sankey.ts | 28 +-- packages/vutils-extension/package.json | 4 +- 5 files changed, 133 insertions(+), 118 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 38641fb8d4..c8f4f01332 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -16,19 +16,19 @@ importers: '@types/markdown-it': ^13.0.0 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/openinula-vchart': workspace:2.0.4 - '@visactor/react-vchart': workspace:2.0.4 - '@visactor/vchart': workspace:2.0.4 - '@visactor/vchart-extension': workspace:2.0.4 + '@visactor/openinula-vchart': workspace:2.0.1 + '@visactor/react-vchart': workspace:2.0.1 + '@visactor/vchart': workspace:2.0.1 + '@visactor/vchart-extension': workspace:2.0.1 '@visactor/vchart-theme': ~1.6.6 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 1.0.13 - '@visactor/vrender-kits': 1.0.13 + '@visactor/vrender': 1.0.9 + '@visactor/vrender-kits': 1.0.9 '@visactor/vtable': 1.19.0-alpha.0 '@visactor/vtable-calendar': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 '@visactor/vtable-gantt': 1.19.0-alpha.0 - '@visactor/vutils': ~1.0.6 + '@visactor/vutils': ~1.0.9 '@vitejs/plugin-react': 3.1.0 axios: ^1.4.0 buble: ^0.20.0 @@ -59,13 +59,13 @@ importers: '@visactor/vchart-extension': link:../packages/vchart-extension '@visactor/vchart-theme': 1.6.9 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 1.0.13 - '@visactor/vrender-kits': 1.0.13 + '@visactor/vrender': 1.0.9 + '@visactor/vrender-kits': 1.0.9 '@visactor/vtable': 1.19.0-alpha.0 '@visactor/vtable-calendar': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 '@visactor/vtable-gantt': 1.19.0-alpha.0 - '@visactor/vutils': 1.0.6 + '@visactor/vutils': 1.0.9 axios: 1.9.0 buble: 0.20.0 highlight.js: 11.11.1 @@ -143,10 +143,10 @@ importers: '@types/node': '*' '@types/offscreencanvas': 2019.6.4 '@types/react-is': ^17.0.3 - '@visactor/vchart': workspace:2.0.4 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': ~1.0.6 + '@visactor/vchart': workspace:2.0.1 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': ~1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 eslint-config-prettier: 8.5.0 @@ -164,9 +164,9 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': 1.0.6 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': 1.0.9 react-is: 18.3.1 devDependencies: '@internal/bundler': link:../../tools/bundler @@ -206,11 +206,11 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 '@types/react-is': ^17.0.3 - '@visactor/vchart': workspace:2.0.4 - '@visactor/vchart-extension': workspace:2.0.4 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': ~1.0.6 + '@visactor/vchart': workspace:2.0.1 + '@visactor/vchart-extension': workspace:2.0.1 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': ~1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 eslint-config-prettier: 8.5.0 @@ -230,9 +230,9 @@ importers: dependencies: '@visactor/vchart': link:../vchart '@visactor/vchart-extension': link:../vchart-extension - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': 1.0.6 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': 1.0.9 react-is: 18.3.1 devDependencies: '@internal/bundler': link:../../tools/bundler @@ -289,8 +289,8 @@ importers: '@types/webpack-env': ^1.13.6 '@typescript-eslint/eslint-plugin': 5.30.0 '@typescript-eslint/parser': 5.30.0 - '@visactor/vchart': workspace:2.0.4 - '@visactor/vchart-extension': workspace:2.0.4 + '@visactor/vchart': workspace:2.0.1 + '@visactor/vchart-extension': workspace:2.0.1 '@vitejs/plugin-react': 3.1.0 babel-preset-taro: 3.3.17 eslint: ~8.18.0 @@ -369,15 +369,15 @@ importers: '@types/jest': ^26.0.0 '@types/node': '*' '@types/offscreencanvas': 2019.6.4 - '@visactor/vdataset': ~1.0.6 - '@visactor/vlayouts': ~1.0.6 - '@visactor/vrender-animate': 1.0.13 - '@visactor/vrender-components': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vscale': ~1.0.6 - '@visactor/vutils': ~1.0.6 - '@visactor/vutils-extension': workspace:2.0.4 + '@visactor/vdataset': ~1.0.9 + '@visactor/vlayouts': ~1.0.9 + '@visactor/vrender-animate': 1.0.9 + '@visactor/vrender-components': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vscale': ~1.0.9 + '@visactor/vutils': ~1.0.9 + '@visactor/vutils-extension': workspace:2.0.1 canvas: 2.11.2 cross-env: ^7.0.3 d3-array: ^1.2.4 @@ -411,14 +411,14 @@ importers: typescript: 4.9.5 vite: 3.2.6 dependencies: - '@visactor/vdataset': 1.0.6 - '@visactor/vlayouts': 1.0.6 - '@visactor/vrender-animate': 1.0.13 - '@visactor/vrender-components': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vscale': 1.0.6 - '@visactor/vutils': 1.0.6 + '@visactor/vdataset': 1.0.9 + '@visactor/vlayouts': 1.0.9 + '@visactor/vrender-animate': 1.0.9 + '@visactor/vrender-components': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vscale': 1.0.9 + '@visactor/vutils': 1.0.9 '@visactor/vutils-extension': link:../vutils-extension devDependencies: '@esbuild-plugins/node-globals-polyfill': 0.1.1 @@ -475,14 +475,14 @@ importers: '@types/offscreencanvas': 2019.6.4 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/vchart': workspace:2.0.4 - '@visactor/vdataset': ~1.0.6 - '@visactor/vlayouts': ~1.0.6 - '@visactor/vrender-animate': 1.0.13 - '@visactor/vrender-components': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': ~1.0.6 + '@visactor/vchart': workspace:2.0.1 + '@visactor/vdataset': ~1.0.9 + '@visactor/vlayouts': ~1.0.9 + '@visactor/vrender-animate': 1.0.9 + '@visactor/vrender-components': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': ~1.0.9 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 eslint: ~8.18.0 @@ -501,13 +501,13 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vdataset': 1.0.6 - '@visactor/vlayouts': 1.0.6 - '@visactor/vrender-animate': 1.0.13 - '@visactor/vrender-components': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': 1.0.6 + '@visactor/vdataset': 1.0.9 + '@visactor/vlayouts': 1.0.9 + '@visactor/vrender-animate': 1.0.9 + '@visactor/vrender-components': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': 1.0.9 devDependencies: '@internal/bundler': link:../../tools/bundler '@internal/eslint-config': link:../../share/eslint-config @@ -581,8 +581,8 @@ importers: '@types/jest': ^26.0.0 '@types/node': '*' '@types/offscreencanvas': 2019.6.4 - '@visactor/vdataset': ~1.0.6 - '@visactor/vutils': ~1.0.6 + '@visactor/vdataset': ~1.0.9 + '@visactor/vutils': ~1.0.9 eslint: ~8.18.0 husky: 7.0.4 jest: ^26.0.0 @@ -599,8 +599,8 @@ importers: typescript: 4.9.5 vite: 3.2.6 dependencies: - '@visactor/vdataset': 1.0.6 - '@visactor/vutils': 1.0.6 + '@visactor/vdataset': 1.0.9 + '@visactor/vutils': 1.0.9 devDependencies: '@internal/bundler': link:../../tools/bundler '@internal/eslint-config': link:../../share/eslint-config @@ -693,8 +693,8 @@ importers: '@rushstack/eslint-patch': ~1.1.4 '@types/node': '*' '@types/node-fetch': 2.6.4 - '@visactor/vchart': workspace:2.0.4 - '@visactor/vchart-extension': workspace:2.0.4 + '@visactor/vchart': workspace:2.0.1 + '@visactor/vchart-extension': workspace:2.0.1 cross-env: ^7.0.3 eslint: ~8.18.0 form-data: ~4.0.0 @@ -877,11 +877,11 @@ importers: '@types/node': '*' '@typescript-eslint/eslint-plugin': 5.30.0 '@typescript-eslint/parser': 5.30.0 - '@visactor/vchart': workspace:2.0.4 - '@visactor/vrender': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': ~1.0.6 + '@visactor/vchart': workspace:2.0.1 + '@visactor/vrender': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': ~1.0.9 cross-env: ^7.0.3 eslint: ~8.18.0 jest: ^26.0.0 @@ -893,10 +893,10 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../../packages/vchart - '@visactor/vrender': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 - '@visactor/vutils': 1.0.6 + '@visactor/vrender': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 + '@visactor/vutils': 1.0.9 devDependencies: '@internal/bundler': link:../bundler '@internal/eslint-config': link:../../share/eslint-config @@ -4827,13 +4827,13 @@ packages: topojson-client: 3.1.0 dev: false - /@visactor/vdataset/1.0.6: - resolution: {integrity: sha512-RhsC1JcrWGOOysBwGTHevn+VmOIDgaohFWNLkAAv4Qvd0Psdg8jH7VCP/Lp3HjV/vGBAg4ToL9ADfAjqT5SzcA==} + /@visactor/vdataset/1.0.9: + resolution: {integrity: sha512-8OJWm8rZ1ss46r7BgO7L7se0qb28Ygk1yd999tV5SsN7R06sgB08l6ZP8dbvAXlYW08FWLYXc5RmCTRVG8mL2Q==} dependencies: '@turf/flatten': 6.5.0 '@turf/helpers': 6.5.0 '@turf/rewind': 6.5.0 - '@visactor/vutils': 1.0.6 + '@visactor/vutils': 1.0.9 d3-dsv: 2.0.0 d3-geo: 1.12.1 d3-hexbin: 0.2.2 @@ -4849,13 +4849,13 @@ packages: topojson-client: 3.1.0 dev: false - /@visactor/vlayouts/1.0.6: - resolution: {integrity: sha512-0HUoNos83LjOSXuJWscerFF6I0teLYDvDW6FIrm5w/b/q9CXvfeujQNm4pRR4AJgbND/bsJy5FAkPG2ne/rdvg==} + /@visactor/vlayouts/1.0.9: + resolution: {integrity: sha512-85oR9zRfxidq2TCScSAfPWUYeqxIcH4LSKNQPKBmXc1f+nqw7SV3NKT/oiYfrqrbdNxF29jn06R2eaGlo3LaDg==} dependencies: '@turf/helpers': 6.5.0 '@turf/invariant': 6.5.0 - '@visactor/vscale': 1.0.6 - '@visactor/vutils': 1.0.6 + '@visactor/vscale': 1.0.9 + '@visactor/vutils': 1.0.9 eventemitter3: 4.0.7 dev: false @@ -4884,10 +4884,10 @@ packages: '@visactor/vutils': 1.0.4 dev: false - /@visactor/vrender-animate/1.0.13: - resolution: {integrity: sha512-UDCa/ZYHIATukkHHxYdVIPhPnNsWE/mBvRatnUGdTKoIW+gtWZkQ5SsjhSWLXWeZ5lzwXf5afjsg6Vc8Y7HqIg==} + /@visactor/vrender-animate/1.0.9: + resolution: {integrity: sha512-9gkzQuVx2SP5YmdHslRdZK3dH8q0sZRqEi7XlmB7fL++pvDuJy5EGWTIUXPvAL/67hLpQKJy/Oe3C+4RxPpQ1A==} dependencies: - '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-core': 1.0.9 '@visactor/vutils': 1.0.6 dev: false @@ -4901,12 +4901,12 @@ packages: '@visactor/vutils': 1.0.4 dev: false - /@visactor/vrender-components/1.0.13: - resolution: {integrity: sha512-lclrDROH1FRnPhT05NStch759MtllVhGj/59R9rqSbflSt7FKKJ4bMhvwi6Ugh2HBsHVo9HjYUFCiW1oGNFG9w==} + /@visactor/vrender-components/1.0.9: + resolution: {integrity: sha512-3NDFyKOlPjHICgrig14E1IrXXkLFQWOicX3jNH9/QqPjgRF4o6orp3ZeJs3Qy451qXTum4/2GUgsNq2sC8IHyg==} dependencies: - '@visactor/vrender-animate': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 + '@visactor/vrender-animate': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 '@visactor/vscale': 1.0.6 '@visactor/vutils': 1.0.6 dev: false @@ -4918,8 +4918,8 @@ packages: color-convert: 2.0.1 dev: false - /@visactor/vrender-core/1.0.13: - resolution: {integrity: sha512-YMEUc1zuleTgyUJoMovUFeb4HK0mEMEdvkH+n8/+oexcB+0KCIHXfM/wtOhnMoJ08HAOOXcB+gGMZRig7TrE1Q==} + /@visactor/vrender-core/1.0.9: + resolution: {integrity: sha512-r33hSBIPvbMJuLhJ8LLBlwkKLqwDg+nl2MRoQfyy4f4VrGg1yBmF576lbj7TCifLN8mtfhrWHZ+Hb0Q65Alghg==} dependencies: '@visactor/vutils': 1.0.6 color-convert: 2.0.1 @@ -4936,23 +4936,23 @@ packages: roughjs: 4.5.2 dev: false - /@visactor/vrender-kits/1.0.13: - resolution: {integrity: sha512-qvekmEb8s7oarV5TEXX9Soy71crpi/YkECnRy9ELds21BqHUGi1XLl21Bc50Lsss183c9Bry/bBChw/KjxA9qA==} + /@visactor/vrender-kits/1.0.9: + resolution: {integrity: sha512-X5CCWEJt4AcfIcbkdScKJjr7tRBCta7SrltsjeMH+RDmNEzPxNJhvxgzpxePAOaWmJVR8TEKgT3cyx3bOU+EHg==} dependencies: '@resvg/resvg-js': 2.4.1 - '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-core': 1.0.9 '@visactor/vutils': 1.0.6 gifuct-js: 2.1.2 lottie-web: 5.13.0 roughjs: 4.5.2 dev: false - /@visactor/vrender/1.0.13: - resolution: {integrity: sha512-K/Xo65h4lq1rBMkaXrWK9W2KPWsnaZeEt9I4RdZu1OuJ5jEVkpjiKkE+9BDhBYuz/BOx/mSnYxl2x6LXIqjg6w==} + /@visactor/vrender/1.0.9: + resolution: {integrity: sha512-3hYf4k3Tk1WmOsLb0Ll3MMFR6EOmZ5Lx+ElsAvOeZZFm/an17pArI7YyORAEyKG/ZIdaV0M1INHAxSXQUu5d0g==} dependencies: - '@visactor/vrender-animate': 1.0.13 - '@visactor/vrender-core': 1.0.13 - '@visactor/vrender-kits': 1.0.13 + '@visactor/vrender-animate': 1.0.9 + '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-kits': 1.0.9 dev: false /@visactor/vscale/0.18.18: @@ -4973,6 +4973,12 @@ packages: '@visactor/vutils': 1.0.6 dev: false + /@visactor/vscale/1.0.9: + resolution: {integrity: sha512-8u7ousY+Yo9smgcPyFePYl45sD4VXciQf9JOAc2jncNFIyZch7/2Li2CvqL3HPrdenjrl1twAVc5C5IPbyEUyQ==} + dependencies: + '@visactor/vutils': 1.0.9 + dev: false + /@visactor/vtable-calendar/1.19.0-alpha.0: resolution: {integrity: sha512-Wlom5/2ui3mLprzAXgoaprRMercBy9Km9RAzaP+A6B/u3KSIAuyyN08ecnXHR5AhO2dUWMxkK0vwkmHkVyUCcA==} dependencies: @@ -5060,6 +5066,14 @@ packages: eventemitter3: 4.0.7 dev: false + /@visactor/vutils/1.0.9: + resolution: {integrity: sha512-78Y7ZbpViscZuGIfsUAahilBHnMpAjIhbTvS4g04H4DOu/a5kNyvF6J2a4u4JFGMbazdzY9L1lDQ9koNdpviGQ==} + dependencies: + '@turf/helpers': 6.5.0 + '@turf/invariant': 6.5.0 + eventemitter3: 4.0.7 + dev: false + /@vitejs/plugin-react/3.1.0_vite@3.2.6: resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==} engines: {node: ^14.18.0 || >=16.0.0} @@ -5071,7 +5085,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.27.1_@babel+core@7.20.12 magic-string: 0.27.0 react-refresh: 0.14.2 - vite: 3.2.6_@types+node@22.15.30 + vite: 3.2.6 transitivePeerDependencies: - supports-color dev: true diff --git a/packages/vchart/package.json b/packages/vchart/package.json index 9338299dfe..999e204cb0 100644 --- a/packages/vchart/package.json +++ b/packages/vchart/package.json @@ -132,4 +132,4 @@ "access": "public", "registry": "https://registry.npmjs.org/" } -} +} \ No newline at end of file diff --git a/packages/vchart/src/chart/index.ts b/packages/vchart/src/chart/index.ts index 4eca053d91..229608b5bb 100644 --- a/packages/vchart/src/chart/index.ts +++ b/packages/vchart/src/chart/index.ts @@ -39,7 +39,7 @@ import { RangeColumnChart, registerRangeColumnChart } from './range-column'; import type { IRoseChartSpec } from './rose'; import { RoseChart, registerRoseChart } from './rose'; import type { ISankeyChartSpec } from './sankey'; -import { SankeyChart, registerSankeyChart } from './sankey'; +import { SankeyChart, registerSankeyChart, SankeyChartSpecTransformer } from './sankey'; import type { IScatterChartSpec } from './scatter'; import { ScatterChart, registerScatterChart } from './scatter'; import type { ISequenceChartSpec } from './sequence'; @@ -94,6 +94,7 @@ export { RangeAreaChart, RoseChart, SankeyChart, + SankeyChartSpecTransformer, ScatterChart, SunburstChart, SequenceChart, diff --git a/packages/vchart/src/series/sankey/sankey.ts b/packages/vchart/src/series/sankey/sankey.ts index 19989344b8..ed0bd68796 100644 --- a/packages/vchart/src/series/sankey/sankey.ts +++ b/packages/vchart/src/series/sankey/sankey.ts @@ -51,8 +51,8 @@ export class SankeySeries exten static readonly mark: SeriesMarkMap = sankeySeriesMark; static readonly builtInTheme = { sankey }; - private _nodeMark: IRectMark; - private _linkMark: ILinkPathMark; + protected _nodeMark: IRectMark; + protected _linkMark: ILinkPathMark; private _nodeLayoutZIndex = LayoutZIndex.Node; private _labelLayoutZIndex = LayoutZIndex.Label; @@ -65,7 +65,7 @@ export class SankeySeries exten protected _categoryField!: string; private _colorScale: IBaseScale; private _nodeList: (string | number)[]; - private _needClear: boolean; + protected _needClear: boolean; get direction() { return this._spec.direction ?? 'horizontal'; @@ -500,7 +500,7 @@ export class SankeySeries exten } }; - protected _handleClearEmpty = () => { + protected _handleClearEmpty() { if (!this._needClear) { return; } @@ -529,9 +529,9 @@ export class SankeySeries exten }); this._needClear = false; - }; + } - protected _handleNodeAdjacencyClick = (graphic: IMarkGraphic) => { + protected _handleNodeAdjacencyClick(graphic: IMarkGraphic) { const nodeDatum = getDatumOfGraphic(graphic) as Datum; const highlightNodes: string[] = [nodeDatum.key]; @@ -573,9 +573,9 @@ export class SankeySeries exten } this._needClear = true; - }; + } - protected _handleLinkAdjacencyClick = (graphic: IMarkGraphic) => { + protected _handleLinkAdjacencyClick(graphic: IMarkGraphic) { const curLinkDatum = getDatumOfGraphic(graphic) as Datum; const highlightNodes: string[] = [curLinkDatum.source, curLinkDatum.target]; @@ -601,9 +601,9 @@ export class SankeySeries exten } this._needClear = true; - }; + } - protected _handleNodeRelatedClick = (graphic: IMarkGraphic) => { + protected _handleNodeRelatedClick(graphic: IMarkGraphic) { const nodeDatum = getDatumOfGraphic(graphic) as Datum; const allNodeElements = this._nodeMark.getGraphics(); @@ -824,9 +824,9 @@ export class SankeySeries exten } this._needClear = true; - }; + } - protected _handleLinkRelatedClick = (graphic: IMarkGraphic) => { + protected _handleLinkRelatedClick(graphic: IMarkGraphic) { const allNodeElements = this._nodeMark.getGraphics(); if (!allNodeElements || !allNodeElements.length) { @@ -966,9 +966,9 @@ export class SankeySeries exten } this._needClear = true; - }; + } - protected _highLightElements(graphics: IMarkGraphic[], highlightNodes: string[]) { + protected _highLightElements(graphics: IMarkGraphic[], highlightNodes: (string | number)[]) { if (!graphics || !graphics.length) { return; } diff --git a/packages/vutils-extension/package.json b/packages/vutils-extension/package.json index a5aa556784..9040f7abfb 100644 --- a/packages/vutils-extension/package.json +++ b/packages/vutils-extension/package.json @@ -25,8 +25,8 @@ "test-watch": "DEBUG_MODE=1 jest --watch" }, "dependencies": { - "@visactor/vutils": "~1.0.6", - "@visactor/vdataset": "~1.0.6" + "@visactor/vutils": "~1.0.9", + "@visactor/vdataset": "~1.0.9" }, "devDependencies": { "@internal/bundler": "workspace:*", From 501b7857b6e9ed99569140893690ce8631d4d93c Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Thu, 7 Aug 2025 15:52:13 +0800 Subject: [PATCH 3/7] feat: upgrade vrender to 1.0.10 --- common/config/rush/pnpm-lock.yaml | 104 +++++++++--------- .../charts/compare-sankey/compare-sankey.ts | 17 ++- 2 files changed, 64 insertions(+), 57 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c8f4f01332..410eeefaa5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -22,8 +22,8 @@ importers: '@visactor/vchart-extension': workspace:2.0.1 '@visactor/vchart-theme': ~1.6.6 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vtable': 1.19.0-alpha.0 '@visactor/vtable-calendar': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 @@ -59,8 +59,8 @@ importers: '@visactor/vchart-extension': link:../packages/vchart-extension '@visactor/vchart-theme': 1.6.9 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vtable': 1.19.0-alpha.0 '@visactor/vtable-calendar': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 @@ -144,8 +144,8 @@ importers: '@types/offscreencanvas': 2019.6.4 '@types/react-is': ^17.0.3 '@visactor/vchart': workspace:2.0.1 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': ~1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -164,8 +164,8 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': 1.0.9 react-is: 18.3.1 devDependencies: @@ -208,8 +208,8 @@ importers: '@types/react-is': ^17.0.3 '@visactor/vchart': workspace:2.0.1 '@visactor/vchart-extension': workspace:2.0.1 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': ~1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -230,8 +230,8 @@ importers: dependencies: '@visactor/vchart': link:../vchart '@visactor/vchart-extension': link:../vchart-extension - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': 1.0.9 react-is: 18.3.1 devDependencies: @@ -371,10 +371,10 @@ importers: '@types/offscreencanvas': 2019.6.4 '@visactor/vdataset': ~1.0.9 '@visactor/vlayouts': ~1.0.9 - '@visactor/vrender-animate': 1.0.9 - '@visactor/vrender-components': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-animate': 1.0.10 + '@visactor/vrender-components': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vscale': ~1.0.9 '@visactor/vutils': ~1.0.9 '@visactor/vutils-extension': workspace:2.0.1 @@ -413,10 +413,10 @@ importers: dependencies: '@visactor/vdataset': 1.0.9 '@visactor/vlayouts': 1.0.9 - '@visactor/vrender-animate': 1.0.9 - '@visactor/vrender-components': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-animate': 1.0.10 + '@visactor/vrender-components': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vscale': 1.0.9 '@visactor/vutils': 1.0.9 '@visactor/vutils-extension': link:../vutils-extension @@ -478,10 +478,10 @@ importers: '@visactor/vchart': workspace:2.0.1 '@visactor/vdataset': ~1.0.9 '@visactor/vlayouts': ~1.0.9 - '@visactor/vrender-animate': 1.0.9 - '@visactor/vrender-components': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-animate': 1.0.10 + '@visactor/vrender-components': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': ~1.0.9 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 @@ -503,10 +503,10 @@ importers: '@visactor/vchart': link:../vchart '@visactor/vdataset': 1.0.9 '@visactor/vlayouts': 1.0.9 - '@visactor/vrender-animate': 1.0.9 - '@visactor/vrender-components': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-animate': 1.0.10 + '@visactor/vrender-components': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': 1.0.9 devDependencies: '@internal/bundler': link:../../tools/bundler @@ -878,9 +878,9 @@ importers: '@typescript-eslint/eslint-plugin': 5.30.0 '@typescript-eslint/parser': 5.30.0 '@visactor/vchart': workspace:2.0.1 - '@visactor/vrender': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': ~1.0.9 cross-env: ^7.0.3 eslint: ~8.18.0 @@ -893,9 +893,9 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../../packages/vchart - '@visactor/vrender': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vutils': 1.0.9 devDependencies: '@internal/bundler': link:../bundler @@ -4884,10 +4884,10 @@ packages: '@visactor/vutils': 1.0.4 dev: false - /@visactor/vrender-animate/1.0.9: - resolution: {integrity: sha512-9gkzQuVx2SP5YmdHslRdZK3dH8q0sZRqEi7XlmB7fL++pvDuJy5EGWTIUXPvAL/67hLpQKJy/Oe3C+4RxPpQ1A==} + /@visactor/vrender-animate/1.0.10: + resolution: {integrity: sha512-jPpysPAFc2lSfZ8T6GaXBfXVHdf3XVoaC7pZm6x5tImqtGXU0us0QSORFFfRi0ZxvbbwtMTwa146SFbtTGQidw==} dependencies: - '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-core': 1.0.10 '@visactor/vutils': 1.0.6 dev: false @@ -4901,12 +4901,12 @@ packages: '@visactor/vutils': 1.0.4 dev: false - /@visactor/vrender-components/1.0.9: - resolution: {integrity: sha512-3NDFyKOlPjHICgrig14E1IrXXkLFQWOicX3jNH9/QqPjgRF4o6orp3ZeJs3Qy451qXTum4/2GUgsNq2sC8IHyg==} + /@visactor/vrender-components/1.0.10: + resolution: {integrity: sha512-Mp1zNNz1z9uOvwPhHiCZxR3CEFBlDp8fJHTjduySnCfgqw8f3g0qATJYaXtUCo//V5Sl/UqyXvNfBdS8Locmsg==} dependencies: - '@visactor/vrender-animate': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-animate': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 '@visactor/vscale': 1.0.6 '@visactor/vutils': 1.0.6 dev: false @@ -4918,8 +4918,8 @@ packages: color-convert: 2.0.1 dev: false - /@visactor/vrender-core/1.0.9: - resolution: {integrity: sha512-r33hSBIPvbMJuLhJ8LLBlwkKLqwDg+nl2MRoQfyy4f4VrGg1yBmF576lbj7TCifLN8mtfhrWHZ+Hb0Q65Alghg==} + /@visactor/vrender-core/1.0.10: + resolution: {integrity: sha512-XdWraeIqSccwHhTbaLNAxXICOBvjQG5CmerXjUS00rG1cA6UCOSqLaBTM6bo3fNZa+k8iaxpZ5tvV6tyGCrWYw==} dependencies: '@visactor/vutils': 1.0.6 color-convert: 2.0.1 @@ -4936,23 +4936,23 @@ packages: roughjs: 4.5.2 dev: false - /@visactor/vrender-kits/1.0.9: - resolution: {integrity: sha512-X5CCWEJt4AcfIcbkdScKJjr7tRBCta7SrltsjeMH+RDmNEzPxNJhvxgzpxePAOaWmJVR8TEKgT3cyx3bOU+EHg==} + /@visactor/vrender-kits/1.0.10: + resolution: {integrity: sha512-+uiGvvpX+ifezqC3aIMrneGBA094Q7vQNPPog2199Brhmq4czv6tB3oKQmnfz/udAdm7EbBcNGfLuiDcCMDN/w==} dependencies: '@resvg/resvg-js': 2.4.1 - '@visactor/vrender-core': 1.0.9 + '@visactor/vrender-core': 1.0.10 '@visactor/vutils': 1.0.6 gifuct-js: 2.1.2 lottie-web: 5.13.0 roughjs: 4.5.2 dev: false - /@visactor/vrender/1.0.9: - resolution: {integrity: sha512-3hYf4k3Tk1WmOsLb0Ll3MMFR6EOmZ5Lx+ElsAvOeZZFm/an17pArI7YyORAEyKG/ZIdaV0M1INHAxSXQUu5d0g==} + /@visactor/vrender/1.0.10: + resolution: {integrity: sha512-rcIFVAXldutNJDIHToNWSGqm+Sd7r0HHAUnAeiXLd5EqPsKS4xgIfu5gq5feLi3jRgIfq9/MlxDYTJZhlisQvQ==} dependencies: - '@visactor/vrender-animate': 1.0.9 - '@visactor/vrender-core': 1.0.9 - '@visactor/vrender-kits': 1.0.9 + '@visactor/vrender-animate': 1.0.10 + '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-kits': 1.0.10 dev: false /@visactor/vscale/0.18.18: diff --git a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts index 4d098b4741..6d53fb0989 100644 --- a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts +++ b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts @@ -323,12 +323,19 @@ export class CompareSankeySeries extends SankeySeries { + el.removeState(STATE_VALUE_ENUM.STATE_HOVER); + }); + } + + // 同时需要清除 hover + const allLinkElements = this._linkMark.getGraphics(); + if (allLinkElements || !allLinkElements.length) { + allLinkElements.forEach(el => { + el.removeState(STATE_VALUE_ENUM.STATE_HOVER); + }); } - allNodeElements.forEach(el => { - el.removeState(STATE_VALUE_ENUM.STATE_HOVER); - }); } } From 11371f19133d9c4fac873032ba8c1ba9f6e3ef42 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Thu, 7 Aug 2025 17:44:39 +0800 Subject: [PATCH 4/7] chore: override vutils to same version --- common/config/rush/pnpm-config.json | 8 +- common/config/rush/pnpm-lock.yaml | 176 +++++++--------------------- 2 files changed, 44 insertions(+), 140 deletions(-) diff --git a/common/config/rush/pnpm-config.json b/common/config/rush/pnpm-config.json index 645d1a7e1e..accc7e2e5b 100644 --- a/common/config/rush/pnpm-config.json +++ b/common/config/rush/pnpm-config.json @@ -83,10 +83,10 @@ * PNPM documentation: https://pnpm.io/package_json#pnpmoverrides */ "globalOverrides": { - // "@visactor/vutils": "1.0.6", - // "@visactor/vlayouts": "1.0.6", - // "@visactor/vdataset": "1.0.6", - // "@visactor/vscale": "1.0.6", + "@visactor/vutils": "1.0.9", + "@visactor/vlayouts": "1.0.9", + "@visactor/vdataset": "1.0.9", + "@visactor/vscale": "1.0.9" // "@visactor/vrender-core": "1.0.0", // "@visactor/vrender-kits": "1.0.0", // "@visactor/vrender-animate": "1.0.0", diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 410eeefaa5..01041fbf81 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,5 +1,11 @@ lockfileVersion: 5.4 +overrides: + '@visactor/vutils': 1.0.9 + '@visactor/vlayouts': 1.0.9 + '@visactor/vdataset': 1.0.9 + '@visactor/vscale': 1.0.9 + importers: .: @@ -28,7 +34,7 @@ importers: '@visactor/vtable-calendar': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 '@visactor/vtable-gantt': 1.19.0-alpha.0 - '@visactor/vutils': ~1.0.9 + '@visactor/vutils': 1.0.9 '@vitejs/plugin-react': 3.1.0 axios: ^1.4.0 buble: ^0.20.0 @@ -146,7 +152,7 @@ importers: '@visactor/vchart': workspace:2.0.1 '@visactor/vrender-core': 1.0.10 '@visactor/vrender-kits': 1.0.10 - '@visactor/vutils': ~1.0.9 + '@visactor/vutils': 1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 eslint-config-prettier: 8.5.0 @@ -210,7 +216,7 @@ importers: '@visactor/vchart-extension': workspace:2.0.1 '@visactor/vrender-core': 1.0.10 '@visactor/vrender-kits': 1.0.10 - '@visactor/vutils': ~1.0.9 + '@visactor/vutils': 1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 eslint-config-prettier: 8.5.0 @@ -369,14 +375,14 @@ importers: '@types/jest': ^26.0.0 '@types/node': '*' '@types/offscreencanvas': 2019.6.4 - '@visactor/vdataset': ~1.0.9 - '@visactor/vlayouts': ~1.0.9 + '@visactor/vdataset': 1.0.9 + '@visactor/vlayouts': 1.0.9 '@visactor/vrender-animate': 1.0.10 '@visactor/vrender-components': 1.0.10 '@visactor/vrender-core': 1.0.10 '@visactor/vrender-kits': 1.0.10 - '@visactor/vscale': ~1.0.9 - '@visactor/vutils': ~1.0.9 + '@visactor/vscale': 1.0.9 + '@visactor/vutils': 1.0.9 '@visactor/vutils-extension': workspace:2.0.1 canvas: 2.11.2 cross-env: ^7.0.3 @@ -476,13 +482,13 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 '@visactor/vchart': workspace:2.0.1 - '@visactor/vdataset': ~1.0.9 - '@visactor/vlayouts': ~1.0.9 + '@visactor/vdataset': 1.0.9 + '@visactor/vlayouts': 1.0.9 '@visactor/vrender-animate': 1.0.10 '@visactor/vrender-components': 1.0.10 '@visactor/vrender-core': 1.0.10 '@visactor/vrender-kits': 1.0.10 - '@visactor/vutils': ~1.0.9 + '@visactor/vutils': 1.0.9 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 eslint: ~8.18.0 @@ -581,8 +587,8 @@ importers: '@types/jest': ^26.0.0 '@types/node': '*' '@types/offscreencanvas': 2019.6.4 - '@visactor/vdataset': ~1.0.9 - '@visactor/vutils': ~1.0.9 + '@visactor/vdataset': 1.0.9 + '@visactor/vutils': 1.0.9 eslint: ~8.18.0 husky: 7.0.4 jest: ^26.0.0 @@ -881,7 +887,7 @@ importers: '@visactor/vrender': 1.0.10 '@visactor/vrender-core': 1.0.10 '@visactor/vrender-kits': 1.0.10 - '@visactor/vutils': ~1.0.9 + '@visactor/vutils': 1.0.9 cross-env: ^7.0.3 eslint: ~8.18.0 jest: ^26.0.0 @@ -4783,50 +4789,6 @@ packages: resolution: {integrity: sha512-9Bfd3WOVPbwr/yAaOlIbxpCdwD6aFs4uD5tKaus1o464Lc2ps7XdzJAkxXWOATsPl1LfINWN3mIqNItLXZf2Xw==} dev: false - /@visactor/vdataset/0.17.5: - resolution: {integrity: sha512-zVBdLWHWrhldGc8JDjSYF9lvpFT4ZEFQDB0b6yvfSiHzHKHiSco+rWmUFvA7r4ObT6j2QWF1vZAV9To8Ml4vHw==} - dependencies: - '@turf/flatten': 6.5.0 - '@turf/helpers': 6.5.0 - '@turf/rewind': 6.5.0 - '@visactor/vutils': 0.17.5 - d3-dsv: 2.0.0 - d3-geo: 1.12.1 - d3-hexbin: 0.2.2 - d3-hierarchy: 3.1.2 - eventemitter3: 4.0.7 - geobuf: 3.0.2 - geojson-dissolve: 3.1.0 - path-browserify: 1.0.1 - pbf: 3.3.0 - point-at-length: 1.1.0 - simple-statistics: 7.8.8 - simplify-geojson: 1.0.5 - topojson-client: 3.1.0 - dev: false - - /@visactor/vdataset/0.18.18: - resolution: {integrity: sha512-lye23zpineMKV42JmuJaOY3fgl7aWhyDIwK9dWooqZzP14AFukPoK7ZvUeuKZihLrHxqtCg2VWEjovnh9O1RUg==} - dependencies: - '@turf/flatten': 6.5.0 - '@turf/helpers': 6.5.0 - '@turf/rewind': 6.5.0 - '@visactor/vutils': 0.18.18 - d3-dsv: 2.0.0 - d3-geo: 1.12.1 - d3-hexbin: 0.2.2 - d3-hierarchy: 3.1.2 - eventemitter3: 4.0.7 - geobuf: 3.0.2 - geojson-dissolve: 3.1.0 - path-browserify: 1.0.1 - pbf: 3.3.0 - point-at-length: 1.1.0 - simple-statistics: 7.8.8 - simplify-geojson: 1.0.5 - topojson-client: 3.1.0 - dev: false - /@visactor/vdataset/1.0.9: resolution: {integrity: sha512-8OJWm8rZ1ss46r7BgO7L7se0qb28Ygk1yd999tV5SsN7R06sgB08l6ZP8dbvAXlYW08FWLYXc5RmCTRVG8mL2Q==} dependencies: @@ -4864,8 +4826,8 @@ packages: dependencies: '@visactor/calculator': 1.2.4-alpha.5 '@visactor/chart-advisor': 0.1.10 - '@visactor/vdataset': 0.17.5 - '@visactor/vutils': 0.17.5 + '@visactor/vdataset': 1.0.9 + '@visactor/vutils': 1.0.9 axios: 1.9.0 dayjs: 1.11.13 exceljs: 4.4.0 @@ -4881,14 +4843,14 @@ packages: resolution: {integrity: sha512-9kTtvp1ef+1t+AtUiza6A7qBQP7SmvOu3/ILGrqs/HGdZVj1XGjbYvD/X/zwKJ3LEb7gGV5fa8x95e4czTvRSA==} dependencies: '@visactor/vrender-core': 1.0.0-alpha.18 - '@visactor/vutils': 1.0.4 + '@visactor/vutils': 1.0.9 dev: false /@visactor/vrender-animate/1.0.10: resolution: {integrity: sha512-jPpysPAFc2lSfZ8T6GaXBfXVHdf3XVoaC7pZm6x5tImqtGXU0us0QSORFFfRi0ZxvbbwtMTwa146SFbtTGQidw==} dependencies: '@visactor/vrender-core': 1.0.10 - '@visactor/vutils': 1.0.6 + '@visactor/vutils': 1.0.9 dev: false /@visactor/vrender-components/1.0.0-alpha.18: @@ -4897,8 +4859,8 @@ packages: '@visactor/vrender-animate': 1.0.0-alpha.18 '@visactor/vrender-core': 1.0.0-alpha.18 '@visactor/vrender-kits': 1.0.0-alpha.18 - '@visactor/vscale': 1.0.4 - '@visactor/vutils': 1.0.4 + '@visactor/vscale': 1.0.9 + '@visactor/vutils': 1.0.9 dev: false /@visactor/vrender-components/1.0.10: @@ -4907,21 +4869,21 @@ packages: '@visactor/vrender-animate': 1.0.10 '@visactor/vrender-core': 1.0.10 '@visactor/vrender-kits': 1.0.10 - '@visactor/vscale': 1.0.6 - '@visactor/vutils': 1.0.6 + '@visactor/vscale': 1.0.9 + '@visactor/vutils': 1.0.9 dev: false /@visactor/vrender-core/1.0.0-alpha.18: resolution: {integrity: sha512-0ihtNvCyNkOsWPFgRqowHzq0IcQgS2Wl/nPpKbVtxWKveenwlhA+ZKoQvam6VJyBY7jeNe1pROy0mJMDyVAJQw==} dependencies: - '@visactor/vutils': 1.0.4 + '@visactor/vutils': 1.0.9 color-convert: 2.0.1 dev: false /@visactor/vrender-core/1.0.10: resolution: {integrity: sha512-XdWraeIqSccwHhTbaLNAxXICOBvjQG5CmerXjUS00rG1cA6UCOSqLaBTM6bo3fNZa+k8iaxpZ5tvV6tyGCrWYw==} dependencies: - '@visactor/vutils': 1.0.6 + '@visactor/vutils': 1.0.9 color-convert: 2.0.1 dev: false @@ -4930,7 +4892,7 @@ packages: dependencies: '@resvg/resvg-js': 2.4.1 '@visactor/vrender-core': 1.0.0-alpha.18 - '@visactor/vutils': 1.0.4 + '@visactor/vutils': 1.0.9 gifuct-js: 2.1.2 lottie-web: 5.13.0 roughjs: 4.5.2 @@ -4941,7 +4903,7 @@ packages: dependencies: '@resvg/resvg-js': 2.4.1 '@visactor/vrender-core': 1.0.10 - '@visactor/vutils': 1.0.6 + '@visactor/vutils': 1.0.9 gifuct-js: 2.1.2 lottie-web: 5.13.0 roughjs: 4.5.2 @@ -4955,24 +4917,6 @@ packages: '@visactor/vrender-kits': 1.0.10 dev: false - /@visactor/vscale/0.18.18: - resolution: {integrity: sha512-iRG4kv+5Fv4KX3AxEfV95XU3I6OmF0QizyAhqHxKa7L1MaT+MRvDDk5zHWf1E8gialLbL2xDe3GnT6g/4u5jhA==} - dependencies: - '@visactor/vutils': 0.18.18 - dev: false - - /@visactor/vscale/1.0.4: - resolution: {integrity: sha512-mXuX0gbQ5dmsU+dOfrDfFT45ijTZrFh1wYeIY44cdMhFo4v+tVdeihN0F+3CEI7oSZiZENbpJ7dXvxnu04xG/g==} - dependencies: - '@visactor/vutils': 1.0.4 - dev: false - - /@visactor/vscale/1.0.6: - resolution: {integrity: sha512-E6ySrzOIyL85luy5dKPpKzaCjf/hkLFF/mAn37Lv8XJWhyxWjYO29GM7cIlqDNCKAY0qsONPnfmgdGX+Hoe5vg==} - dependencies: - '@visactor/vutils': 1.0.6 - dev: false - /@visactor/vscale/1.0.9: resolution: {integrity: sha512-8u7ousY+Yo9smgcPyFePYl45sD4VXciQf9JOAc2jncNFIyZch7/2Li2CvqL3HPrdenjrl1twAVc5C5IPbyEUyQ==} dependencies: @@ -4983,7 +4927,7 @@ packages: resolution: {integrity: sha512-Wlom5/2ui3mLprzAXgoaprRMercBy9Km9RAzaP+A6B/u3KSIAuyyN08ecnXHR5AhO2dUWMxkK0vwkmHkVyUCcA==} dependencies: '@visactor/vtable': 1.19.0-alpha.0 - '@visactor/vutils': 0.19.6 + '@visactor/vutils': 1.0.9 date-fns: 3.6.0 dev: false @@ -4994,25 +4938,25 @@ packages: /@visactor/vtable-gantt/1.19.0-alpha.0: resolution: {integrity: sha512-cB1U8QtXfw/1SwUzHl8bZP2hfyjkwJxtn7njKRdSXO9Cpk+uvubDu3GW0TPQbW0NGwnJKbo+4OKH2bNJPGGWZA==} dependencies: - '@visactor/vdataset': 0.18.18 - '@visactor/vscale': 0.18.18 + '@visactor/vdataset': 1.0.9 + '@visactor/vscale': 1.0.9 '@visactor/vtable': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 - '@visactor/vutils': 0.19.6 + '@visactor/vutils': 1.0.9 cssfontparser: 1.2.1 dev: false /@visactor/vtable/1.19.0-alpha.0: resolution: {integrity: sha512-TaruC6JDXDlX8mtyd52WRBFCKS7CMOniZTL2yq164x7ZlqoykpjfF5muIxucCJB/jbJCs0YLtBqLLyZCX3dHIg==} dependencies: - '@visactor/vdataset': 0.18.18 + '@visactor/vdataset': 1.0.9 '@visactor/vrender-animate': 1.0.0-alpha.18 '@visactor/vrender-components': 1.0.0-alpha.18 '@visactor/vrender-core': 1.0.0-alpha.18 '@visactor/vrender-kits': 1.0.0-alpha.18 - '@visactor/vscale': 0.18.18 + '@visactor/vscale': 1.0.9 '@visactor/vtable-editors': 1.19.0-alpha.0 - '@visactor/vutils': 0.19.6 + '@visactor/vutils': 1.0.9 '@visactor/vutils-extension': 1.11.14 cssfontparser: 1.2.1 gifuct-js: 2.1.2 @@ -5022,48 +4966,8 @@ packages: /@visactor/vutils-extension/1.11.14: resolution: {integrity: sha512-vfViZphXJBH0NwCHIoe8S1/+tDtykEKIfsLMIHprh7Azv7fVSB1eotG00SAegK75E18ARQGNXF1DxixUFiXSIQ==} dependencies: - '@visactor/vdataset': 0.18.18 - '@visactor/vutils': 0.18.18 - dev: false - - /@visactor/vutils/0.17.5: - resolution: {integrity: sha512-HFN6Pk1Wc1RK842g02MeKOlvdri5L7/nqxMVTqxIvi0XMhHXpmoqN4+/9H+h8LmJpVohyrI/MT85TRBV/rManw==} - dependencies: - '@turf/helpers': 6.5.0 - '@turf/invariant': 6.5.0 - eventemitter3: 4.0.7 - dev: false - - /@visactor/vutils/0.18.18: - resolution: {integrity: sha512-byEJefqxiCz3UWe+YedEVjsdPtnJOAtKdRYi4qT9ojgACdd6QqlWs53Eb7PlMZgWDxVxqkxJP2bZnRKw+ME0Xg==} - dependencies: - '@turf/helpers': 6.5.0 - '@turf/invariant': 6.5.0 - eventemitter3: 4.0.7 - dev: false - - /@visactor/vutils/0.19.6: - resolution: {integrity: sha512-1jzBJNoIc9QKeJb1SQo2bXQhrhKqWcjyKPbOSdYE2joEYu2AzWY4RVe6Bq4SUNgZETeSFyhJF7Ij8gRdDd7/QA==} - dependencies: - '@turf/helpers': 6.5.0 - '@turf/invariant': 6.5.0 - eventemitter3: 4.0.7 - dev: false - - /@visactor/vutils/1.0.4: - resolution: {integrity: sha512-GE149SM5WAc9DMNV7bGtPD4xHP68vbHMRuxGPJ3ndzAGLC/KuXpClteMw6bTY1fRX1vDLY/tQ/GVthgeOx4kDw==} - dependencies: - '@turf/helpers': 6.5.0 - '@turf/invariant': 6.5.0 - eventemitter3: 4.0.7 - dev: false - - /@visactor/vutils/1.0.6: - resolution: {integrity: sha512-87/AYLrjY1rtvIT0N/9S+sESialMQUKYv7MDjLjUo37u0hmeL/AwRSGBSvjxdxayKHOmdwUK1BLpQrDIrssKLg==} - dependencies: - '@turf/helpers': 6.5.0 - '@turf/invariant': 6.5.0 - eventemitter3: 4.0.7 + '@visactor/vdataset': 1.0.9 + '@visactor/vutils': 1.0.9 dev: false /@visactor/vutils/1.0.9: From 08d97600a6a6336c243a80043b2ca8cb5b2de5c5 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Thu, 7 Aug 2025 19:11:22 +0800 Subject: [PATCH 5/7] chore: export compare-sankley-chart --- packages/vchart-extension/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vchart-extension/src/index.ts b/packages/vchart-extension/src/index.ts index 27617b4164..eaf5817e5e 100644 --- a/packages/vchart-extension/src/index.ts +++ b/packages/vchart-extension/src/index.ts @@ -17,6 +17,7 @@ export { register3DPlugin } from './charts/3d/plugin'; export * from './charts/pictogram'; export * from './charts/image-cloud'; export * from './charts/candlestick'; +export * from './charts/compare-sankey'; export * from './components/series-break'; export * from './components/bar-link'; From 00834b3a5549b8e528515864f333b392d7f61806 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Thu, 7 Aug 2025 19:44:58 +0800 Subject: [PATCH 6/7] fix: fix bug of import data_index --- .../src/charts/compare-sankey/compare-sankey.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts index 6d53fb0989..62f5ccf7aa 100644 --- a/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts +++ b/packages/vchart-extension/src/charts/compare-sankey/compare-sankey.ts @@ -1,4 +1,3 @@ -import { DEFAULT_DATA_KEY } from './../../../../vchart/src/constant/data'; import type { SankeyLinkElement } from '@visactor/vlayouts/es/sankey'; import type { ICompareSankeyChartSpecBase, ICompareSankeySeriesSpecBase } from './interface'; import type { Datum, ILinkPathMarkSpec, IRectMarkSpec } from '@visactor/vchart'; @@ -11,7 +10,8 @@ import { STATE_VALUE_ENUM, AttributeLevel, getDatumOfGraphic, - DEFAULT_DATA_INDEX + DEFAULT_DATA_INDEX, + DEFAULT_DATA_KEY } from '@visactor/vchart'; import { DataView } from '@visactor/vdataset'; import { CompareSankeyChartSpecTransformer } from './compare-sankey-transformer'; From bd9e77c9ec23af91c68514d14d31399fbfc69030 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Fri, 19 Sep 2025 10:47:01 +0800 Subject: [PATCH 7/7] feat: upgrade vutils to 1.0.9 --- common/config/rush/pnpm-lock.yaml | 132 ++++++++++++------------- docs/package.json | 2 +- packages/openinula-vchart/package.json | 2 +- packages/react-vchart/package.json | 2 +- packages/vchart-extension/package.json | 6 +- packages/vchart/package.json | 8 +- packages/vstory/package.json | 2 +- tools/story-player/package.json | 2 +- 8 files changed, 78 insertions(+), 78 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 01041fbf81..bc1359eb25 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -22,14 +22,14 @@ importers: '@types/markdown-it': ^13.0.0 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/openinula-vchart': workspace:2.0.1 - '@visactor/react-vchart': workspace:2.0.1 - '@visactor/vchart': workspace:2.0.1 - '@visactor/vchart-extension': workspace:2.0.1 + '@visactor/openinula-vchart': workspace:2.0.4 + '@visactor/react-vchart': workspace:2.0.4 + '@visactor/vchart': workspace:2.0.4 + '@visactor/vchart-extension': workspace:2.0.4 '@visactor/vchart-theme': ~1.6.6 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vtable': 1.19.0-alpha.0 '@visactor/vtable-calendar': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 @@ -65,8 +65,8 @@ importers: '@visactor/vchart-extension': link:../packages/vchart-extension '@visactor/vchart-theme': 1.6.9 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vtable': 1.19.0-alpha.0 '@visactor/vtable-calendar': 1.19.0-alpha.0 '@visactor/vtable-editors': 1.19.0-alpha.0 @@ -149,9 +149,9 @@ importers: '@types/node': '*' '@types/offscreencanvas': 2019.6.4 '@types/react-is': ^17.0.3 - '@visactor/vchart': workspace:2.0.1 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vchart': workspace:2.0.4 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -170,8 +170,8 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 react-is: 18.3.1 devDependencies: @@ -212,10 +212,10 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 '@types/react-is': ^17.0.3 - '@visactor/vchart': workspace:2.0.1 - '@visactor/vchart-extension': workspace:2.0.1 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vchart': workspace:2.0.4 + '@visactor/vchart-extension': workspace:2.0.4 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -236,8 +236,8 @@ importers: dependencies: '@visactor/vchart': link:../vchart '@visactor/vchart-extension': link:../vchart-extension - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 react-is: 18.3.1 devDependencies: @@ -295,8 +295,8 @@ importers: '@types/webpack-env': ^1.13.6 '@typescript-eslint/eslint-plugin': 5.30.0 '@typescript-eslint/parser': 5.30.0 - '@visactor/vchart': workspace:2.0.1 - '@visactor/vchart-extension': workspace:2.0.1 + '@visactor/vchart': workspace:2.0.4 + '@visactor/vchart-extension': workspace:2.0.4 '@vitejs/plugin-react': 3.1.0 babel-preset-taro: 3.3.17 eslint: ~8.18.0 @@ -377,13 +377,13 @@ importers: '@types/offscreencanvas': 2019.6.4 '@visactor/vdataset': 1.0.9 '@visactor/vlayouts': 1.0.9 - '@visactor/vrender-animate': 1.0.10 - '@visactor/vrender-components': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-animate': 1.0.13 + '@visactor/vrender-components': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vscale': 1.0.9 '@visactor/vutils': 1.0.9 - '@visactor/vutils-extension': workspace:2.0.1 + '@visactor/vutils-extension': workspace:2.0.4 canvas: 2.11.2 cross-env: ^7.0.3 d3-array: ^1.2.4 @@ -419,10 +419,10 @@ importers: dependencies: '@visactor/vdataset': 1.0.9 '@visactor/vlayouts': 1.0.9 - '@visactor/vrender-animate': 1.0.10 - '@visactor/vrender-components': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-animate': 1.0.13 + '@visactor/vrender-components': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vscale': 1.0.9 '@visactor/vutils': 1.0.9 '@visactor/vutils-extension': link:../vutils-extension @@ -481,13 +481,13 @@ importers: '@types/offscreencanvas': 2019.6.4 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/vchart': workspace:2.0.1 + '@visactor/vchart': workspace:2.0.4 '@visactor/vdataset': 1.0.9 '@visactor/vlayouts': 1.0.9 - '@visactor/vrender-animate': 1.0.10 - '@visactor/vrender-components': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-animate': 1.0.13 + '@visactor/vrender-components': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 @@ -509,10 +509,10 @@ importers: '@visactor/vchart': link:../vchart '@visactor/vdataset': 1.0.9 '@visactor/vlayouts': 1.0.9 - '@visactor/vrender-animate': 1.0.10 - '@visactor/vrender-components': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-animate': 1.0.13 + '@visactor/vrender-components': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 devDependencies: '@internal/bundler': link:../../tools/bundler @@ -699,8 +699,8 @@ importers: '@rushstack/eslint-patch': ~1.1.4 '@types/node': '*' '@types/node-fetch': 2.6.4 - '@visactor/vchart': workspace:2.0.1 - '@visactor/vchart-extension': workspace:2.0.1 + '@visactor/vchart': workspace:2.0.4 + '@visactor/vchart-extension': workspace:2.0.4 cross-env: ^7.0.3 eslint: ~8.18.0 form-data: ~4.0.0 @@ -883,10 +883,10 @@ importers: '@types/node': '*' '@typescript-eslint/eslint-plugin': 5.30.0 '@typescript-eslint/parser': 5.30.0 - '@visactor/vchart': workspace:2.0.1 - '@visactor/vrender': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vchart': workspace:2.0.4 + '@visactor/vrender': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 cross-env: ^7.0.3 eslint: ~8.18.0 @@ -899,9 +899,9 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../../packages/vchart - '@visactor/vrender': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vutils': 1.0.9 devDependencies: '@internal/bundler': link:../bundler @@ -4846,10 +4846,10 @@ packages: '@visactor/vutils': 1.0.9 dev: false - /@visactor/vrender-animate/1.0.10: - resolution: {integrity: sha512-jPpysPAFc2lSfZ8T6GaXBfXVHdf3XVoaC7pZm6x5tImqtGXU0us0QSORFFfRi0ZxvbbwtMTwa146SFbtTGQidw==} + /@visactor/vrender-animate/1.0.13: + resolution: {integrity: sha512-UDCa/ZYHIATukkHHxYdVIPhPnNsWE/mBvRatnUGdTKoIW+gtWZkQ5SsjhSWLXWeZ5lzwXf5afjsg6Vc8Y7HqIg==} dependencies: - '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-core': 1.0.13 '@visactor/vutils': 1.0.9 dev: false @@ -4863,12 +4863,12 @@ packages: '@visactor/vutils': 1.0.9 dev: false - /@visactor/vrender-components/1.0.10: - resolution: {integrity: sha512-Mp1zNNz1z9uOvwPhHiCZxR3CEFBlDp8fJHTjduySnCfgqw8f3g0qATJYaXtUCo//V5Sl/UqyXvNfBdS8Locmsg==} + /@visactor/vrender-components/1.0.13: + resolution: {integrity: sha512-lclrDROH1FRnPhT05NStch759MtllVhGj/59R9rqSbflSt7FKKJ4bMhvwi6Ugh2HBsHVo9HjYUFCiW1oGNFG9w==} dependencies: - '@visactor/vrender-animate': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-animate': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 '@visactor/vscale': 1.0.9 '@visactor/vutils': 1.0.9 dev: false @@ -4880,8 +4880,8 @@ packages: color-convert: 2.0.1 dev: false - /@visactor/vrender-core/1.0.10: - resolution: {integrity: sha512-XdWraeIqSccwHhTbaLNAxXICOBvjQG5CmerXjUS00rG1cA6UCOSqLaBTM6bo3fNZa+k8iaxpZ5tvV6tyGCrWYw==} + /@visactor/vrender-core/1.0.13: + resolution: {integrity: sha512-YMEUc1zuleTgyUJoMovUFeb4HK0mEMEdvkH+n8/+oexcB+0KCIHXfM/wtOhnMoJ08HAOOXcB+gGMZRig7TrE1Q==} dependencies: '@visactor/vutils': 1.0.9 color-convert: 2.0.1 @@ -4898,23 +4898,23 @@ packages: roughjs: 4.5.2 dev: false - /@visactor/vrender-kits/1.0.10: - resolution: {integrity: sha512-+uiGvvpX+ifezqC3aIMrneGBA094Q7vQNPPog2199Brhmq4czv6tB3oKQmnfz/udAdm7EbBcNGfLuiDcCMDN/w==} + /@visactor/vrender-kits/1.0.13: + resolution: {integrity: sha512-qvekmEb8s7oarV5TEXX9Soy71crpi/YkECnRy9ELds21BqHUGi1XLl21Bc50Lsss183c9Bry/bBChw/KjxA9qA==} dependencies: '@resvg/resvg-js': 2.4.1 - '@visactor/vrender-core': 1.0.10 + '@visactor/vrender-core': 1.0.13 '@visactor/vutils': 1.0.9 gifuct-js: 2.1.2 lottie-web: 5.13.0 roughjs: 4.5.2 dev: false - /@visactor/vrender/1.0.10: - resolution: {integrity: sha512-rcIFVAXldutNJDIHToNWSGqm+Sd7r0HHAUnAeiXLd5EqPsKS4xgIfu5gq5feLi3jRgIfq9/MlxDYTJZhlisQvQ==} + /@visactor/vrender/1.0.13: + resolution: {integrity: sha512-K/Xo65h4lq1rBMkaXrWK9W2KPWsnaZeEt9I4RdZu1OuJ5jEVkpjiKkE+9BDhBYuz/BOx/mSnYxl2x6LXIqjg6w==} dependencies: - '@visactor/vrender-animate': 1.0.10 - '@visactor/vrender-core': 1.0.10 - '@visactor/vrender-kits': 1.0.10 + '@visactor/vrender-animate': 1.0.13 + '@visactor/vrender-core': 1.0.13 + '@visactor/vrender-kits': 1.0.13 dev: false /@visactor/vscale/1.0.9: diff --git a/docs/package.json b/docs/package.json index f5ac89acf4..3b4b2a472e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -18,7 +18,7 @@ "@visactor/vchart-extension": "workspace:2.0.4", "@visactor/vchart-theme": "~1.6.6", "@visactor/vmind": "1.2.4-alpha.5", - "@visactor/vutils": "~1.0.6", + "@visactor/vutils": "~1.0.9", "@visactor/vrender": "1.0.13", "@visactor/vrender-kits": "1.0.13", "@visactor/vtable": "1.19.0-alpha.0", diff --git a/packages/openinula-vchart/package.json b/packages/openinula-vchart/package.json index 9dd2c3bb55..d764515fa1 100644 --- a/packages/openinula-vchart/package.json +++ b/packages/openinula-vchart/package.json @@ -29,7 +29,7 @@ }, "dependencies": { "@visactor/vchart": "workspace:2.0.4", - "@visactor/vutils": "~1.0.6", + "@visactor/vutils": "~1.0.9", "@visactor/vrender-core": "1.0.13", "@visactor/vrender-kits": "1.0.13", "react-is": "^18.2.0" diff --git a/packages/react-vchart/package.json b/packages/react-vchart/package.json index 7484a4a56a..6708e7cf69 100644 --- a/packages/react-vchart/package.json +++ b/packages/react-vchart/package.json @@ -30,7 +30,7 @@ "dependencies": { "@visactor/vchart": "workspace:2.0.4", "@visactor/vchart-extension": "workspace:2.0.4", - "@visactor/vutils": "~1.0.6", + "@visactor/vutils": "~1.0.9", "@visactor/vrender-core": "1.0.13", "@visactor/vrender-kits": "1.0.13", "react-is": "^18.2.0" diff --git a/packages/vchart-extension/package.json b/packages/vchart-extension/package.json index 6684effff7..fd180211ef 100644 --- a/packages/vchart-extension/package.json +++ b/packages/vchart-extension/package.json @@ -25,9 +25,9 @@ "@visactor/vrender-kits": "1.0.13", "@visactor/vrender-components": "1.0.13", "@visactor/vrender-animate": "1.0.13", - "@visactor/vutils": "~1.0.6", - "@visactor/vdataset": "~1.0.6", - "@visactor/vlayouts": "~1.0.6", + "@visactor/vutils": "~1.0.9", + "@visactor/vdataset": "~1.0.9", + "@visactor/vlayouts": "~1.0.9", "@visactor/vchart": "workspace:2.0.4" }, "devDependencies": { diff --git a/packages/vchart/package.json b/packages/vchart/package.json index 999e204cb0..011bcedad4 100644 --- a/packages/vchart/package.json +++ b/packages/vchart/package.json @@ -118,10 +118,10 @@ "cross-env": "^7.0.3" }, "dependencies": { - "@visactor/vutils": "~1.0.6", - "@visactor/vdataset": "~1.0.6", - "@visactor/vscale": "~1.0.6", - "@visactor/vlayouts": "~1.0.6", + "@visactor/vutils": "~1.0.9", + "@visactor/vdataset": "~1.0.9", + "@visactor/vscale": "~1.0.9", + "@visactor/vlayouts": "~1.0.9", "@visactor/vrender-core": "1.0.13", "@visactor/vrender-kits": "1.0.13", "@visactor/vrender-components": "1.0.13", diff --git a/packages/vstory/package.json b/packages/vstory/package.json index a6f5f032c1..b244ad615f 100644 --- a/packages/vstory/package.json +++ b/packages/vstory/package.json @@ -24,7 +24,7 @@ "@visactor/vrender-core": "1.0.13", "@visactor/vrender-kits": "1.0.13", "@visactor/vrender-components": "1.0.13", - "@visactor/vutils": "~1.0.6" + "@visactor/vutils": "~1.0.9" }, "devDependencies": { "@internal/bundler": "workspace:*", diff --git a/tools/story-player/package.json b/tools/story-player/package.json index 11f0123092..205ba8c804 100644 --- a/tools/story-player/package.json +++ b/tools/story-player/package.json @@ -60,6 +60,6 @@ "@visactor/vrender-kits": "1.0.13", "@visactor/vchart": "workspace:2.0.4", "@visactor/vrender": "1.0.13", - "@visactor/vutils": "~1.0.6" + "@visactor/vutils": "~1.0.9" } } \ No newline at end of file