Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,608 changes: 801 additions & 807 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"1.0.18","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"1.0.19","nextBump":"patch"}]
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@visactor/vchart": "1.3.0",
"@visactor/vutils": "1.0.6",
"@visactor/vgrammar": "~0.5.7",
"@visactor/vrender": "workspace:1.0.18",
"@visactor/vrender": "workspace:1.0.19",
"markdown-it": "^13.0.0",
"highlight.js": "^11.8.0",
"axios": "^1.4.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender-utils/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender-utils",
"entries": [
{
"version": "1.0.19",
"tag": "@visactor/react-vrender-utils_v1.0.19",
"date": "Thu, 23 Oct 2025 07:49:11 GMT",
"comments": {}
},
{
"version": "1.0.18",
"tag": "@visactor/react-vrender-utils_v1.0.18",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender-utils

This log was last generated on Mon, 13 Oct 2025 09:26:25 GMT and should not be manually modified.
This log was last generated on Thu, 23 Oct 2025 07:49:11 GMT and should not be manually modified.

## 1.0.19
Thu, 23 Oct 2025 07:49:11 GMT

_Version update only_

## 1.0.18
Mon, 13 Oct 2025 09:26:25 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/react-vrender-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender-utils",
"version": "1.0.18",
"version": "1.0.19",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.18",
"@visactor/react-vrender": "workspace:1.0.18",
"@visactor/vrender": "workspace:1.0.19",
"@visactor/react-vrender": "workspace:1.0.19",
"@visactor/vutils": "1.0.6",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender",
"entries": [
{
"version": "1.0.19",
"tag": "@visactor/react-vrender_v1.0.19",
"date": "Thu, 23 Oct 2025 07:49:11 GMT",
"comments": {}
},
{
"version": "1.0.18",
"tag": "@visactor/react-vrender_v1.0.18",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender

This log was last generated on Mon, 13 Oct 2025 09:26:25 GMT and should not be manually modified.
This log was last generated on Thu, 23 Oct 2025 07:49:11 GMT and should not be manually modified.

## 1.0.19
Thu, 23 Oct 2025 07:49:11 GMT

_Version update only_

## 1.0.18
Mon, 13 Oct 2025 09:26:25 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/react-vrender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender",
"version": "1.0.18",
"version": "1.0.19",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.18",
"@visactor/vrender": "workspace:1.0.19",
"@visactor/vutils": "1.0.6",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
6 changes: 6 additions & 0 deletions packages/vrender-animate/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/vrender-animate",
"entries": [
{
"version": "1.0.19",
"tag": "@visactor/vrender-animate_v1.0.19",
"date": "Thu, 23 Oct 2025 07:49:11 GMT",
"comments": {}
},
{
"version": "1.0.18",
"tag": "@visactor/vrender-animate_v1.0.18",
Expand Down
7 changes: 6 additions & 1 deletion packages/vrender-animate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/vrender-animate

This log was last generated on Mon, 13 Oct 2025 09:26:25 GMT and should not be manually modified.
This log was last generated on Thu, 23 Oct 2025 07:49:11 GMT and should not be manually modified.

## 1.0.19
Thu, 23 Oct 2025 07:49:11 GMT

_Version update only_

## 1.0.18
Mon, 13 Oct 2025 09:26:25 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/vrender-animate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vrender-animate",
"version": "1.0.18",
"version": "1.0.19",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -21,7 +21,7 @@
},
"dependencies": {
"@visactor/vutils": "1.0.6",
"@visactor/vrender-core": "workspace:1.0.18"
"@visactor/vrender-core": "workspace:1.0.19"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/vrender-animate/src/custom/morphing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export const oneToMultiMorph = (
}

const childGraphics: IGraphic[] = (
animationConfig?.splitPath === 'clone' ? cloneGraphic : animationConfig?.splitPath ?? splitGraphic
animationConfig?.splitPath === 'clone' ? cloneGraphic : (animationConfig?.splitPath ?? splitGraphic)
)(fromGraphic, validateToGraphics.length, false);

const oldOnEnd = animationConfig?.onEnd;
Expand Down Expand Up @@ -687,7 +687,7 @@ export const multiToOneMorph = (
}

const childGraphics: IGraphic[] = (
animationConfig?.splitPath === 'clone' ? cloneGraphic : animationConfig?.splitPath ?? splitGraphic
animationConfig?.splitPath === 'clone' ? cloneGraphic : (animationConfig?.splitPath ?? splitGraphic)
)(toGraphic, validateFromGraphics.length, true);

const toAttrs = toGraphic.attribute;
Expand Down
2 changes: 1 addition & 1 deletion packages/vrender-animate/src/step.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Step implements IStep {
this.duration = duration;
// 设置缓动函数
if (easing) {
this.easing = typeof easing === 'function' ? easing : Easing[easing] ?? Easing.linear;
this.easing = typeof easing === 'function' ? easing : (Easing[easing] ?? Easing.linear);
} else {
this.easing = Easing.linear;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vrender-animate/src/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class DefaultTimeline extends EventEmitter implements ITimeline {
protected tail: AnimateNode | null = null;
protected animateMap: Map<IAnimate, AnimateNode> = new Map();
protected _animateCount: number = 0;
protected declare paused: boolean;
declare protected paused: boolean;

// 添加必要的属性
protected _playSpeed: number = 1;
Expand Down
8 changes: 4 additions & 4 deletions packages/vrender-animate/src/utils/easing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ export class Easing {
return x === 0
? 0
: x === 1
? 1
: x < 0.5
? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2
: (Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5)) / 2 + 1;
? 1
: x < 0.5
? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2
: (Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5)) / 2 + 1;
};
static registerFunc(name: string, func: (t: number) => number) {
(Easing as any)[name] = func;
Expand Down
6 changes: 6 additions & 0 deletions packages/vrender-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/vrender-components",
"entries": [
{
"version": "1.0.19",
"tag": "@visactor/vrender-components_v1.0.19",
"date": "Thu, 23 Oct 2025 07:49:11 GMT",
"comments": {}
},
{
"version": "1.0.18",
"tag": "@visactor/vrender-components_v1.0.18",
Expand Down
7 changes: 6 additions & 1 deletion packages/vrender-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/vrender-components

This log was last generated on Mon, 13 Oct 2025 09:26:25 GMT and should not be manually modified.
This log was last generated on Thu, 23 Oct 2025 07:49:11 GMT and should not be manually modified.

## 1.0.19
Thu, 23 Oct 2025 07:49:11 GMT

_Version update only_

## 1.0.18
Mon, 13 Oct 2025 09:26:25 GMT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,23 @@ export function run() {
height: 30
},
realTime: false,
brushSelect: false,
brushSelect: true,
middleHandlerStyle: {
visible: true
},
showDetail: 'auto',
updateStateCallback: (start, end) => {
console.log('setCallback', start, end);
}
});

// dataZoom.setStartAndEnd(0, 1);
dataZoom.setStartAndEnd(0, 1);
dataZoom.setPreviewData(data);
dataZoom.setPreviewPointsX(d => d.x);
dataZoom.setPreviewPointsY(d => d.y);
dataZoom.setPreviewPointsX1(d => d.x);
dataZoom.setPreviewPointsY1(d => 265);

const stage = render([dataZoom], 'main');
console.log('stage', stage);
}
31 changes: 15 additions & 16 deletions packages/vrender-components/__tests__/browser/examples/data-zoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ import render from '../../util/render';
import { DataZoom } from '../../../src';

export function run() {
console.log('RectCrosshair');

const dataZoom = new DataZoom({
const dataZoomdisableTriggerEvent = new DataZoom({
start: 0.2,
end: 0.5,
// maxSpan: 0.4,
position: {
x: 50,
y: 235
y: 75
},
size: {
width: 400,
height: 30
},
showDetail: false,
delayTime: 1000,
// brushSelect: false,
backgroundChartStyle: {
line: {
Expand All @@ -31,22 +28,25 @@ export function run() {
},
middleHandlerStyle: {
visible: true
}
},
disableTriggerEvent: false,
showDetail: 'auto'
});

const dataZoomdisableTriggerEvent = new DataZoom({
const dataZoom = new DataZoom({
start: 0.2,
end: 0.5,
// maxSpan: 0.4,
position: {
x: 50,
y: 75
y: 235
},
size: {
width: 400,
height: 30
},
// brushSelect: false,
showDetail: 'auto',
delayTime: 100,
brushSelect: true,
backgroundChartStyle: {
line: {
visible: false
Expand All @@ -57,15 +57,14 @@ export function run() {
},
middleHandlerStyle: {
visible: true
},
disableTriggerEvent: false
}
});
console.log('dataZoom', dataZoom);

vglobal.supportsPointerEvents = false;
// vglobal.supportsPointerEvents = false;

const stage = render([dataZoom, dataZoomdisableTriggerEvent], 'main');
const stage = render([dataZoomdisableTriggerEvent, dataZoom], 'main');
stage.defaultLayer.scale(1.5, 1.5);
stage.x = 10;

// stage.addEventListener('pointermove', e => {
// dataZoom.setLocation({
Expand Down
8 changes: 4 additions & 4 deletions packages/vrender-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vrender-components",
"version": "1.0.18",
"version": "1.0.19",
"description": "components library for dp visualization",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -27,9 +27,9 @@
"dependencies": {
"@visactor/vutils": "1.0.6",
"@visactor/vscale": "1.0.6",
"@visactor/vrender-core": "workspace:1.0.18",
"@visactor/vrender-kits": "workspace:1.0.18",
"@visactor/vrender-animate": "workspace:1.0.18"
"@visactor/vrender-core": "workspace:1.0.19",
"@visactor/vrender-kits": "workspace:1.0.19",
"@visactor/vrender-animate": "workspace:1.0.19"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
12 changes: 6 additions & 6 deletions packages/vrender-components/src/axis/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ export class LineAxis extends AxisBase<LineAxisAttributes> {
? Math.min(bounds.x2 - baseX, bounds.width())
: 0
: bounds.x1 < baseX
? Math.min(baseX - bounds.x1, bounds.width())
: 0) +
? Math.min(baseX - bounds.x1, bounds.width())
: 0) +
(layerCount - 1) * space;
} else {
labelLength = 0;
Expand Down Expand Up @@ -552,8 +552,8 @@ export class LineAxis extends AxisBase<LineAxisAttributes> {
const verticalLimitLength = isVertical
? axisLength / labelShapes.length
: !autoHide && !autoRotate
? axisLength / labelShapes.length
: Infinity;
? axisLength / labelShapes.length
: Infinity;

autoLimitFunc(labelShapes, {
limitLength,
Expand Down Expand Up @@ -646,8 +646,8 @@ export class LineAxis extends AxisBase<LineAxisAttributes> {
let limitLength = limitSize;
let titleHeight = 0;
let titleSpacing = 0;
const axisLineWidth = line && line.visible ? line.style.lineWidth ?? 1 : 0;
const tickLength = tick && tick.visible ? tick.length ?? 4 : 0;
const axisLineWidth = line && line.visible ? (line.style.lineWidth ?? 1) : 0;
const tickLength = tick && tick.visible ? (tick.length ?? 4) : 0;
if (title && title.visible && typeof title.text === 'string') {
titleHeight = measureTextSize(title.text, title.textStyle, this.stage?.getTheme()?.text).height;
const padding = normalizePadding(title.padding);
Expand Down
4 changes: 2 additions & 2 deletions packages/vrender-components/src/axis/tick-data/continuous.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ export const continuousTicks = (scale: ContinuousScale, op: ITickDataOpt): ITick
({
AABBBounds: bounds,
value: samplingScaleTicks[i]
} as ILabelItem<number>)
}) as ILabelItem<number>
);
} else {
items = getCartesianLabelBounds(scale, scaleTicks, op as ICartesianTickDataOpt)?.map(
(bounds, i) =>
({
AABBBounds: bounds,
value: scaleTicks[i]
} as ILabelItem<number>)
}) as ILabelItem<number>
);
}

Expand Down
Loading
Loading