From 48970b2056b1bc792e762db20359f35a3a17a3d9 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 1 Jul 2024 11:08:27 +0800 Subject: [PATCH 01/29] docs: correct the configuration of the indicator in the demo, closes #2564 --- docs/assets/examples/en/layout/grid-layout.md | 37 ++++++++++--------- docs/assets/examples/zh/layout/grid-layout.md | 37 ++++++++++--------- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/docs/assets/examples/en/layout/grid-layout.md b/docs/assets/examples/en/layout/grid-layout.md index 7c9eaaa02d..f21b200534 100644 --- a/docs/assets/examples/en/layout/grid-layout.md +++ b/docs/assets/examples/en/layout/grid-layout.md @@ -75,27 +75,28 @@ const spec = { }, seriesField: 'type', outerRadius: 0.45, - innerRadius: 0.4, - indicator: { - visible: true, - title: { - visible: true, - autoFit: true, - style: { - text: 'max percent' - } - }, - content: { - visible: true, - autoFit: true, - style: { - text: '70%' - } - } - } + innerRadius: 0.4 } ], indicator: [ + { + regionId: 'circularProgress', + visible: true, + title: { + visible: true, + autoFit: true, + style: { + text: 'percent' + } + }, + content: { + visible: true, + autoFit: true, + style: { + text: '70%' + } + } + }, { regionId: 'indicator', visible: true, diff --git a/docs/assets/examples/zh/layout/grid-layout.md b/docs/assets/examples/zh/layout/grid-layout.md index 8afd1302f5..b634d23210 100644 --- a/docs/assets/examples/zh/layout/grid-layout.md +++ b/docs/assets/examples/zh/layout/grid-layout.md @@ -75,27 +75,28 @@ const spec = { }, seriesField: 'type', outerRadius: 0.45, - innerRadius: 0.4, - indicator: { - visible: true, - title: { - visible: true, - autoFit: true, - style: { - text: 'max percent' - } - }, - content: { - visible: true, - autoFit: true, - style: { - text: '70%' - } - } - } + innerRadius: 0.4 } ], indicator: [ + { + regionId: 'circularProgress', + visible: true, + title: { + visible: true, + autoFit: true, + style: { + text: 'percent' + } + }, + content: { + visible: true, + autoFit: true, + style: { + text: '70%' + } + } + }, { regionId: 'indicator', visible: true, From b5b8a33dffd3ca06fe23882b5893c349984cdd00 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 1 Jul 2024 11:15:39 +0800 Subject: [PATCH 02/29] demo: update markPoint location configuration --- docs/assets/examples/en/bar-chart/bar-markPoint.md | 4 ++-- docs/assets/examples/zh/bar-chart/bar-markPoint.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/assets/examples/en/bar-chart/bar-markPoint.md b/docs/assets/examples/en/bar-chart/bar-markPoint.md index b9f738a59e..5f31dadc0a 100644 --- a/docs/assets/examples/en/bar-chart/bar-markPoint.md +++ b/docs/assets/examples/en/bar-chart/bar-markPoint.md @@ -83,8 +83,8 @@ const spec = { type: 'text', autoRotate: false, text: { + dy: 14, text: '2 mins', - dx: -26, style: { fill: 'white', fontSize: 14 @@ -105,7 +105,7 @@ const spec = { angle: Math.PI, scaleY: 0.4, fill: '#000', - dy: 2, + dy: 4, stroke: '#000' } }, diff --git a/docs/assets/examples/zh/bar-chart/bar-markPoint.md b/docs/assets/examples/zh/bar-chart/bar-markPoint.md index fd9cbf6969..a86ac7a1ae 100644 --- a/docs/assets/examples/zh/bar-chart/bar-markPoint.md +++ b/docs/assets/examples/zh/bar-chart/bar-markPoint.md @@ -79,12 +79,12 @@ const spec = { cost: 2 }, itemContent: { - offsetY: -10, type: 'text', autoRotate: false, + offsetY: -10, text: { + dy: 14, text: '2分钟', - dx: -26, style: { fill: 'white', fontSize: 14 @@ -105,7 +105,7 @@ const spec = { angle: Math.PI, scaleY: 0.4, fill: '#000', - dy: 2, + dy: 4, stroke: '#000' } }, From bad6f13f5a28b25e33c44623e6c68e0b245dc4a0 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 1 Jul 2024 16:31:47 +0800 Subject: [PATCH 03/29] feat: support update data APIs for indicator components --- ...teData-api-for-indicator_2024-07-01-06-00.json | 10 ++++++++++ .../vchart/src/component/indicator/indicator.ts | 2 +- .../vchart/src/component/indicator/interface.ts | 4 +++- packages/vchart/src/core/vchart.ts | 15 +++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 common/changes/@visactor/vchart/feat-updateData-api-for-indicator_2024-07-01-06-00.json diff --git a/common/changes/@visactor/vchart/feat-updateData-api-for-indicator_2024-07-01-06-00.json b/common/changes/@visactor/vchart/feat-updateData-api-for-indicator_2024-07-01-06-00.json new file mode 100644 index 0000000000..2fbe8ecd05 --- /dev/null +++ b/common/changes/@visactor/vchart/feat-updateData-api-for-indicator_2024-07-01-06-00.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "feat: support `updateIndicatorDataById`/`updateIndicatorDataByIndex` API, related #2776", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file diff --git a/packages/vchart/src/component/indicator/indicator.ts b/packages/vchart/src/component/indicator/indicator.ts index 66cbe5bdd9..5f25f06a93 100644 --- a/packages/vchart/src/component/indicator/indicator.ts +++ b/packages/vchart/src/component/indicator/indicator.ts @@ -145,7 +145,7 @@ export class Indicator extends BaseComponent implem } } - private updateDatum(datum: any) { + updateDatum(datum: any) { this._activeDatum = datum; this._displayData.updateData(); const attrs = this._getIndicatorAttrs(); diff --git a/packages/vchart/src/component/indicator/interface.ts b/packages/vchart/src/component/indicator/interface.ts index a76bb421ac..2a6ad3a13b 100644 --- a/packages/vchart/src/component/indicator/interface.ts +++ b/packages/vchart/src/component/indicator/interface.ts @@ -58,7 +58,9 @@ export interface IIndicatorItemSpec { }; } -export type IIndicator = IComponent; +export type IIndicator = IComponent & { + updateDatum: (datum: any) => void; +}; export interface IIndicatorSpec extends IComponentSpec { /** diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index a4ca248bb2..446a996930 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -114,6 +114,7 @@ import { registerElementHighlight as registerHoverInteraction, registerElementSelect as registerSelectInteraction } from '../interaction'; +import type { IIndicator } from '../component/indicator'; export class VChart implements IVChart { readonly id = createID(); @@ -1942,6 +1943,20 @@ export class VChart implements IVChart { this._updateSpecInfo(); } + updateIndicatorDataById(id: string, datum?: Datum) { + const indicator = this._chart?.getComponentByUserId(id) as unknown as IIndicator; + if (indicator) { + indicator.updateDatum(datum); + } + } + + updateIndicatorDataByIndex(index: number = 0, datum?: Datum) { + const indicators = this._chart?.getComponentsByType(ComponentTypeEnum.indicator) as unknown as IIndicator[]; + if (indicators && indicators[index]) { + indicators[index].updateDatum(datum); + } + } + private _initChartPlugin() { const pluginList = Factory.getChartPlugins(); if (pluginList.length > 0) { From 48560cb183f3fb6784cc7959abc1be405f21563e Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 1 Jul 2024 16:45:47 +0800 Subject: [PATCH 04/29] docs: supply docs & comment --- docs/assets/api/en/API/vchart.md | 28 ++++++++++++++++++++++++++++ docs/assets/api/zh/API/vchart.md | 24 ++++++++++++++++++++++++ packages/vchart/src/core/vchart.ts | 8 ++++++++ 3 files changed, 60 insertions(+) diff --git a/docs/assets/api/en/API/vchart.md b/docs/assets/api/en/API/vchart.md index 29ce5721d4..bc59e826e3 100644 --- a/docs/assets/api/en/API/vchart.md +++ b/docs/assets/api/en/API/vchart.md @@ -1179,3 +1179,31 @@ convertValueToPosition: ((value: StringOrNumber, dataLinkInfo: DataLinkAxis, isR ((value: [StringOrNumber, StringOrNumber], dataLinkInfo: DataLinkSeries, isRelativeToCanvas?: boolean) => IPoint | null); ``` + +### updateIndicatorDataById + +Update the indicator component data based on the component id specified in the spec. + +```ts + /** + * Update the indicator component data based on the component id specified in the spec. + * @param id Indicator id in spec. + * @param datum Data Item. + * @since 1.11.7 + */ + updateIndicatorDataById: (id: string, datum?: Datum) => void; +``` + +### updateIndicatorDataByIndex + +Update the indicator component data based on the component index in the spec. + +```ts + /** + * Update the indicator component data based on the component index in the spec. + * @param index Indicator index in spec. + * @param datum Data Item + * @since 1.11.7 + */ + updateIndicatorDataByIndex: (index: number = 0, datum?: Datum) => void; +``` diff --git a/docs/assets/api/zh/API/vchart.md b/docs/assets/api/zh/API/vchart.md index 7f2997bb7c..f956aff52d 100644 --- a/docs/assets/api/zh/API/vchart.md +++ b/docs/assets/api/zh/API/vchart.md @@ -1191,6 +1191,30 @@ convertValueToPosition: ((value: StringOrNumber, dataLinkInfo: DataLinkAxis, isR IPoint | null); ``` +### updateIndicatorDataById + +根据指标卡组件 id 更新指标卡数据。 + +```ts + /** + * 根据 indicator 组件 id 更新 indicator 数据 + * @param id spec 中定义的 indicator id + * @param datum 具体数据项 + * @since 1.11.7 + */ + updateIndicatorDataById: (id: string, datum?: Datum) => void; ``` +### updateIndicatorDataByIndex + +根据指标卡组件索引更新指标卡数据。 + +```ts + /** + * 根据 indicator 组件 id 更新 indicator 数据 + * @param index indicator 索引下标 + * @param datum 具体数据项 + * @since 1.11.7 + */ + updateIndicatorDataByIndex: (index: number = 0, datum?: Datum) => void; ``` diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index 446a996930..800a6a3ff4 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -1943,6 +1943,10 @@ export class VChart implements IVChart { this._updateSpecInfo(); } + /** + * 根据 indicator 组件 id 更新 indicator 数据 + * @since 1.11.7 + */ updateIndicatorDataById(id: string, datum?: Datum) { const indicator = this._chart?.getComponentByUserId(id) as unknown as IIndicator; if (indicator) { @@ -1950,6 +1954,10 @@ export class VChart implements IVChart { } } + /** + * 根据 indicator 组件索引更新 indicator 数据 + * @since 1.11.7 + */ updateIndicatorDataByIndex(index: number = 0, datum?: Datum) { const indicators = this._chart?.getComponentsByType(ComponentTypeEnum.indicator) as unknown as IIndicator[]; if (indicators && indicators[index]) { From 5e93382ffd0da057d616e30bec55d152cbe4a87e Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 1 Jul 2024 17:19:34 +0800 Subject: [PATCH 05/29] feat: indicator support graphic style attribute callback --- .../vchart/src/component/indicator/indicator.ts | 8 ++++---- packages/vchart/src/util/style.ts | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/packages/vchart/src/component/indicator/indicator.ts b/packages/vchart/src/component/indicator/indicator.ts index 5f25f06a93..572f693d44 100644 --- a/packages/vchart/src/component/indicator/indicator.ts +++ b/packages/vchart/src/component/indicator/indicator.ts @@ -7,9 +7,9 @@ import type { IRegion } from '../../region/interface'; import type { IIndicator, IIndicatorItemSpec, IIndicatorSpec } from './interface'; import type { Maybe } from '../../typings'; import { mergeSpec } from '@visactor/vutils-extension'; -import { transformToGraphic } from '../../util/style'; +import { transformIndicatorStyle } from '../../util/style'; import { getActualNumValue } from '../../util/space'; -import { isEqual, isValid, isFunction, array, isArray } from '@visactor/vutils'; +import { isEqual, isValid, isFunction, array, isArray, pickWithout } from '@visactor/vutils'; import { indicatorMapper } from './util'; import type { IModelSpecInfo } from '../../model/interface'; import { registerDataSetInstanceTransform } from '../../data/register'; @@ -193,7 +193,7 @@ export class Indicator extends BaseComponent implem fitPercent: contentSpec.fitPercent, fitStrategy: contentSpec.fitStrategy, style: { - ...transformToGraphic(contentSpec.style), + ...transformIndicatorStyle(pickWithout(contentSpec.style, ['text']), this._activeDatum), text: this._createText(contentSpec.field, contentSpec.style.text) } }); @@ -219,7 +219,7 @@ export class Indicator extends BaseComponent implem fitPercent: this._spec.title.fitPercent, fitStrategy: this._spec.title.fitStrategy, style: { - ...transformToGraphic(this._spec.title.style), + ...transformIndicatorStyle(pickWithout(this._spec.title.style, ['text']), this._activeDatum), text: this._createText(this._spec.title.field, this._spec.title.style.text as any) // FIXME: type } }, diff --git a/packages/vchart/src/util/style.ts b/packages/vchart/src/util/style.ts index efc48324e6..c66dac0bb6 100644 --- a/packages/vchart/src/util/style.ts +++ b/packages/vchart/src/util/style.ts @@ -71,6 +71,21 @@ export function transformAxisLabelStateStyle(stateStyle: any) { return newStateStyle; } +export function transformIndicatorStyle(style: any, datum: any) { + if (isEmpty(style)) { + return null; + } + const newStateStyle = {}; + Object.keys(style).forEach(key => { + if (isFunction(style[key])) { + newStateStyle[key] = style[key](datum); + } else { + newStateStyle[key] = style[key]; + } + }); + return transformToGraphic(newStateStyle); +} + export function transformToGraphic(style: any) { if (style?.angle) { style.angle = degreeToRadian(style.angle); From ec193bebe750b39a4f3250ee974cb5c6e70aa34a Mon Sep 17 00:00:00 2001 From: kkxxkk2019 Date: Mon, 1 Jul 2024 17:23:04 +0800 Subject: [PATCH 06/29] docs: remove not supported value for word-cloud's colorMode --- docs/assets/option/en/series/word-cloud.md | 3 ++- docs/assets/option/en/series/word-cloud3d.md | 3 ++- docs/assets/option/zh/series/word-cloud.md | 7 ++++--- docs/assets/option/zh/series/word-cloud3d.md | 7 ++++--- packages/vchart/src/series/word-cloud/interface.ts | 3 ++- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/assets/option/en/series/word-cloud.md b/docs/assets/option/en/series/word-cloud.md index fba1918086..6343bf5ceb 100644 --- a/docs/assets/option/en/series/word-cloud.md +++ b/docs/assets/option/en/series/word-cloud.md @@ -46,7 +46,8 @@ Color mode. Optional values: -- `'linear'`: Linear coloring (to be opened) + + - `'ordinal'`: Ordinal coloring #${prefix} colorList(Array) diff --git a/docs/assets/option/en/series/word-cloud3d.md b/docs/assets/option/en/series/word-cloud3d.md index 34d61882ca..fac51e9abf 100644 --- a/docs/assets/option/en/series/word-cloud3d.md +++ b/docs/assets/option/en/series/word-cloud3d.md @@ -44,7 +44,8 @@ Color mode. Optional values: -- `'linear'`: Linear coloring (to be opened) + + - `'ordinal'`: Ordinal coloring #${prefix} colorList(Array) diff --git a/docs/assets/option/zh/series/word-cloud.md b/docs/assets/option/zh/series/word-cloud.md index 893ec438c0..0a82eeb741 100644 --- a/docs/assets/option/zh/series/word-cloud.md +++ b/docs/assets/option/zh/series/word-cloud.md @@ -46,7 +46,8 @@ 可选值: -- `'linear'`: 线性着色(待开放) + + - `'ordinal'`: 序数着色 #${prefix} colorList(Array) @@ -67,7 +68,7 @@ 当 valueField 存在时,默认值[20,40]; 当 valueField 不存在时,默认值[10, 10]。 -自 1.8.7 版本支持'auto'配置。即如果配置为'auto', 则fontSizeRange不传入, 字体大小会随画布大小改变而改变。 +自 1.8.7 版本支持'auto'配置。即如果配置为'auto', 则 fontSizeRange 不传入, 字体大小会随画布大小改变而改变。 #${prefix} maskShape(string) @@ -83,7 +84,7 @@ - `'cardioid'`: 心形 - `'circle'`: 圆形 - `'pentagon'`: 五角形 -- `rect`: 矩形(自1.9.3版本支持) +- `rect`: 矩形(自 1.9.3 版本支持) #${prefix} random(boolean) diff --git a/docs/assets/option/zh/series/word-cloud3d.md b/docs/assets/option/zh/series/word-cloud3d.md index 865dee0191..e980a62d81 100644 --- a/docs/assets/option/zh/series/word-cloud3d.md +++ b/docs/assets/option/zh/series/word-cloud3d.md @@ -44,7 +44,8 @@ 可选值: -- `'linear'`: 线性着色(待开放) + + - `'ordinal'`: 序数着色 #${prefix} colorList(Array) @@ -65,7 +66,7 @@ 当 valueField 存在时,默认值[20,40]; 当 valueField 不存在时,默认值[10, 10]。 -自 1.8.7 版本支持'auto'配置。即如果配置为'auto', 则fontSizeRange不传入, 字体大小会随画布大小改变而改变。 +自 1.8.7 版本支持'auto'配置。即如果配置为'auto', 则 fontSizeRange 不传入, 字体大小会随画布大小改变而改变。 #${prefix} maskShape(string) @@ -81,7 +82,7 @@ - `'cardioid'`: 心形 - `'circle'`: 圆形 - `'pentagon'`: 五角形 -- `rect`: 矩形(自1.9.3版本支持) +- `rect`: 矩形(自 1.9.3 版本支持) #${prefix} random(boolean) diff --git a/packages/vchart/src/series/word-cloud/interface.ts b/packages/vchart/src/series/word-cloud/interface.ts index 2747fc6ef7..82eff26e77 100644 --- a/packages/vchart/src/series/word-cloud/interface.ts +++ b/packages/vchart/src/series/word-cloud/interface.ts @@ -213,8 +213,9 @@ export interface IWordCloudSeriesBaseSpec extends ISeriesSpec, IAnimationSpec Date: Mon, 1 Jul 2024 17:24:38 +0800 Subject: [PATCH 07/29] fix: markPoint's property fix, `coordinate` not `coordinates` --- docs/assets/option/en/component/mark-point.md | 5 +-- docs/assets/option/zh/component/mark-point.md | 39 +++++++++++-------- .../marker/mark-point/interface/spec.ts | 2 +- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/docs/assets/option/en/component/mark-point.md b/docs/assets/option/en/component/mark-point.md index 381593195c..bc5334d201 100644 --- a/docs/assets/option/en/component/mark-point.md +++ b/docs/assets/option/en/component/mark-point.md @@ -50,7 +50,7 @@ Since the `1.11.0` version, you can configure the geographical location of the a ** Note that this property is used in a geographic coordinate system ** -### coordinates(Object) +### coordinate(Object) Mark target: data element. Specifies the mark area for the data point. Draw the mark area based on the specified data point. @@ -296,7 +296,6 @@ For mark content type 'richText', the richText style. Supported since version `1.11.1`, prefixed tag. - #### offset The gap between the marked content and the marked line. @@ -318,4 +317,4 @@ The style of targetSymbol. {{ use: graphic-symbol( prefix = '####' -) }} \ No newline at end of file +) }} diff --git a/docs/assets/option/zh/component/mark-point.md b/docs/assets/option/zh/component/mark-point.md index 0f9bcf1090..bba755a413 100644 --- a/docs/assets/option/zh/component/mark-point.md +++ b/docs/assets/option/zh/component/mark-point.md @@ -27,25 +27,30 @@ - 回调函数 ### angle(string|number|function) -自`1.11.0`版本开始支持, 该参考线在极坐标系的angle轴上, 可以配置标注点在angle轴上的值, 或者聚合计算,或者以回调的形式通过数据自行计算。 + +自`1.11.0`版本开始支持, 该参考线在极坐标系的 angle 轴上, 可以配置标注点在 angle 轴上的值, 或者聚合计算,或者以回调的形式通过数据自行计算。 **注意该属性的使用场景为极坐标系下:** + 1. 配合配置 angle,radius 属性,用于标注坐标在(angle, radius)上的数据点 ### radius(string|number|function) -自`1.11.0`版本开始支持, 可以配置标注点在angle轴上的值, 或者聚合计算,或者以回调的形式通过数据自行计算。 + +自`1.11.0`版本开始支持, 可以配置标注点在 angle 轴上的值, 或者聚合计算,或者以回调的形式通过数据自行计算。 **注意该属性的使用场景为极坐标系下:** + 1. 配合配置 angle,radius 属性,用于标注坐标在(angle, radius)上的数据点 ### areaName(string|number|function) + 自`1.11.0`版本开始支持, 可以配置标注点在地图上的地理位置, 以回调的形式通过数据自行计算。 **注意该属性的使用场景为地理坐标系** {{ use: component-marker-aggregation-type() }} -### coordinates(Object) +### coordinate(Object) 标注目标:数据元素。 指定数据点的标注区域。基于指定数据点进行标注区域的绘制。 @@ -104,9 +109,7 @@ #### arcRatio(number) -自`1.11.1`版本支持, 当type为type-arc时生效, 数值决定圆心到终点连线的偏移量, 绝对值越小, 曲率越大, 符号决定法向, 不能等于0。 - - +自`1.11.1`版本支持, 当 type 为 type-arc 时生效, 数值决定圆心到终点连线的偏移量, 绝对值越小, 曲率越大, 符号决定法向, 不能等于 0。 #### decorativeLine(Object) @@ -185,22 +188,26 @@ 标注内容相对于标注点的 x 方向偏移量。 -除了直接配置偏移量数值外,自`1.11.0` 版本起提供了: -1. `'regionRight' | 'regionLeft'`: 用于放置在region最左端或最右端。 +除了直接配置偏移量数值外,自`1.11.0` 版本起提供了: + +1. `'regionRight' | 'regionLeft'`: 用于放置在 region 最左端或最右端。 2. 回调形式 + ```ts -(region: IRegion) => number +(region: IRegion) => number; ``` #### offsetY(number) 标注内容相对于标注点的 y 方向偏移量。 -除了直接配置偏移量数值外,自`1.11.0` 版本起提供了: -1. `'regionTop' | 'regionBottom'`: 用于放置在region最顶端或最底端。 +除了直接配置偏移量数值外,自`1.11.0` 版本起提供了: + +1. `'regionTop' | 'regionBottom'`: 用于放置在 region 最顶端或最底端。 2. 回调形式 + ```ts -(region: IRegion) => number +(region: IRegion) => number; ``` {{ use: component-marker-ref( @@ -208,9 +215,11 @@ ) }} #### confine(boolean) = false + 自 1.8.7 版本开始, 是否自动调整 item content 使其展示在 marker 可见区域内。 #### symbol(Object) + 标注内容类型为 symbol 时, 状态和样式配置。 {{ use: component-marker-state( @@ -230,6 +239,7 @@ ) }} #### image(Object) + 标注内容类型为 image 时, 状态和样式配置。 {{ use: component-marker-state( @@ -256,6 +266,7 @@ ) }} #### richText(Object) + 标注内容类型为 richText 时, 状态和样式配置。 {{ use: component-marker-style-callback( @@ -281,14 +292,10 @@ animationType = 'callIn | fadeIn' ) }} - ### targetSymbol(Object) 自`1.11.1`版本支持, 前置标记。 - - - #### offset 被标注内容与标记线间的间隙。 diff --git a/packages/vchart/src/component/marker/mark-point/interface/spec.ts b/packages/vchart/src/component/marker/mark-point/interface/spec.ts index 092085682e..0750b986de 100644 --- a/packages/vchart/src/component/marker/mark-point/interface/spec.ts +++ b/packages/vchart/src/component/marker/mark-point/interface/spec.ts @@ -73,7 +73,7 @@ export type IMarkPointCoordinateSpec = { /** * 指定数据点的参考线。基于指定数据点进行参考线的绘制,可以对数据点进行数据处理 */ - coordinates: IDataPointSpec; + coordinate: IDataPointSpec; /** * 对每个数据点转化后的画布坐标点进行偏移,该偏移值可以是像素值,也可以是 string 类型,如 '20%' 代表百分比 * 每个元素对应一个坐标点的偏移量 From 5bb4d4544a8ecbc1a25bd5e244e1e5a5a54feee2 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 1 Jul 2024 17:26:41 +0800 Subject: [PATCH 08/29] docs: update configuration docs --- .../en/component/indicator/indicator-item.md | 18 +++++++++++++++++- .../zh/component/indicator/indicator-item.md | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/assets/option/en/component/indicator/indicator-item.md b/docs/assets/option/en/component/indicator/indicator-item.md index 0fc8b4b4af..079d351797 100644 --- a/docs/assets/option/en/component/indicator/indicator-item.md +++ b/docs/assets/option/en/component/indicator/indicator-item.md @@ -37,7 +37,23 @@ Strategies employed in adaptive text computing. Options: #${prefix} style(Object) -Text style +Text style. + +Since version `1.11.7`, in addition to supporting normal attribute assignments, the graphic attributes of the text style also allow configuration of callback functions. For example: + +```ts +indicator: { + visible: true, + content: [ + { + visible: true, + style: { + fill: (data) => data['value'] > 100 ? "red": 'black', + } + } + ] +} +``` ##${prefix} type(string) diff --git a/docs/assets/option/zh/component/indicator/indicator-item.md b/docs/assets/option/zh/component/indicator/indicator-item.md index 6e5b8f53cb..d8adcf1659 100644 --- a/docs/assets/option/zh/component/indicator/indicator-item.md +++ b/docs/assets/option/zh/component/indicator/indicator-item.md @@ -37,7 +37,23 @@ #${prefix} style(Object) -文字样式 +文字样式。 + +自 `1.11.7` 版本后,指标卡文字样式上的图形属性除了支持正常的属性赋值外,也允许配置回调函数。例如: + +```ts +indicator: { + visible: true, + content: [ + { + visible: true, + style: { + fill: (data) => data['value'] > 100 ? "red": 'black', + } + } + ] +} +``` ##${prefix} type(string) From 6e9a80af0e0033d2780de60934d56b92c202d5dd Mon Sep 17 00:00:00 2001 From: kkxxkk2019 Date: Mon, 1 Jul 2024 17:31:35 +0800 Subject: [PATCH 09/29] chore: update rush change log --- .../vchart/fix-type-define_2024-07-01-09-28.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vchart/fix-type-define_2024-07-01-09-28.json diff --git a/common/changes/@visactor/vchart/fix-type-define_2024-07-01-09-28.json b/common/changes/@visactor/vchart/fix-type-define_2024-07-01-09-28.json new file mode 100644 index 0000000000..226d8551a1 --- /dev/null +++ b/common/changes/@visactor/vchart/fix-type-define_2024-07-01-09-28.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "fix: type define fix", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file From 9dcf1a28b4d348bc6155a834f1442fcc05a9ad95 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 1 Jul 2024 17:54:01 +0800 Subject: [PATCH 10/29] docs: update changelog --- ...icator-support-style-callback_2024-07-01-09-28.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vchart/feat-indicator-support-style-callback_2024-07-01-09-28.json diff --git a/common/changes/@visactor/vchart/feat-indicator-support-style-callback_2024-07-01-09-28.json b/common/changes/@visactor/vchart/feat-indicator-support-style-callback_2024-07-01-09-28.json new file mode 100644 index 0000000000..60fada61c0 --- /dev/null +++ b/common/changes/@visactor/vchart/feat-indicator-support-style-callback_2024-07-01-09-28.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "feat: support configuring callback function in indicator text style attributes, #2540", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file From 44fb11d6bf68fb01ed65f5cadf6abb18cb697531 Mon Sep 17 00:00:00 2001 From: purpose233 Date: Tue, 2 Jul 2024 17:20:11 +0800 Subject: [PATCH 11/29] feat: support updateSpec animation parameter --- packages/vchart/src/core/vchart.ts | 14 ++++++++--- .../vchart/src/series/base/base-series.ts | 25 +++++++++++++++++-- packages/vchart/src/series/base/constant.ts | 13 ++++++++++ 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index a4ca248bb2..46e867d902 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -744,13 +744,14 @@ export class VChart implements IVChart { return this._renderSync(option); } - private _updateAnimateState() { + private _updateAnimateState(initial?: boolean) { if (this._option.animation) { + const animationState = initial ? AnimationStateEnum.appear : AnimationStateEnum.update; this._chart?.getAllRegions().forEach(region => { - region.animate?.updateAnimateState(AnimationStateEnum.update, true); + region.animate?.updateAnimateState(animationState, true); }); this._chart?.getAllComponents().forEach(component => { - component.animate?.updateAnimateState(AnimationStateEnum.update, true); + component.animate?.updateAnimateState(animationState, true); }); } } @@ -932,13 +933,18 @@ export class VChart implements IVChart { * @param forceMerge * @returns */ - async updateSpec(spec: ISpec, forceMerge: boolean = false, morphConfig?: IMorphConfig) { + async updateSpec(spec: ISpec, forceMerge: boolean = false, morphConfig?: IMorphConfig, initialAnimate?: boolean) { const result = this._updateSpec(spec, forceMerge); if (!result) { return this as unknown as IVChart; } + if (initialAnimate) { + this.stopAnimation(); + this._updateAnimateState(true); + } + await this.updateCustomConfigAndRerender(result, false, { morphConfig, transformSpec: result.reTransformSpec, diff --git a/packages/vchart/src/series/base/base-series.ts b/packages/vchart/src/series/base/base-series.ts index 18180dae69..a0a4e11029 100644 --- a/packages/vchart/src/series/base/base-series.ts +++ b/packages/vchart/src/series/base/base-series.ts @@ -87,7 +87,7 @@ import { maxInArray } from '@visactor/vutils'; import { ColorOrdinalScale } from '../../scale/color-ordinal-scale'; -import { baseSeriesMark } from './constant'; +import { baseSeriesMark, defaultSeriesIgnoreCheckKeys, defaultSeriesCompileCheckKeys } from './constant'; import { animationConfig, userAnimationConfig, isAnimationEnabledForSeries } from '../../animation/utils'; import { BaseSeriesSpecTransformer } from './base-series-transformer'; import type { EventType } from '@visactor/vgrammar-core'; @@ -1027,7 +1027,11 @@ export abstract class BaseSeries extends BaseModel imp return result; } - ignoreCheckKeys = ignoreCheckKeys ?? { data: true }; + ignoreCheckKeys = { + ...defaultSeriesIgnoreCheckKeys, + ...defaultSeriesCompileCheckKeys, + ...ignoreCheckKeys + }; ignoreCheckKeys.invalidType = true; if (spec.invalidType !== prevSpec.invalidType) { @@ -1065,6 +1069,17 @@ export abstract class BaseSeries extends BaseModel imp result.reCompile = true; } + // check default compile keys + if ( + currentKeys.some(k => { + if (defaultSeriesCompileCheckKeys[k]) { + return !isEqual(spec[k], prevSpec[k]); + } + }) + ) { + result.reCompile = true; + } + if ( currentKeys.some(k => { if (ignoreCheckKeys[k]) { @@ -1107,6 +1122,12 @@ export abstract class BaseSeries extends BaseModel imp if (this._tooltipHelper) { this._tooltipHelper.updateTooltipSpec(); } + + // update animation config + const hasAnimation = isAnimationEnabledForSeries(this); + if (hasAnimation) { + this.initAnimation(); + } } // 首次布局完成后填充系列数据 diff --git a/packages/vchart/src/series/base/constant.ts b/packages/vchart/src/series/base/constant.ts index 6351b1f456..867b5ce4d3 100644 --- a/packages/vchart/src/series/base/constant.ts +++ b/packages/vchart/src/series/base/constant.ts @@ -11,3 +11,16 @@ export const RECT_X = `${PREFIX}_rect_x`; export const RECT_X1 = `${PREFIX}_rect_x1`; export const RECT_Y = `${PREFIX}_rect_y`; export const RECT_Y1 = `${PREFIX}_rect_y1`; + +export const defaultSeriesIgnoreCheckKeys: { [key: string]: true } = { + data: true +}; + +export const defaultSeriesCompileCheckKeys: { [key: string]: true } = { + animation: true, + animationAppear: true, + animationEnter: true, + animationUpdate: true, + animationExit: true, + animationNormal: true +}; From 482873fa83e28d80eb3c11fd28dac2015e0c2850 Mon Sep 17 00:00:00 2001 From: xile611 Date: Wed, 3 Jul 2024 16:23:38 +0800 Subject: [PATCH 12/29] feat: add `userUpdateOptions` to let user specify update type of charts, fix some animation bug --- packages/vchart/src/core/interface.ts | 10 ++++-- packages/vchart/src/core/vchart.ts | 44 +++++++++++++++++++------- packages/vchart/src/model/interface.ts | 1 + 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/packages/vchart/src/core/interface.ts b/packages/vchart/src/core/interface.ts index 162ac0eb56..79cce2c6e1 100644 --- a/packages/vchart/src/core/interface.ts +++ b/packages/vchart/src/core/interface.ts @@ -28,6 +28,7 @@ import type { IChart, IChartSpecInfo } from '../chart/interface'; import type { Stage } from '@visactor/vrender-core'; import type { IContainerSize } from '@visactor/vrender-components'; import type { IBaseScale } from '@visactor/vscale'; +import type { IUpdateSpecResult } from '../model/interface'; export type DataLinkSeries = { /** @@ -119,7 +120,7 @@ export interface IVChart { spec: ISpec, forceMerge?: boolean, morphConfig?: IMorphConfig, - resetMediaQuery?: boolean + userUpdateOptions?: IUpdateSpecResult ) => Promise; /** @@ -128,7 +129,12 @@ export interface IVChart { * @param forceMerge * @returns */ - updateSpecSync: (spec: ISpec, forceMerge?: boolean, morphConfig?: IMorphConfig, resetMediaQuery?: boolean) => void; + updateSpecSync: ( + spec: ISpec, + forceMerge?: boolean, + morphConfig?: IMorphConfig, + userUpdateOptions?: IUpdateSpecResult + ) => void; /** * **同步方法** 模块 spec 更新 diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index 46e867d902..fd289f91b4 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -601,6 +601,12 @@ export class VChart implements IVChart { if (isFunction(updateSpecResult)) { updateSpecResult = updateSpecResult(); } + + if (updateSpecResult.reAnimate) { + this.stopAnimation(); + this._updateAnimateState(true); + } + this._reCompile(updateSpecResult); if (sync) { return this._renderSync(option); @@ -933,18 +939,18 @@ export class VChart implements IVChart { * @param forceMerge * @returns */ - async updateSpec(spec: ISpec, forceMerge: boolean = false, morphConfig?: IMorphConfig, initialAnimate?: boolean) { - const result = this._updateSpec(spec, forceMerge); + async updateSpec( + spec: ISpec, + forceMerge: boolean = false, + morphConfig?: IMorphConfig, + userUpdateOptions?: IUpdateSpecResult + ) { + const result = this._updateSpec(spec, forceMerge, userUpdateOptions); if (!result) { return this as unknown as IVChart; } - if (initialAnimate) { - this.stopAnimation(); - this._updateAnimateState(true); - } - await this.updateCustomConfigAndRerender(result, false, { morphConfig, transformSpec: result.reTransformSpec, @@ -959,8 +965,13 @@ export class VChart implements IVChart { * @param forceMerge * @returns */ - updateSpecSync(spec: ISpec, forceMerge: boolean = false, morphConfig?: IMorphConfig) { - const result = this._updateSpec(spec, forceMerge); + updateSpecSync( + spec: ISpec, + forceMerge: boolean = false, + morphConfig?: IMorphConfig, + userUpdateOptions?: IUpdateSpecResult + ) { + const result = this._updateSpec(spec, forceMerge, userUpdateOptions); if (!result) { return this as unknown as IVChart; @@ -983,7 +994,11 @@ export class VChart implements IVChart { }); } - private _updateSpec(spec: ISpec, forceMerge: boolean = false): IUpdateSpecResult | undefined { + private _updateSpec( + spec: ISpec, + forceMerge: boolean = false, + userUpdateOptions?: IUpdateSpecResult + ): IUpdateSpecResult | undefined { const lastSpec = this._spec; if (!this._setNewSpec(spec, forceMerge)) { @@ -1008,13 +1023,20 @@ export class VChart implements IVChart { } this._initChartSpec(this._spec, 'render'); - return mergeUpdateResult(this._chart.updateSpec(this._spec), { + const res = mergeUpdateResult(this._chart.updateSpec(this._spec), { reTransformSpec: false, change: reSize, reMake: false, reCompile: false, reSize }); + + return userUpdateOptions + ? { + ...res, + ...userUpdateOptions + } + : res; } /** diff --git a/packages/vchart/src/model/interface.ts b/packages/vchart/src/model/interface.ts index 34bad40238..67f71ce640 100644 --- a/packages/vchart/src/model/interface.ts +++ b/packages/vchart/src/model/interface.ts @@ -57,6 +57,7 @@ export interface IUpdateSpecResult { // TODO: compile 的判断应不应该出现在这里? reCompile?: boolean; reTransformSpec?: boolean; + reAnimate?: boolean; } export interface IModelProduct { From c06f20421af7ce5208d1150bc9da0ae19f408962 Mon Sep 17 00:00:00 2001 From: xile611 Date: Wed, 3 Jul 2024 16:24:20 +0800 Subject: [PATCH 13/29] docs: update changlog of rush --- .../feat-updateSpec-animation_2024-07-03-08-24.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vchart/feat-updateSpec-animation_2024-07-03-08-24.json diff --git a/common/changes/@visactor/vchart/feat-updateSpec-animation_2024-07-03-08-24.json b/common/changes/@visactor/vchart/feat-updateSpec-animation_2024-07-03-08-24.json new file mode 100644 index 0000000000..d05250151b --- /dev/null +++ b/common/changes/@visactor/vchart/feat-updateSpec-animation_2024-07-03-08-24.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "feat: add `userUpdateOptions` to let user specify update type of charts, fix some animation bug\n\n", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "dingling112@gmail.com" +} \ No newline at end of file From 1744aea1da410f093e52642f911c5fde3a0dd9c7 Mon Sep 17 00:00:00 2001 From: xile611 Date: Wed, 3 Jul 2024 16:28:25 +0800 Subject: [PATCH 14/29] fix: fix type error in base-series --- packages/vchart/src/series/base/base-series.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/vchart/src/series/base/base-series.ts b/packages/vchart/src/series/base/base-series.ts index a0a4e11029..5ee7fc1200 100644 --- a/packages/vchart/src/series/base/base-series.ts +++ b/packages/vchart/src/series/base/base-series.ts @@ -1071,23 +1071,16 @@ export abstract class BaseSeries extends BaseModel imp // check default compile keys if ( - currentKeys.some(k => { - if (defaultSeriesCompileCheckKeys[k]) { - return !isEqual(spec[k], prevSpec[k]); - } + currentKeys.some((k: string) => { + return defaultSeriesCompileCheckKeys[k] && !isEqual(spec[k], prevSpec[k]); }) ) { result.reCompile = true; } if ( - currentKeys.some(k => { - if (ignoreCheckKeys[k]) { - return false; - } else if (!isEqual(spec[k], prevSpec[k])) { - return true; - } - return false; + currentKeys.some((k: string) => { + return !ignoreCheckKeys[k] && !isEqual(spec[k], prevSpec[k]); }) ) { result.reMake = true; From 7c4c70fee98395a238f2b27f9f7773beb6b1ef94 Mon Sep 17 00:00:00 2001 From: purpose233 Date: Thu, 4 Jul 2024 12:04:55 +0800 Subject: [PATCH 15/29] feat: support user option for updateData --- packages/vchart/src/core/vchart.ts | 35 ++++++++++++++++++-------- packages/vchart/src/model/interface.ts | 4 +++ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index fd289f91b4..2e12bb4cf4 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -67,7 +67,7 @@ import { AnimationStateEnum } from '../animation/interface'; import type { IBoundsLike, ILogger } from '@visactor/vutils'; import { ThemeManager } from '../theme/theme-manager'; import type { ITheme } from '../theme'; -import type { IModel, IUpdateSpecResult } from '../model/interface'; +import type { IModel, IUpdateDataResult, IUpdateSpecResult } from '../model/interface'; import { Compiler } from '../compile/compiler'; import type { IMorphConfig } from '../animation/spec'; import type { ILegend } from '../component/legend/interface'; @@ -804,20 +804,25 @@ export class VChart implements IVChart { * **异步方法** 更新数据。 * @param id 数据 id * @param data 数据值 - * @param options 数据参数 + * @param parserOptions 数据参数 * @returns VChart 实例 */ - async updateData(id: StringOrNumber, data: DataView | Datum[] | string, options?: IParserOptions): Promise { - return this.updateDataSync(id, data, options); + async updateData( + id: StringOrNumber, + data: DataView | Datum[] | string, + parserOptions?: IParserOptions, + userUpdateOptions?: IUpdateDataResult + ): Promise { + return this.updateDataSync(id, data, parserOptions, userUpdateOptions); } - private _updateDataById(id: StringOrNumber, data: DataView | Datum[] | string, options?: IParserOptions) { + private _updateDataById(id: StringOrNumber, data: DataView | Datum[] | string, parserOptions?: IParserOptions) { const preDV = this._spec.data.find((dv: any) => dv.name === id || dv.id === id); if (preDV) { if (preDV.id === id) { preDV.values = data; } else if (preDV.name === id) { - preDV.parse(data, options); + preDV.parse(data, parserOptions); } } else { if (isArray(data)) { @@ -859,15 +864,25 @@ export class VChart implements IVChart { * **同步方法** 更新数据 * @param id 数据 id * @param data 数据值 - * @param options 数据参数 + * @param parserOptions 数据参数 * @returns VChart 实例 */ - updateDataSync(id: StringOrNumber, data: DataView | Datum[] | string, options?: IParserOptions) { + updateDataSync( + id: StringOrNumber, + data: DataView | Datum[] | string, + parserOptions?: IParserOptions, + userUpdateOptions?: IUpdateDataResult + ) { if (isNil(this._dataSet)) { return this as unknown as IVChart; } if (this._chart) { - this._chart.updateData(id, data, true, options); + if (userUpdateOptions.reAnimate) { + this.stopAnimation(); + this._updateAnimateState(true); + } + + this._chart.updateData(id, data, true, parserOptions); // after layout this._compiler.render(); @@ -875,7 +890,7 @@ export class VChart implements IVChart { } this._spec.data = array(this._spec.data); - this._updateDataById(id, data, options); + this._updateDataById(id, data, parserOptions); return this as unknown as IVChart; } diff --git a/packages/vchart/src/model/interface.ts b/packages/vchart/src/model/interface.ts index 67f71ce640..026022abfc 100644 --- a/packages/vchart/src/model/interface.ts +++ b/packages/vchart/src/model/interface.ts @@ -60,6 +60,10 @@ export interface IUpdateSpecResult { reAnimate?: boolean; } +export interface IUpdateDataResult { + reAnimate?: boolean; +} + export interface IModelProduct { srData: IData; } From f76a86d34859b942e5a27cf67fde02fd56cc4afe Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Thu, 4 Jul 2024 15:18:31 +0800 Subject: [PATCH 16/29] fix: `barMaxWidth` not work when configured barWidth --- packages/vchart/src/series/bar/bar.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vchart/src/series/bar/bar.ts b/packages/vchart/src/series/bar/bar.ts index 82d2b75749..4146fba713 100644 --- a/packages/vchart/src/series/bar/bar.ts +++ b/packages/vchart/src/series/bar/bar.ts @@ -689,12 +689,12 @@ export class BarSeries extends Cartes const bandWidth = axisHelper.getBandwidth?.(depth - 1) ?? DefaultBandWidth; const hasBarWidth = this._spec.barWidth !== undefined && depth === depthFromSpec; - if (hasBarWidth) { - return getActualNumValue(this._spec.barWidth, bandWidth); - } const hasBarMinWidth = this._spec.barMinWidth !== undefined; const hasBarMaxWidth = this._spec.barMaxWidth !== undefined; let width = bandWidth; + if (hasBarWidth) { + width = getActualNumValue(this._spec.barWidth, bandWidth); + } if (hasBarMinWidth) { width = Math.max(width, getActualNumValue(this._spec.barMinWidth, bandWidth)); } From 472dfef207ea7a144a99c646f91cd874551fbdfe Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Thu, 4 Jul 2024 15:22:19 +0800 Subject: [PATCH 17/29] docs: update changelog --- .../fix-barMaxWidth-not-work_2024-07-04-07-22.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vchart/fix-barMaxWidth-not-work_2024-07-04-07-22.json diff --git a/common/changes/@visactor/vchart/fix-barMaxWidth-not-work_2024-07-04-07-22.json b/common/changes/@visactor/vchart/fix-barMaxWidth-not-work_2024-07-04-07-22.json new file mode 100644 index 0000000000..fa91760b0d --- /dev/null +++ b/common/changes/@visactor/vchart/fix-barMaxWidth-not-work_2024-07-04-07-22.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "fix: fix the issue where `barMaxWidth` does not work when `barWidth` is configured, #2885`", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file From c5bb9788743ccce33c3194eff1add8bf06ca7a98 Mon Sep 17 00:00:00 2001 From: skie1997 Date: Thu, 4 Jul 2024 15:32:19 +0800 Subject: [PATCH 18/29] chore: test erro --- packages/vchart/src/core/vchart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index 2e12bb4cf4..e61c13689e 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -877,7 +877,7 @@ export class VChart implements IVChart { return this as unknown as IVChart; } if (this._chart) { - if (userUpdateOptions.reAnimate) { + if (userUpdateOptions?.reAnimate) { this.stopAnimation(); this._updateAnimateState(true); } From f5a04c2c9073ee6e4348ebf32b337896dbef7163 Mon Sep 17 00:00:00 2001 From: skie1997 Date: Thu, 4 Jul 2024 16:39:14 +0800 Subject: [PATCH 19/29] feat: add options for updateFullDataSync --- packages/vchart/src/core/vchart.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index e61c13689e..4ec504c1b2 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -900,8 +900,16 @@ export class VChart implements IVChart { * @returns VChart 实例 * @since 1.3.0 */ - updateFullDataSync(data: IDataValues | IDataValues[], reRender: boolean = true) { + updateFullDataSync( + data: IDataValues | IDataValues[], + reRender: boolean = true, + userUpdateOptions?: IUpdateSpecResult + ) { if (this._chart) { + if (userUpdateOptions?.reAnimate) { + this.stopAnimation(); + this._updateAnimateState(true); + } this._chart.updateFullData(data); if (reRender) { this._compiler.render(); From aa437dd26c9ff3dde2ff952be1b4f017d1aafd5c Mon Sep 17 00:00:00 2001 From: skie1997 Date: Fri, 5 Jul 2024 17:32:11 +0800 Subject: [PATCH 20/29] fix(crosshair): fix bug of crosshair position when legend filter data. fix#2905 --- ...ix-crosshari-pos-error_2024-07-05-09-31.json | 10 ++++++++++ .../vchart/src/component/crosshair/cartesian.ts | 17 +++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 common/changes/@visactor/vchart/fix-crosshari-pos-error_2024-07-05-09-31.json diff --git a/common/changes/@visactor/vchart/fix-crosshari-pos-error_2024-07-05-09-31.json b/common/changes/@visactor/vchart/fix-crosshari-pos-error_2024-07-05-09-31.json new file mode 100644 index 0000000000..9aea2a048c --- /dev/null +++ b/common/changes/@visactor/vchart/fix-crosshari-pos-error_2024-07-05-09-31.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "fix(crosshair): fix bug of crosshair position when legend filter data. fix#2905", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file diff --git a/packages/vchart/src/component/crosshair/cartesian.ts b/packages/vchart/src/component/crosshair/cartesian.ts index 424e09b05e..6151aa7780 100644 --- a/packages/vchart/src/component/crosshair/cartesian.ts +++ b/packages/vchart/src/component/crosshair/cartesian.ts @@ -220,24 +220,29 @@ export class CartesianCrossHair dimData.datum.length > 0); + let pos; + if (datumIndex > -1) { + const dimensionData = dimensionInfo.data[datumIndex]; + pos = dimensionData.series.dataToPosition(dimensionData.datum[0]); + } const isY = isValid(dimensionInfo.dimType) ? dimensionInfo.dimType === 'y' : isYAxis(dimensionInfo?.axis?.getOrient() as IOrientType); if (isY) { - y = pos.y; + y = pos?.y; } else { - x = pos.x; + x = pos?.x; } } else if (activeType === 'mark') { const dimensionData = (tooltipData as IDimensionData[])[0]; const pos = dimensionData.series.dataToPosition(dimensionData.datum[0]); - x = pos.x; - y = pos.y; + x = pos?.x; + y = pos?.y; } } From efb067997438b73f61c7997d90cdc0ae13f03fbb Mon Sep 17 00:00:00 2001 From: skie1997 Date: Fri, 5 Jul 2024 19:02:14 +0800 Subject: [PATCH 21/29] fix(barbackground): datakey is undefined when set custom datakey --- .../vchart/fix-bar-background_2024-07-05-11-01.json | 10 ++++++++++ packages/vchart/src/series/bar/bar.ts | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 common/changes/@visactor/vchart/fix-bar-background_2024-07-05-11-01.json diff --git a/common/changes/@visactor/vchart/fix-bar-background_2024-07-05-11-01.json b/common/changes/@visactor/vchart/fix-bar-background_2024-07-05-11-01.json new file mode 100644 index 0000000000..cb7acfa117 --- /dev/null +++ b/common/changes/@visactor/vchart/fix-bar-background_2024-07-05-11-01.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "fix(barbackground): datakey is undefined when set custom datakey", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file diff --git a/packages/vchart/src/series/bar/bar.ts b/packages/vchart/src/series/bar/bar.ts index 82d2b75749..f08902846d 100644 --- a/packages/vchart/src/series/bar/bar.ts +++ b/packages/vchart/src/series/bar/bar.ts @@ -7,6 +7,7 @@ import type { IMark, IMarkProgressiveConfig } from '../../mark/interface'; import { MarkTypeEnum } from '../../mark/interface/type'; import { AttributeLevel, + DEFAULT_DATA_KEY, STACK_FIELD_END, STACK_FIELD_END_PERCENT, STACK_FIELD_START, @@ -171,11 +172,13 @@ export class BarSeries extends Cartes continue; } const newDataCollect: Datum[] = []; + const dataKey = (this._spec.dataKey as string) ?? DEFAULT_DATA_KEY; for (let j = 0; j < values.length; j++) { for (let k = 0; k < dataCollect.length; k++) { newDataCollect.push({ ...dataCollect[k], - [field]: values[j] + [field]: values[j], + [dataKey]: values[j] }); } } From 390613760079f92318d47c1582b1e038dcc79610 Mon Sep 17 00:00:00 2001 From: xile611 Date: Sat, 6 Jul 2024 14:00:49 +0800 Subject: [PATCH 22/29] feat: add options `hideTimer` in toolti, to hide tooltip by timer --- docs/assets/option/en/component/tooltip.md | 8 +++++++ docs/assets/option/zh/component/crosshair.md | 23 +++++++++---------- docs/assets/option/zh/component/tooltip.md | 8 +++++++ .../runtime/browser/test-page/area.ts | 3 +++ .../src/component/tooltip/interface/spec.ts | 5 ++++ .../vchart/src/component/tooltip/tooltip.ts | 15 ++++++++++-- 6 files changed, 48 insertions(+), 14 deletions(-) diff --git a/docs/assets/option/en/component/tooltip.md b/docs/assets/option/en/component/tooltip.md index 5dd913448d..eb619ed6cc 100644 --- a/docs/assets/option/en/component/tooltip.md +++ b/docs/assets/option/en/component/tooltip.md @@ -40,6 +40,14 @@ Locks the tooltip after clicking, usually used in scenarios where `trigger` is ` **_(works on all handlers)_** +##${prefix} hideTimer(Number) + +Supported since version `1.11.7` + +hide the tooltip after a certain time, the unit is `ms`. + +this option not work with `triggerOff` set to `'none'`. + ##${prefix} mark(Object) Customized configuration of the mark tooltip. **_(supports setting on series)(only works on default handler)_** diff --git a/docs/assets/option/zh/component/crosshair.md b/docs/assets/option/zh/component/crosshair.md index afea5783a9..2668000444 100644 --- a/docs/assets/option/zh/component/crosshair.md +++ b/docs/assets/option/zh/component/crosshair.md @@ -39,19 +39,18 @@ crosshair 的触发方式,默认为 'hover',即鼠标悬浮时触发。可 配置十字准星指示器是否跟随`tooltip`显示或者隐藏;注意当使用这种触发模式时,`crosshais`本身的`trigger`、`triggerOff`、`lockAfterClick`这三个配置,将不再生效 当`followTooltip`为对象格式时,类型定义如下: - - ```ts - { - group?: boolean; - mark?: boolean; - dimension?: boolean; - } - ``` - - * `followTooltip.group` 的值为`false`,表示显示的`tooltip`类型为`group`(即分组信息提示)时,不显示`crosshair` - * `followTooltip.mark` 的值为`false`,表示显示的`tooltip`类型为`mark`(即mark标记信息提示)时,不显示`crosshair` - * `followTooltip.dimension` 的值为`false`,表示显示的`tooltip`类型为`dimension`(即维度信息提示)时,不显示`crosshair` +```ts +{ + group?: boolean; + mark?: boolean; + dimension?: boolean; +} +``` + +- `followTooltip.group` 的值为`false`,表示显示的`tooltip`类型为`group`(即分组信息提示)时,不显示`crosshair` +- `followTooltip.mark` 的值为`false`,表示显示的`tooltip`类型为`mark`(即 mark 标记信息提示)时,不显示`crosshair` +- `followTooltip.dimension` 的值为`false`,表示显示的`tooltip`类型为`dimension`(即维度信息提示)时,不显示`crosshair` ### labelZIndex(number) = 500 diff --git a/docs/assets/option/zh/component/tooltip.md b/docs/assets/option/zh/component/tooltip.md index 38ea0b8c0a..15368879fc 100644 --- a/docs/assets/option/zh/component/tooltip.md +++ b/docs/assets/option/zh/component/tooltip.md @@ -40,6 +40,14 @@ tooltip 配置。 **_(作用于所有 handler)_** +##${prefix} hideTimer(Number) + +`1.11.7` 版本后支持该配置; + +定时隐藏 tooltip,单位为 `ms`。 + +当 `triggerOff` 设置为 `'none'` 时,该配置不生效。 + ##${prefix} mark(Object) 图元 tooltip 的自定义配置。 **_(支持在系列上设置)(只作用于默认 handler)_** diff --git a/packages/vchart/__tests__/runtime/browser/test-page/area.ts b/packages/vchart/__tests__/runtime/browser/test-page/area.ts index a718100b7e..d4570bc481 100644 --- a/packages/vchart/__tests__/runtime/browser/test-page/area.ts +++ b/packages/vchart/__tests__/runtime/browser/test-page/area.ts @@ -55,6 +55,7 @@ const spec: IAreaChartSpec = { seriesField: 'country', legends: [{ visible: true, position: 'middle', orient: 'bottom' }], crosshair: { + followTooltip: true, xField: { visible: true, label: { visible: true } }, yField: { visible: true, label: { visible: true } } }, @@ -97,6 +98,8 @@ const spec: IAreaChartSpec = { } }, tooltip: { + trigger: 'click', + hideTimer: 3000, group: { triggerMark: ['point'] } diff --git a/packages/vchart/src/component/tooltip/interface/spec.ts b/packages/vchart/src/component/tooltip/interface/spec.ts index 8bd24b8f0f..cc5163fb19 100644 --- a/packages/vchart/src/component/tooltip/interface/spec.ts +++ b/packages/vchart/src/component/tooltip/interface/spec.ts @@ -41,6 +41,11 @@ export interface ITooltipSpec * (*会影响自定义handler) */ triggerOff?: MaybeArray<'hover' | 'click'> | 'none'; + /** + * 隐藏计时器 + * @since 1.11.7 + */ + hideTimer?: number; /** * 点击后锁定,只有点击才可以更新位置或者解锁,通常用于 trigger 为 `['hover', 'click']` 的场景 * (*会影响自定义handler) diff --git a/packages/vchart/src/component/tooltip/tooltip.ts b/packages/vchart/src/component/tooltip/tooltip.ts index a76bdaa1e4..b3a73b55e6 100644 --- a/packages/vchart/src/component/tooltip/tooltip.ts +++ b/packages/vchart/src/component/tooltip/tooltip.ts @@ -50,7 +50,7 @@ export class Tooltip extends BaseComponent implements ITooltip { specKey = 'tooltip'; layoutType: 'none' = 'none'; - + private _timer?: number; protected declare _spec: ITooltipSpec; static getSpecInfo(chartSpec: any): Maybe { @@ -132,6 +132,9 @@ export class Tooltip extends BaseComponent implements ITooltip { release() { super.release(); + if (this._timer) { + clearTimeout(this._timer); + } this._eventList.forEach(({ eventType, handler }) => { this.event.off(eventType, handler); @@ -240,7 +243,7 @@ export class Tooltip extends BaseComponent implements ITooltip { this._handleChartMouseOut(params); }; - protected _handleChartMouseOut = (params: BaseEventParams) => { + protected _handleChartMouseOut = (params?: BaseEventParams) => { if (this._alwaysShow) { return; } @@ -365,6 +368,14 @@ export class Tooltip extends BaseComponent implements ITooltip { this._isTooltipShown = true; if (isClick && this._spec.lockAfterClick && !this._clickLock) { this._clickLock = true; + } else if (Number.isFinite(this._spec.hideTimer)) { + if (this._timer) { + clearTimeout(this._timer); + } + + this._timer = setTimeout(() => { + this._handleChartMouseOut(); + }, this._spec.hideTimer as number) as unknown as number; } } // 全局唯一 tooltip From 75889806ce45ff653bdb90e6b741db7764eaf78b Mon Sep 17 00:00:00 2001 From: xile611 Date: Sat, 6 Jul 2024 14:04:02 +0800 Subject: [PATCH 23/29] docs: update changlog of rush --- .../feat-tooltip-hide-timer_2024-07-06-06-04.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vchart/feat-tooltip-hide-timer_2024-07-06-06-04.json diff --git a/common/changes/@visactor/vchart/feat-tooltip-hide-timer_2024-07-06-06-04.json b/common/changes/@visactor/vchart/feat-tooltip-hide-timer_2024-07-06-06-04.json new file mode 100644 index 0000000000..dcc611869a --- /dev/null +++ b/common/changes/@visactor/vchart/feat-tooltip-hide-timer_2024-07-06-06-04.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "feat: add options `hideTimer` in toolti, to hide tooltip by timer\n\n", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "dingling112@gmail.com" +} \ No newline at end of file From 602231b8bd86beb66ae40fcad7aa942321404042 Mon Sep 17 00:00:00 2001 From: skie1997 Date: Sat, 6 Jul 2024 07:04:29 +0000 Subject: [PATCH 24/29] docs: generate changelog of release v1.11.7 --- docs/assets/changelog/en/release.md | 23 ++++++++++++++++++++ docs/assets/changelog/zh/release.md | 23 ++++++++++++++++++++ packages/harmony_vchart/library/CHANGELOG.md | 23 ++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/docs/assets/changelog/en/release.md b/docs/assets/changelog/en/release.md index 4e9730a984..d35ed42167 100644 --- a/docs/assets/changelog/en/release.md +++ b/docs/assets/changelog/en/release.md @@ -1,3 +1,26 @@ +# v1.11.7 + +2024-07-06 + + +**🆕 New feature** + +- **@visactor/vchart**: support configuring callback function in indicator text style attributes, [#2540](https://github.com/VisActor/VChart/issues/2540) +- **@visactor/vchart**: add options `hideTimer` in toolti, to hide tooltip by timer +- **@visactor/vchart**: support `updateIndicatorDataById`/`updateIndicatorDataByIndex` API, related [#2776](https://github.com/VisActor/VChart/issues/2776) +- **@visactor/vchart**: add `userUpdateOptions` to let user specify update type of charts, fix some animation bug + +**🐛 Bug fix** + +- **barbackground**: datakey is undefined when set custom datakey fix [#2908](https://github.com/VisActor/VChart/issues/2908) +- **@visactor/vchart**: fix the issue where `barMaxWidth` does not work when `barWidth` is configured, [#2885](https://github.com/VisActor/VChart/issues/2885)` +- **@visactor/vchart**: line/area clip animation by incorrect direction +- **crosshair**: fix bug of crosshair position when legend filter data. fix [#2905](https://github.com/VisActor/VChart/issues/2905) +- **@visactor/vchart**: fix polar animation logic for radar charts +- **@visactor/vchart**: type define fix + +[more detail about v1.11.7](https://github.com/VisActor/VChart/releases/tag/v1.11.7) + # v1.11.6 2024-06-27 diff --git a/docs/assets/changelog/zh/release.md b/docs/assets/changelog/zh/release.md index c6986d87d0..d6314d719f 100644 --- a/docs/assets/changelog/zh/release.md +++ b/docs/assets/changelog/zh/release.md @@ -1,3 +1,26 @@ +# v1.11.7 + +2024-07-06 + + +**🆕 新增功能** + +- **@visactor/vchart**: support configuring callback function in indicator text style attributes, [#2540](https://github.com/VisActor/VChart/issues/2540) +- **@visactor/vchart**: add options `hideTimer` in toolti, to hide tooltip by timer +- **@visactor/vchart**: support `updateIndicatorDataById`/`updateIndicatorDataByIndex` API, related [#2776](https://github.com/VisActor/VChart/issues/2776) +- **@visactor/vchart**: add `userUpdateOptions` to let user specify update type of charts, fix some animation bug + +**🐛 功能修复** + +- **barbackground**: datakey is undefined when set custom datakey fix [#2908](https://github.com/VisActor/VChart/issues/2908) +- **@visactor/vchart**: fix the issue where `barMaxWidth` does not work when `barWidth` is configured, [#2885](https://github.com/VisActor/VChart/issues/2885)` +- **@visactor/vchart**: line/area clip animation by incorrect direction +- **crosshair**: fix bug of crosshair position when legend filter data. fix [#2905](https://github.com/VisActor/VChart/issues/2905) +- **@visactor/vchart**: fix polar animation logic for radar charts +- **@visactor/vchart**: type define fix + +[更多详情请查看 v1.11.7](https://github.com/VisActor/VChart/releases/tag/v1.11.7) + # v1.11.6 2024-06-27 diff --git a/packages/harmony_vchart/library/CHANGELOG.md b/packages/harmony_vchart/library/CHANGELOG.md index f5c074ce23..a987acf4b9 100644 --- a/packages/harmony_vchart/library/CHANGELOG.md +++ b/packages/harmony_vchart/library/CHANGELOG.md @@ -1,3 +1,26 @@ +# v1.11.7 + +2024-07-06 + + +**🆕 New feature** + +- **@visactor/vchart**: support configuring callback function in indicator text style attributes, [#2540](https://github.com/VisActor/VChart/issues/2540) +- **@visactor/vchart**: add options `hideTimer` in toolti, to hide tooltip by timer +- **@visactor/vchart**: support `updateIndicatorDataById`/`updateIndicatorDataByIndex` API, related [#2776](https://github.com/VisActor/VChart/issues/2776) +- **@visactor/vchart**: add `userUpdateOptions` to let user specify update type of charts, fix some animation bug + +**🐛 Bug fix** + +- **barbackground**: datakey is undefined when set custom datakey fix [#2908](https://github.com/VisActor/VChart/issues/2908) +- **@visactor/vchart**: fix the issue where `barMaxWidth` does not work when `barWidth` is configured, [#2885](https://github.com/VisActor/VChart/issues/2885)` +- **@visactor/vchart**: line/area clip animation by incorrect direction +- **crosshair**: fix bug of crosshair position when legend filter data. fix [#2905](https://github.com/VisActor/VChart/issues/2905) +- **@visactor/vchart**: fix polar animation logic for radar charts +- **@visactor/vchart**: type define fix + +[more detail about v1.11.7](https://github.com/VisActor/VChart/releases/tag/v1.11.7) + # v1.11.6 2024-06-27 From dc670f68d26370325cca405f8c0bf49b3d4d2673 Mon Sep 17 00:00:00 2001 From: skie1997 Date: Sat, 6 Jul 2024 15:37:24 +0800 Subject: [PATCH 25/29] chore: release note --- docs/assets/changelog/en/release.md | 61 ++++++++++++++--------------- docs/assets/changelog/zh/release.md | 45 +++++++++++---------- 2 files changed, 52 insertions(+), 54 deletions(-) diff --git a/docs/assets/changelog/en/release.md b/docs/assets/changelog/en/release.md index d35ed42167..7d9558060a 100644 --- a/docs/assets/changelog/en/release.md +++ b/docs/assets/changelog/en/release.md @@ -1,42 +1,41 @@ -# v1.11.7 - -2024-07-06 - - -**🆕 New feature** - -- **@visactor/vchart**: support configuring callback function in indicator text style attributes, [#2540](https://github.com/VisActor/VChart/issues/2540) -- **@visactor/vchart**: add options `hideTimer` in toolti, to hide tooltip by timer -- **@visactor/vchart**: support `updateIndicatorDataById`/`updateIndicatorDataByIndex` API, related [#2776](https://github.com/VisActor/VChart/issues/2776) -- **@visactor/vchart**: add `userUpdateOptions` to let user specify update type of charts, fix some animation bug - -**🐛 Bug fix** - -- **barbackground**: datakey is undefined when set custom datakey fix [#2908](https://github.com/VisActor/VChart/issues/2908) -- **@visactor/vchart**: fix the issue where `barMaxWidth` does not work when `barWidth` is configured, [#2885](https://github.com/VisActor/VChart/issues/2885)` +# v1.11.7 + +2024-07-06 + +**🆕 New feature** + +- **@visactor/vchart**: support configuring callback function in indicator text style attributes, related [#2540](https://github.com/VisActor/VChart/issues/2540) +- **@visactor/vchart**: add options hideTimer in tooltip, to hide tooltip by timer +- **@visactor/vchart**: support updateIndicatorDataById/updateIndicatorDataByIndex API, related [#2776](https://github.com/VisActor/VChart/issues/2776) +- **@visactor/vchart**: add userUpdateOptions to let user specify update type of charts, fix some animation bug + +**🐛 Bug fix** + +- **barbackground**: datakey is undefined when set custom datakey fix[#2908](https://github.com/VisActor/VChart/issues/2908) +- **@visactor/vchart**: fix the issue where barMaxWidth does not work when barWidth is configured, fix[#2885](https://github.com/VisActor/VChart/issues/2885) - **@visactor/vchart**: line/area clip animation by incorrect direction -- **crosshair**: fix bug of crosshair position when legend filter data. fix [#2905](https://github.com/VisActor/VChart/issues/2905) +- **crosshair**: fix bug of crosshair position when legend filter data. fix fix[#2905](https://github.com/VisActor/VChart/issues/2905) - **@visactor/vchart**: fix polar animation logic for radar charts -- **@visactor/vchart**: type define fix - -[more detail about v1.11.7](https://github.com/VisActor/VChart/releases/tag/v1.11.7) - -# v1.11.6 - -2024-06-27 - - -**🐛 Bug fix** +- **@visactor/vchart**: type define fix + +[more detail about v1.11.7](https://github.com/VisActor/VChart/releases/tag/v1.11.7) + +# v1.11.6 + +2024-06-27 + + +**🐛 Bug fix** - **@visactor/vchart**: background of chart should support gradient color - **animation**: rose animation not work when update twice. fix[#2856](https://github.com/VisActor/VChart/issues/2856) - **@visactor/vchart**: fix the type of `ITooltipTheme`, fix [#2850](https://github.com/VisActor/VChart/issues/2850) - **@visactor/vchart**: fix the issue of update animation not executed when updateSpec, [#2835](https://github.com/VisActor/VChart/issues/2835) [#2836](https://github.com/VisActor/VChart/issues/2836) - - -[more detail about v1.11.6](https://github.com/VisActor/VChart/releases/tag/v1.11.6) - + + +[more detail about v1.11.6](https://github.com/VisActor/VChart/releases/tag/v1.11.6) + # v1.11.5 2024-06-21 diff --git a/docs/assets/changelog/zh/release.md b/docs/assets/changelog/zh/release.md index d6314d719f..f838dba723 100644 --- a/docs/assets/changelog/zh/release.md +++ b/docs/assets/changelog/zh/release.md @@ -1,26 +1,25 @@ -# v1.11.7 - -2024-07-06 - - -**🆕 新增功能** - -- **@visactor/vchart**: support configuring callback function in indicator text style attributes, [#2540](https://github.com/VisActor/VChart/issues/2540) -- **@visactor/vchart**: add options `hideTimer` in toolti, to hide tooltip by timer -- **@visactor/vchart**: support `updateIndicatorDataById`/`updateIndicatorDataByIndex` API, related [#2776](https://github.com/VisActor/VChart/issues/2776) -- **@visactor/vchart**: add `userUpdateOptions` to let user specify update type of charts, fix some animation bug - -**🐛 功能修复** - -- **barbackground**: datakey is undefined when set custom datakey fix [#2908](https://github.com/VisActor/VChart/issues/2908) -- **@visactor/vchart**: fix the issue where `barMaxWidth` does not work when `barWidth` is configured, [#2885](https://github.com/VisActor/VChart/issues/2885)` -- **@visactor/vchart**: line/area clip animation by incorrect direction -- **crosshair**: fix bug of crosshair position when legend filter data. fix [#2905](https://github.com/VisActor/VChart/issues/2905) -- **@visactor/vchart**: fix polar animation logic for radar charts -- **@visactor/vchart**: type define fix - -[更多详情请查看 v1.11.7](https://github.com/VisActor/VChart/releases/tag/v1.11.7) - +# v1.11.7 + +2024-07-06 + +**🆕 新增功能** + +- **@visactor/vchart**:支持在指标文本样式属性中配置回调函数,相关[#2540](https://github.com/VisActor/VChart/issues/2540) +- **@visactor/vchart**:在工具提示中添加选项 hideTimer,以通过计时器隐藏工具提示 +- **@visactor/vchart**:支持 updateIndicatorDataById/updateIndicatorDataByIndex API,相关 [#2776](https://github.com/VisActor/VChart/issues/2776) +- **@visactor/vchart**:添加 userUpdateOptions 让用户指定图表的更新类型,修复一些动画错误 + +**🐛功能修复** + +- **barbackground**:设置自定义数据键修复时数据键未定义[#2908](https://github.com/VisActor/VChart/issues/2908) +- **@visactor/vchart**:修复配置 barWidth 时 barMaxWidth 不起作用的问题,修复[#2885](https://github.com/VisActor/VChart/issues/2885) +- **@visactor/vchart**:方向不正确的线/区域剪辑动画 +- **十字线**:修复图例过滤数据时十字线位置的错误。修复修复[#2905](https://github.com/VisActor/VChart/issues/2905) +- **@visactor/vchart**:修复雷达图的极坐标动画逻辑 +- **@visactor/vchart**:类型定义修复 + +[更多详情请查看 v1.11.7](https://github.com/VisActor/VChart/releases/tag/v1.11.7) + # v1.11.6 2024-06-27 From 7ea32878996d47e563bb67633e87a9f19400b728 Mon Sep 17 00:00:00 2001 From: skie1997 Date: Sat, 6 Jul 2024 15:54:49 +0800 Subject: [PATCH 26/29] chore: upgrade vrender and vgrammar --- common/config/rush/pnpm-lock.yaml | 207 ++++++++++++++----------- docs/package.json | 6 +- packages/openinula-vchart/package.json | 6 +- packages/react-vchart/package.json | 6 +- packages/vchart-extension/package.json | 4 +- packages/vchart/package.json | 22 +-- packages/vstory/package.json | 6 +- tools/story-player/package.json | 6 +- 8 files changed, 144 insertions(+), 119 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index aa3f2e2d23..92f258a026 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -20,10 +20,10 @@ importers: '@visactor/react-vchart': workspace:1.11.6 '@visactor/vchart': workspace:1.11.6 '@visactor/vchart-theme': ~1.6.6 - '@visactor/vgrammar': 0.13.12 + '@visactor/vgrammar': 0.13.13 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vrender': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 axios: ^1.4.0 @@ -53,10 +53,10 @@ importers: '@visactor/react-vchart': link:../packages/react-vchart '@visactor/vchart': link:../packages/vchart '@visactor/vchart-theme': 1.6.9 - '@visactor/vgrammar': 0.13.12 + '@visactor/vgrammar': 0.13.13 '@visactor/vmind': 1.2.4-alpha.5 - '@visactor/vrender': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vrender': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 axios: 1.6.8 buble: 0.20.0 @@ -136,9 +136,9 @@ importers: '@types/offscreencanvas': 2019.6.4 '@types/react-is': ^17.0.3 '@visactor/vchart': workspace:1.11.6 - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -157,9 +157,9 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 react-is: 18.3.1 devDependencies: @@ -201,9 +201,9 @@ importers: '@types/react-dom': ^18.0.0 '@types/react-is': ^17.0.3 '@visactor/vchart': workspace:1.11.6 - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -223,9 +223,9 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 react-is: 18.3.1 devDependencies: @@ -360,17 +360,17 @@ importers: '@types/node': '*' '@types/offscreencanvas': 2019.6.4 '@visactor/vdataset': ~0.18.10 - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-hierarchy': 0.13.12 - '@visactor/vgrammar-projection': 0.13.12 - '@visactor/vgrammar-sankey': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 - '@visactor/vgrammar-venn': 0.13.12 - '@visactor/vgrammar-wordcloud': 0.13.12 - '@visactor/vgrammar-wordcloud-shape': 0.13.12 - '@visactor/vrender-components': 0.19.15 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-hierarchy': 0.13.13 + '@visactor/vgrammar-projection': 0.13.13 + '@visactor/vgrammar-sankey': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 + '@visactor/vgrammar-venn': 0.13.13 + '@visactor/vgrammar-wordcloud': 0.13.13 + '@visactor/vgrammar-wordcloud-shape': 0.13.13 + '@visactor/vrender-components': 0.19.17 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vscale': ~0.18.10 '@visactor/vutils': ~0.18.10 '@visactor/vutils-extension': workspace:1.11.6 @@ -408,17 +408,17 @@ importers: vite: 3.2.6 dependencies: '@visactor/vdataset': 0.18.10 - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-hierarchy': 0.13.12 - '@visactor/vgrammar-projection': 0.13.12 - '@visactor/vgrammar-sankey': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 - '@visactor/vgrammar-venn': 0.13.12 - '@visactor/vgrammar-wordcloud': 0.13.12 - '@visactor/vgrammar-wordcloud-shape': 0.13.12 - '@visactor/vrender-components': 0.19.15 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-hierarchy': 0.13.13 + '@visactor/vgrammar-projection': 0.13.13 + '@visactor/vgrammar-sankey': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 + '@visactor/vgrammar-venn': 0.13.13 + '@visactor/vgrammar-wordcloud': 0.13.13 + '@visactor/vgrammar-wordcloud-shape': 0.13.13 + '@visactor/vrender-components': 0.19.17 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vscale': 0.18.10 '@visactor/vutils': 0.18.10 '@visactor/vutils-extension': link:../vutils-extension @@ -478,8 +478,8 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 '@visactor/vchart': workspace:1.11.6 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 @@ -499,8 +499,8 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 devDependencies: '@internal/bundler': link:../../tools/bundler @@ -839,9 +839,9 @@ importers: '@typescript-eslint/eslint-plugin': 5.30.0 '@typescript-eslint/parser': 5.30.0 '@visactor/vchart': workspace:1.11.6 - '@visactor/vrender': 0.19.15 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vrender': 0.19.17 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': ~0.18.10 cross-env: ^7.0.3 eslint: ~8.18.0 @@ -854,9 +854,9 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../../packages/vchart - '@visactor/vrender': 0.19.15 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vrender': 0.19.17 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 devDependencies: '@internal/bundler': link:../bundler @@ -4750,19 +4750,19 @@ packages: topojson-client: 3.1.0 dev: false - /@visactor/vgrammar-coordinate/0.13.12: - resolution: {integrity: sha512-qgl6owBuiuzukXZ0iz/WXjHM4c4AeaAkQTKdtAuHmDp64vQ87S31oWCF+QHzQ/TictuiYhwFaJ4KQNmLew/kjA==} + /@visactor/vgrammar-coordinate/0.13.13: + resolution: {integrity: sha512-La+8eio4TtnfTZUKXWVYHUvRhzpgeUMJmXaPDU++Vgnfa08uP4g1j8HoPoy0Z/oDwsk/FAh6lwxzHjwonFeZTA==} dependencies: - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-core/0.13.12: - resolution: {integrity: sha512-0ba1xINMxckpXBTioyH37NRa6l3G6y+kTaCLOJ4nUN1FhBrLciXB/Tsv06ESVbeF183wnP2uo97TuTiNvzDwvA==} + /@visactor/vgrammar-core/0.13.13: + resolution: {integrity: sha512-UKcilBJiBfhwIxiur+p/rUEOPp61YGI28vuOxWdFsrxOKOOQDUTY9UVc6UuwvdyJO3FCix8YH1W2EB21CuuG3g==} dependencies: '@visactor/vdataset': 0.18.10 - '@visactor/vgrammar-coordinate': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-coordinate': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vrender-components': 0.19.15 '@visactor/vrender-core': 0.19.15 '@visactor/vrender-kits': 0.19.15 @@ -4770,76 +4770,76 @@ packages: '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-hierarchy/0.13.12: - resolution: {integrity: sha512-HmuPx0AUu8qQJ2D0aWHfNlFzsFHK0t4Z37QtLu/zsct6CYnUq66jxQNQKXUHWV5/7KVLH16ghBHWUs4/xdVfyQ==} + /@visactor/vgrammar-hierarchy/0.13.13: + resolution: {integrity: sha512-bJXGsEULEvoQY9CcCZYqa/DzKbm/AqweIyM3Pwp5+YGk8yRXc78uYvJEi66IoXcSCnRm9YRl5G+x2a9KqGpUQw==} dependencies: - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vrender-core': 0.19.15 '@visactor/vrender-kits': 0.19.15 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-projection/0.13.12: - resolution: {integrity: sha512-fmTQgEgpvZXNklKCCvVIp2rnYgg7Mpdsgx2dZ64h3CxcwUKpordLlIT+XSHgyQIqqrHim32b/dudK59FDUb4aQ==} + /@visactor/vgrammar-projection/0.13.13: + resolution: {integrity: sha512-ZDctAuhbQpDOZH5KVbblAN31sboYUqfs/AYpXmAGDtCjXCZtBCc2guouXC/5QRc5hnGXNEHf6oVmXrOIB0LIyA==} dependencies: - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vutils': 0.18.10 d3-geo: 1.12.1 dev: false - /@visactor/vgrammar-sankey/0.13.12: - resolution: {integrity: sha512-aABjoTaqu31yLVsHSaGl6Q9eon79LI81P7XiP6szej7fV1U3F/blebolg4NyS/uEKOFidfpJNaSsej1v5QlNPg==} + /@visactor/vgrammar-sankey/0.13.13: + resolution: {integrity: sha512-RJ4UsFxQFUtK5JYO3+D1x67mgXW00snIsVonnYBxO8LIkSPKSetwX0D7esxuFX4dJu/jU9BgM2IXujwLxAy6+g==} dependencies: - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vrender-core': 0.19.15 '@visactor/vrender-kits': 0.19.15 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-util/0.13.12: - resolution: {integrity: sha512-qDgIdWTE2rRhhf55/MbCJOjFymmi6VIhmQvnVwkjgcbNGv9lL3jXQkJcKuYhMMlorkNQUsXttS0w1jQ4NVwcUw==} + /@visactor/vgrammar-util/0.13.13: + resolution: {integrity: sha512-7vRaoO+Y7SjtbFXqtYgmzbYJ4hA1NYF7E3NXUnuU7G0RBN00WaWAd8zUjZRmHmcNcJlDd+zOrCsZSluc1Ug0kw==} dependencies: '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-venn/0.13.12: - resolution: {integrity: sha512-0biisVqRCWK8T1VSMBltXfFBNggJbgcS3+KWigGApOhRDtm+B9j0LW21nkaPk1cTURUYTYW9Of+AVYw0RdyrLA==} + /@visactor/vgrammar-venn/0.13.13: + resolution: {integrity: sha512-BJPDb/IO3oLLoQfJZg4oHeO38DE9g24HCphyc87acmg3DMxYIHRXgM1pBwwjOPsPFCUFRGkrZGTovZgGj0BbvA==} dependencies: - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vrender-core': 0.19.15 '@visactor/vrender-kits': 0.19.15 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-wordcloud-shape/0.13.12: - resolution: {integrity: sha512-ExxvlZuwfBhijpAFWGCSAIPSVB7fftgB8X5zO+lvf+Y0oQid7YRpOMNwzcVaRHRoZ4LphjVnDgDZl9OCNBAIgg==} + /@visactor/vgrammar-wordcloud-shape/0.13.13: + resolution: {integrity: sha512-obk+2N+splbF/U7tLf6RkySK4xfDNdsPAlJFGALsOrNjmQ/GIA3fjXQj4WlH4//uuVhZrdYd9dYaLHHr66XYIw==} dependencies: - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vrender-core': 0.19.15 '@visactor/vrender-kits': 0.19.15 '@visactor/vscale': 0.18.10 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-wordcloud/0.13.12: - resolution: {integrity: sha512-24ivt3kgqXNdSO83TVNftHU4OLBK88hve/URlK4Bu0iC5xeD9kIfnlNmwEp+XX7u34iCviwgcgxGUkTnQBcflQ==} + /@visactor/vgrammar-wordcloud/0.13.13: + resolution: {integrity: sha512-LO6+ilUmgGQ6ixEfWvSHIaqO1jvzrYJ+Yu8j364vczUDqZzY22z13Uqc378NxqCChzzqBsnGjmoAgTLDYQHmmw==} dependencies: - '@visactor/vgrammar-core': 0.13.12 - '@visactor/vgrammar-util': 0.13.12 + '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-util': 0.13.13 '@visactor/vrender-core': 0.19.15 '@visactor/vrender-kits': 0.19.15 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar/0.13.12: - resolution: {integrity: sha512-iUX+9N6+UGqMy5sjjei3skoG9fod6ebaHp8UrpxPx/LxVCTAcmLj23JkYxLuEtz81+U2F9pIn8ZMMrigdlIT/w==} + /@visactor/vgrammar/0.13.13: + resolution: {integrity: sha512-kWP8iUAoJ6RSivloGXZyqWgLYN5+LmNdJhR6oFuW2q++oIlPdlSmLdbQwVWW/Y/tQmDYf0Q7ejlIIEExTinW/Q==} dependencies: - '@visactor/vgrammar-core': 0.13.12 + '@visactor/vgrammar-core': 0.13.13 dev: false /@visactor/vmind/1.2.4-alpha.5: @@ -4869,6 +4869,15 @@ packages: '@visactor/vutils': 0.18.10 dev: false + /@visactor/vrender-components/0.19.17: + resolution: {integrity: sha512-FCWH6bkI89EfNtjPg6XHB8xisW1GJH9rNgkh4vfphfvagceHrorIagpxfqzRKQoIGiAJZFqEY2/9j4tZMPVyEA==} + dependencies: + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 + '@visactor/vscale': 0.18.10 + '@visactor/vutils': 0.18.10 + dev: false + /@visactor/vrender-core/0.19.15: resolution: {integrity: sha512-pbz4h5IryGyPyj17QnHvFaaV+bh6WBoItis2BrWJyrdsbiaRescp3pm3evjwsVuJIe+4TvmFjgz3nX4b5IJnkg==} dependencies: @@ -4876,6 +4885,13 @@ packages: color-convert: 2.0.1 dev: false + /@visactor/vrender-core/0.19.17: + resolution: {integrity: sha512-3hifzM+I3zsEiUljHdo8h5YSdjLkFdhQSudQs58ChekqPg8+/6DpwFzuRXhI39x05VU0S3r9FA+zrcPpJ+cXJg==} + dependencies: + '@visactor/vutils': 0.18.10 + color-convert: 2.0.1 + dev: false + /@visactor/vrender-kits/0.19.15: resolution: {integrity: sha512-RviEKZ6P8lz+n7Eet9YBlEFaGVJQv0/ZHBTlOWoSl36essUCVxBbAzBE7s3GMFTbv0p23n4QJIv9NsZMxYurJw==} dependencies: @@ -4885,11 +4901,20 @@ packages: roughjs: 4.5.2 dev: false - /@visactor/vrender/0.19.15: - resolution: {integrity: sha512-ENRw29ktPi83aWFSdnBnEdk2umVKLUYinBENRahVHYKGIR0/cAXLP2mws78IpSF0U80QNWdfTpaU1NFY8i2H0w==} + /@visactor/vrender-kits/0.19.17: + resolution: {integrity: sha512-T7x0twhi/vgNmSrBCsGxci2Fri7iLwkDeZQ+rZFM8W6d0CA3ioYhQXGCidJ3EN9HwJ2SMe4zsYKrPBZGxwgxtQ==} dependencies: - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@resvg/resvg-js': 2.4.1 + '@visactor/vrender-core': 0.19.17 + '@visactor/vutils': 0.18.10 + roughjs: 4.5.2 + dev: false + + /@visactor/vrender/0.19.17: + resolution: {integrity: sha512-5TfH6LkL3BuCCbcfqDxK/k4AYP/csgcXqM7e+KQHDzuwljAid6hju9BQB10z5BvEwGdihEPXvbbDYlBH+2OFWQ==} + dependencies: + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 dev: false /@visactor/vscale/0.18.10: @@ -13839,7 +13864,7 @@ packages: jest: ^24.0.0 dependencies: electron: 11.5.0 - jest: 26.6.3 + jest: 26.6.3_xxvpynkn5i4ehycnunrxxsezu4 jest-haste-map: 24.9.0 jest-message-util: 24.9.0 jest-mock: 24.9.0 diff --git a/docs/package.json b/docs/package.json index 4d00ffc954..92407353cc 100644 --- a/docs/package.json +++ b/docs/package.json @@ -18,9 +18,9 @@ "@visactor/vchart-theme": "~1.6.6", "@visactor/vmind": "1.2.4-alpha.5", "@visactor/vutils": "~0.18.10", - "@visactor/vrender": "0.19.15", - "@visactor/vrender-kits": "0.19.15", - "@visactor/vgrammar": "0.13.12", + "@visactor/vrender": "0.19.17", + "@visactor/vrender-kits": "0.19.17", + "@visactor/vgrammar": "0.13.13", "markdown-it": "^13.0.0", "highlight.js": "^11.8.0", "axios": "^1.4.0", diff --git a/packages/openinula-vchart/package.json b/packages/openinula-vchart/package.json index 33b250a5d4..4fd1205216 100644 --- a/packages/openinula-vchart/package.json +++ b/packages/openinula-vchart/package.json @@ -30,9 +30,9 @@ "dependencies": { "@visactor/vchart": "workspace:1.11.6", "@visactor/vutils": "~0.18.10", - "@visactor/vrender-core": "0.19.15", - "@visactor/vrender-kits": "0.19.15", - "@visactor/vgrammar-core": "0.13.12", + "@visactor/vrender-core": "0.19.17", + "@visactor/vrender-kits": "0.19.17", + "@visactor/vgrammar-core": "0.13.13", "react-is": "^18.2.0" }, "devDependencies": { diff --git a/packages/react-vchart/package.json b/packages/react-vchart/package.json index a917de1c52..ae18ce9cc1 100644 --- a/packages/react-vchart/package.json +++ b/packages/react-vchart/package.json @@ -30,9 +30,9 @@ "dependencies": { "@visactor/vchart": "workspace:1.11.6", "@visactor/vutils": "~0.18.10", - "@visactor/vrender-core": "0.19.15", - "@visactor/vrender-kits": "0.19.15", - "@visactor/vgrammar-core": "0.13.12", + "@visactor/vrender-core": "0.19.17", + "@visactor/vrender-kits": "0.19.17", + "@visactor/vgrammar-core": "0.13.13", "react-is": "^18.2.0" }, "devDependencies": { diff --git a/packages/vchart-extension/package.json b/packages/vchart-extension/package.json index b123992595..ceff598a1e 100644 --- a/packages/vchart-extension/package.json +++ b/packages/vchart-extension/package.json @@ -20,8 +20,8 @@ }, "dependencies": { "@visactor/vchart": "workspace:1.11.6", - "@visactor/vrender-core": "0.19.15", - "@visactor/vrender-kits": "0.19.15", + "@visactor/vrender-core": "0.19.17", + "@visactor/vrender-kits": "0.19.17", "@visactor/vutils": "~0.18.10" }, "devDependencies": { diff --git a/packages/vchart/package.json b/packages/vchart/package.json index 9f247f438f..62f9105a75 100644 --- a/packages/vchart/package.json +++ b/packages/vchart/package.json @@ -119,17 +119,17 @@ "@visactor/vutils": "~0.18.10", "@visactor/vdataset": "~0.18.10", "@visactor/vscale": "~0.18.10", - "@visactor/vrender-core": "0.19.15", - "@visactor/vrender-kits": "0.19.15", - "@visactor/vrender-components": "0.19.15", - "@visactor/vgrammar-core": "0.13.12", - "@visactor/vgrammar-projection": "0.13.12", - "@visactor/vgrammar-wordcloud": "0.13.12", - "@visactor/vgrammar-wordcloud-shape": "0.13.12", - "@visactor/vgrammar-hierarchy": "0.13.12", - "@visactor/vgrammar-sankey": "0.13.12", - "@visactor/vgrammar-venn": "0.13.12", - "@visactor/vgrammar-util": "0.13.12", + "@visactor/vrender-core": "0.19.17", + "@visactor/vrender-kits": "0.19.17", + "@visactor/vrender-components": "0.19.17", + "@visactor/vgrammar-core": "0.13.13", + "@visactor/vgrammar-projection": "0.13.13", + "@visactor/vgrammar-wordcloud": "0.13.13", + "@visactor/vgrammar-wordcloud-shape": "0.13.13", + "@visactor/vgrammar-hierarchy": "0.13.13", + "@visactor/vgrammar-sankey": "0.13.13", + "@visactor/vgrammar-venn": "0.13.13", + "@visactor/vgrammar-util": "0.13.13", "@visactor/vutils-extension": "workspace:1.11.6" }, "publishConfig": { diff --git a/packages/vstory/package.json b/packages/vstory/package.json index 4abad4acf9..40c5d5e414 100644 --- a/packages/vstory/package.json +++ b/packages/vstory/package.json @@ -21,9 +21,9 @@ }, "dependencies": { "@visactor/vchart": "workspace:1.11.0", - "@visactor/vrender-core": "0.19.15", - "@visactor/vrender-kits": "0.19.15", - "@visactor/vrender-components": "0.19.15", + "@visactor/vrender-core": "0.19.17", + "@visactor/vrender-kits": "0.19.17", + "@visactor/vrender-components": "0.19.17", "@visactor/vutils": "~0.18.10" }, "devDependencies": { diff --git a/tools/story-player/package.json b/tools/story-player/package.json index 3591728616..ba072d44d5 100644 --- a/tools/story-player/package.json +++ b/tools/story-player/package.json @@ -56,10 +56,10 @@ "vite": "3.2.6" }, "dependencies": { - "@visactor/vrender-core": "0.19.15", - "@visactor/vrender-kits": "0.19.15", + "@visactor/vrender-core": "0.19.17", + "@visactor/vrender-kits": "0.19.17", "@visactor/vchart": "workspace:1.11.6", - "@visactor/vrender": "0.19.15", + "@visactor/vrender": "0.19.17", "@visactor/vutils": "~0.18.10" } } From 46f7ca9ca08ee8db1ab26d4118b297aec84415de Mon Sep 17 00:00:00 2001 From: skie1997 Date: Sat, 6 Jul 2024 17:05:50 +0800 Subject: [PATCH 27/29] chore: upgrade vrender and vgrammar --- common/config/rush/pnpm-lock.yaml | 167 +++++++++++-------------- docs/package.json | 2 +- packages/openinula-vchart/package.json | 2 +- packages/react-vchart/package.json | 2 +- packages/vchart/package.json | 16 +-- 5 files changed, 82 insertions(+), 107 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 92f258a026..4471023038 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -20,7 +20,7 @@ importers: '@visactor/react-vchart': workspace:1.11.6 '@visactor/vchart': workspace:1.11.6 '@visactor/vchart-theme': ~1.6.6 - '@visactor/vgrammar': 0.13.13 + '@visactor/vgrammar': 0.13.14 '@visactor/vmind': 1.2.4-alpha.5 '@visactor/vrender': 0.19.17 '@visactor/vrender-kits': 0.19.17 @@ -53,7 +53,7 @@ importers: '@visactor/react-vchart': link:../packages/react-vchart '@visactor/vchart': link:../packages/vchart '@visactor/vchart-theme': 1.6.9 - '@visactor/vgrammar': 0.13.13 + '@visactor/vgrammar': 0.13.14 '@visactor/vmind': 1.2.4-alpha.5 '@visactor/vrender': 0.19.17 '@visactor/vrender-kits': 0.19.17 @@ -136,7 +136,7 @@ importers: '@types/offscreencanvas': 2019.6.4 '@types/react-is': ^17.0.3 '@visactor/vchart': workspace:1.11.6 - '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 '@visactor/vrender-core': 0.19.17 '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': ~0.18.10 @@ -157,7 +157,7 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 '@visactor/vrender-core': 0.19.17 '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 @@ -201,7 +201,7 @@ importers: '@types/react-dom': ^18.0.0 '@types/react-is': ^17.0.3 '@visactor/vchart': workspace:1.11.6 - '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 '@visactor/vrender-core': 0.19.17 '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': ~0.18.10 @@ -223,7 +223,7 @@ importers: vite: 3.2.6 dependencies: '@visactor/vchart': link:../vchart - '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 '@visactor/vrender-core': 0.19.17 '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 @@ -360,14 +360,14 @@ importers: '@types/node': '*' '@types/offscreencanvas': 2019.6.4 '@visactor/vdataset': ~0.18.10 - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-hierarchy': 0.13.13 - '@visactor/vgrammar-projection': 0.13.13 - '@visactor/vgrammar-sankey': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vgrammar-venn': 0.13.13 - '@visactor/vgrammar-wordcloud': 0.13.13 - '@visactor/vgrammar-wordcloud-shape': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-hierarchy': 0.13.14 + '@visactor/vgrammar-projection': 0.13.14 + '@visactor/vgrammar-sankey': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vgrammar-venn': 0.13.14 + '@visactor/vgrammar-wordcloud': 0.13.14 + '@visactor/vgrammar-wordcloud-shape': 0.13.14 '@visactor/vrender-components': 0.19.17 '@visactor/vrender-core': 0.19.17 '@visactor/vrender-kits': 0.19.17 @@ -408,14 +408,14 @@ importers: vite: 3.2.6 dependencies: '@visactor/vdataset': 0.18.10 - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-hierarchy': 0.13.13 - '@visactor/vgrammar-projection': 0.13.13 - '@visactor/vgrammar-sankey': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vgrammar-venn': 0.13.13 - '@visactor/vgrammar-wordcloud': 0.13.13 - '@visactor/vgrammar-wordcloud-shape': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-hierarchy': 0.13.14 + '@visactor/vgrammar-projection': 0.13.14 + '@visactor/vgrammar-sankey': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vgrammar-venn': 0.13.14 + '@visactor/vgrammar-wordcloud': 0.13.14 + '@visactor/vgrammar-wordcloud-shape': 0.13.14 '@visactor/vrender-components': 0.19.17 '@visactor/vrender-core': 0.19.17 '@visactor/vrender-kits': 0.19.17 @@ -4750,96 +4750,96 @@ packages: topojson-client: 3.1.0 dev: false - /@visactor/vgrammar-coordinate/0.13.13: - resolution: {integrity: sha512-La+8eio4TtnfTZUKXWVYHUvRhzpgeUMJmXaPDU++Vgnfa08uP4g1j8HoPoy0Z/oDwsk/FAh6lwxzHjwonFeZTA==} + /@visactor/vgrammar-coordinate/0.13.14: + resolution: {integrity: sha512-zffS67HCtbQCGHvt4jXvHbOa98AT3xlu6PqZTLeI8mEb6sYYB8XMncHD/ZfKx2YQC0paMpfwJv2aJeW0X6MrTg==} dependencies: - '@visactor/vgrammar-util': 0.13.13 + '@visactor/vgrammar-util': 0.13.14 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-core/0.13.13: - resolution: {integrity: sha512-UKcilBJiBfhwIxiur+p/rUEOPp61YGI28vuOxWdFsrxOKOOQDUTY9UVc6UuwvdyJO3FCix8YH1W2EB21CuuG3g==} + /@visactor/vgrammar-core/0.13.14: + resolution: {integrity: sha512-gaxkP0IT78ndxm3tHXp7OzpfLi/LLNYBUpVpkOUL/JsqjLEIjd/EjxxOc2oSBp8OtOUAzdrR8rRo5Q+paXGwEw==} dependencies: '@visactor/vdataset': 0.18.10 - '@visactor/vgrammar-coordinate': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vrender-components': 0.19.15 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-coordinate': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vrender-components': 0.19.17 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vscale': 0.18.10 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-hierarchy/0.13.13: - resolution: {integrity: sha512-bJXGsEULEvoQY9CcCZYqa/DzKbm/AqweIyM3Pwp5+YGk8yRXc78uYvJEi66IoXcSCnRm9YRl5G+x2a9KqGpUQw==} + /@visactor/vgrammar-hierarchy/0.13.14: + resolution: {integrity: sha512-NxXEYBZVR88QopuM8TXHn1PRTrhnQ+fp/HILC/TQnP+qKlcosRAG0zh5YME32gObE87/p4Q0omlaMSrWDrwc/A==} dependencies: - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-projection/0.13.13: - resolution: {integrity: sha512-ZDctAuhbQpDOZH5KVbblAN31sboYUqfs/AYpXmAGDtCjXCZtBCc2guouXC/5QRc5hnGXNEHf6oVmXrOIB0LIyA==} + /@visactor/vgrammar-projection/0.13.14: + resolution: {integrity: sha512-f+KNKqwdBoxcl28IJ6DnfeOjVEkRbeKOKC9Z2Jm4Quqvu8B9o4hVLYa2D5grzPwAWPjImXfZ73xfgJ4vi5R/lA==} dependencies: - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 '@visactor/vutils': 0.18.10 d3-geo: 1.12.1 dev: false - /@visactor/vgrammar-sankey/0.13.13: - resolution: {integrity: sha512-RJ4UsFxQFUtK5JYO3+D1x67mgXW00snIsVonnYBxO8LIkSPKSetwX0D7esxuFX4dJu/jU9BgM2IXujwLxAy6+g==} + /@visactor/vgrammar-sankey/0.13.14: + resolution: {integrity: sha512-ZM8B1CBsOxTzFalA5dqF5AQzGUeSRPRTwj7VkqAfPeHEmHNzPtI7xFtguenMlTjVbG3BJxMYLKzjmvek04kvRw==} dependencies: - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-util/0.13.13: - resolution: {integrity: sha512-7vRaoO+Y7SjtbFXqtYgmzbYJ4hA1NYF7E3NXUnuU7G0RBN00WaWAd8zUjZRmHmcNcJlDd+zOrCsZSluc1Ug0kw==} + /@visactor/vgrammar-util/0.13.14: + resolution: {integrity: sha512-16B0LEcV8shQno3sGfNGYJEJDwTz6pTwCl2y5O2SF/4TwnenXwXVfUa1aM0tgUcI44SIPmeH1J84u6i6ablyMQ==} dependencies: '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-venn/0.13.13: - resolution: {integrity: sha512-BJPDb/IO3oLLoQfJZg4oHeO38DE9g24HCphyc87acmg3DMxYIHRXgM1pBwwjOPsPFCUFRGkrZGTovZgGj0BbvA==} + /@visactor/vgrammar-venn/0.13.14: + resolution: {integrity: sha512-68+V3eDJa3SGKOEkmbEC39y1omFokvqDlGoT1eevy8y5iW4TGSuHvugqlcUKH5vq4P+sBLb2sXpIi+K0AwdZiA==} dependencies: - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-wordcloud-shape/0.13.13: - resolution: {integrity: sha512-obk+2N+splbF/U7tLf6RkySK4xfDNdsPAlJFGALsOrNjmQ/GIA3fjXQj4WlH4//uuVhZrdYd9dYaLHHr66XYIw==} + /@visactor/vgrammar-wordcloud-shape/0.13.14: + resolution: {integrity: sha512-ATbFgl7v4sGLEneHsEvwjR258ThruPyNHRIWp4aYVQXk5YJEvTUsy4qUx80DaLWFqUf9PDcxoz569SOOGTH9Zw==} dependencies: - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vscale': 0.18.10 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar-wordcloud/0.13.13: - resolution: {integrity: sha512-LO6+ilUmgGQ6ixEfWvSHIaqO1jvzrYJ+Yu8j364vczUDqZzY22z13Uqc378NxqCChzzqBsnGjmoAgTLDYQHmmw==} + /@visactor/vgrammar-wordcloud/0.13.14: + resolution: {integrity: sha512-RGRqD77vncUU5WubV5Qz1/2cGhvhh44M9Ws8amyj+ro2hKdHf2QD8FwGVU2yDWqWWOe8Ca2KCOHeR7F8BKk08w==} dependencies: - '@visactor/vgrammar-core': 0.13.13 - '@visactor/vgrammar-util': 0.13.13 - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 + '@visactor/vgrammar-core': 0.13.14 + '@visactor/vgrammar-util': 0.13.14 + '@visactor/vrender-core': 0.19.17 + '@visactor/vrender-kits': 0.19.17 '@visactor/vutils': 0.18.10 dev: false - /@visactor/vgrammar/0.13.13: - resolution: {integrity: sha512-kWP8iUAoJ6RSivloGXZyqWgLYN5+LmNdJhR6oFuW2q++oIlPdlSmLdbQwVWW/Y/tQmDYf0Q7ejlIIEExTinW/Q==} + /@visactor/vgrammar/0.13.14: + resolution: {integrity: sha512-z9YOKOmyEfc0zmsKzpk7N0CxU3QHJG6tj6XG4WnVMzhfeMzVZ4vG9dUD6t7K4oKGaHmChIOlk4IMEkWV+2yP6Q==} dependencies: - '@visactor/vgrammar-core': 0.13.13 + '@visactor/vgrammar-core': 0.13.14 dev: false /@visactor/vmind/1.2.4-alpha.5: @@ -4860,15 +4860,6 @@ packages: - debug dev: false - /@visactor/vrender-components/0.19.15: - resolution: {integrity: sha512-Iur4FQWauvQT8KzJ3LlHxDzfSJ3N3LwONdnwwHYEymKLpuUHGGFutCEqJUzJs8D/jP4lYApURFPnSZ/Nv3IzdA==} - dependencies: - '@visactor/vrender-core': 0.19.15 - '@visactor/vrender-kits': 0.19.15 - '@visactor/vscale': 0.18.10 - '@visactor/vutils': 0.18.10 - dev: false - /@visactor/vrender-components/0.19.17: resolution: {integrity: sha512-FCWH6bkI89EfNtjPg6XHB8xisW1GJH9rNgkh4vfphfvagceHrorIagpxfqzRKQoIGiAJZFqEY2/9j4tZMPVyEA==} dependencies: @@ -4878,13 +4869,6 @@ packages: '@visactor/vutils': 0.18.10 dev: false - /@visactor/vrender-core/0.19.15: - resolution: {integrity: sha512-pbz4h5IryGyPyj17QnHvFaaV+bh6WBoItis2BrWJyrdsbiaRescp3pm3evjwsVuJIe+4TvmFjgz3nX4b5IJnkg==} - dependencies: - '@visactor/vutils': 0.18.10 - color-convert: 2.0.1 - dev: false - /@visactor/vrender-core/0.19.17: resolution: {integrity: sha512-3hifzM+I3zsEiUljHdo8h5YSdjLkFdhQSudQs58ChekqPg8+/6DpwFzuRXhI39x05VU0S3r9FA+zrcPpJ+cXJg==} dependencies: @@ -4892,15 +4876,6 @@ packages: color-convert: 2.0.1 dev: false - /@visactor/vrender-kits/0.19.15: - resolution: {integrity: sha512-RviEKZ6P8lz+n7Eet9YBlEFaGVJQv0/ZHBTlOWoSl36essUCVxBbAzBE7s3GMFTbv0p23n4QJIv9NsZMxYurJw==} - dependencies: - '@resvg/resvg-js': 2.4.1 - '@visactor/vrender-core': 0.19.15 - '@visactor/vutils': 0.18.10 - roughjs: 4.5.2 - dev: false - /@visactor/vrender-kits/0.19.17: resolution: {integrity: sha512-T7x0twhi/vgNmSrBCsGxci2Fri7iLwkDeZQ+rZFM8W6d0CA3ioYhQXGCidJ3EN9HwJ2SMe4zsYKrPBZGxwgxtQ==} dependencies: diff --git a/docs/package.json b/docs/package.json index 92407353cc..8614a034d0 100644 --- a/docs/package.json +++ b/docs/package.json @@ -20,7 +20,7 @@ "@visactor/vutils": "~0.18.10", "@visactor/vrender": "0.19.17", "@visactor/vrender-kits": "0.19.17", - "@visactor/vgrammar": "0.13.13", + "@visactor/vgrammar": "0.13.14", "markdown-it": "^13.0.0", "highlight.js": "^11.8.0", "axios": "^1.4.0", diff --git a/packages/openinula-vchart/package.json b/packages/openinula-vchart/package.json index 4fd1205216..ad8091a350 100644 --- a/packages/openinula-vchart/package.json +++ b/packages/openinula-vchart/package.json @@ -32,7 +32,7 @@ "@visactor/vutils": "~0.18.10", "@visactor/vrender-core": "0.19.17", "@visactor/vrender-kits": "0.19.17", - "@visactor/vgrammar-core": "0.13.13", + "@visactor/vgrammar-core": "0.13.14", "react-is": "^18.2.0" }, "devDependencies": { diff --git a/packages/react-vchart/package.json b/packages/react-vchart/package.json index ae18ce9cc1..e599f08412 100644 --- a/packages/react-vchart/package.json +++ b/packages/react-vchart/package.json @@ -32,7 +32,7 @@ "@visactor/vutils": "~0.18.10", "@visactor/vrender-core": "0.19.17", "@visactor/vrender-kits": "0.19.17", - "@visactor/vgrammar-core": "0.13.13", + "@visactor/vgrammar-core": "0.13.14", "react-is": "^18.2.0" }, "devDependencies": { diff --git a/packages/vchart/package.json b/packages/vchart/package.json index 62f9105a75..79c3288147 100644 --- a/packages/vchart/package.json +++ b/packages/vchart/package.json @@ -122,14 +122,14 @@ "@visactor/vrender-core": "0.19.17", "@visactor/vrender-kits": "0.19.17", "@visactor/vrender-components": "0.19.17", - "@visactor/vgrammar-core": "0.13.13", - "@visactor/vgrammar-projection": "0.13.13", - "@visactor/vgrammar-wordcloud": "0.13.13", - "@visactor/vgrammar-wordcloud-shape": "0.13.13", - "@visactor/vgrammar-hierarchy": "0.13.13", - "@visactor/vgrammar-sankey": "0.13.13", - "@visactor/vgrammar-venn": "0.13.13", - "@visactor/vgrammar-util": "0.13.13", + "@visactor/vgrammar-core": "0.13.14", + "@visactor/vgrammar-projection": "0.13.14", + "@visactor/vgrammar-wordcloud": "0.13.14", + "@visactor/vgrammar-wordcloud-shape": "0.13.14", + "@visactor/vgrammar-hierarchy": "0.13.14", + "@visactor/vgrammar-sankey": "0.13.14", + "@visactor/vgrammar-venn": "0.13.14", + "@visactor/vgrammar-util": "0.13.14", "@visactor/vutils-extension": "workspace:1.11.6" }, "publishConfig": { From 9e756d8e28bf1b0240e489406c1b2374c29fafca Mon Sep 17 00:00:00 2001 From: xile611 Date: Sat, 6 Jul 2024 17:21:03 +0800 Subject: [PATCH 28/29] fix: clear the timer of tooltip when has update --- packages/vchart/src/component/tooltip/tooltip.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/vchart/src/component/tooltip/tooltip.ts b/packages/vchart/src/component/tooltip/tooltip.ts index b3a73b55e6..b1c0f68ad7 100644 --- a/packages/vchart/src/component/tooltip/tooltip.ts +++ b/packages/vchart/src/component/tooltip/tooltip.ts @@ -348,6 +348,9 @@ export class Tooltip extends BaseComponent implements ITooltip { ) { return false; } + if (this._timer) { + clearTimeout(this._timer); + } let success: boolean; if (useCache) { @@ -369,10 +372,6 @@ export class Tooltip extends BaseComponent implements ITooltip { if (isClick && this._spec.lockAfterClick && !this._clickLock) { this._clickLock = true; } else if (Number.isFinite(this._spec.hideTimer)) { - if (this._timer) { - clearTimeout(this._timer); - } - this._timer = setTimeout(() => { this._handleChartMouseOut(); }, this._spec.hideTimer as number) as unknown as number; From 7c14ec26be45f32b10b9f2a4dd9df6236bccd9f3 Mon Sep 17 00:00:00 2001 From: xile611 Date: Sat, 6 Jul 2024 17:21:28 +0800 Subject: [PATCH 29/29] docs: update changlog of rush --- .../fix-hide-tooltip-timer_2024-07-06-09-21.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vchart/fix-hide-tooltip-timer_2024-07-06-09-21.json diff --git a/common/changes/@visactor/vchart/fix-hide-tooltip-timer_2024-07-06-09-21.json b/common/changes/@visactor/vchart/fix-hide-tooltip-timer_2024-07-06-09-21.json new file mode 100644 index 0000000000..6188a67e3e --- /dev/null +++ b/common/changes/@visactor/vchart/fix-hide-tooltip-timer_2024-07-06-09-21.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: clear the timer of tooltip when has update\n\n", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "dingling112@gmail.com" +} \ No newline at end of file