Skip to content

chore: use zrender next branch and merge from master #21052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 23, 2025
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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
},
"dependencies": {
"tslib": "2.3.0",
"zrender": "github:ecomfe/zrender#v6"
"zrender": "github:ecomfe/zrender#next"
},
"devDependencies": {
"@babel/code-frame": "7.10.4",
Expand Down Expand Up @@ -224,4 +224,4 @@
"./dist/extension/dataTool.min": "./dist/extension/dataTool.min.js",
"./*": "./*"
}
}
}
8 changes: 4 additions & 4 deletions src/coord/CoordinateSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export interface CoordinateSystemMaster {
convertToLayout?(
ecModel: GlobalModel,
finder: ParsedModelFinder,
value: Parameters<CoordinateSystem['dataToLayout']>[0],
value: Parameters<NonNullable<CoordinateSystem['dataToLayout']>>[0],
opt?: unknown
): ReturnType<CoordinateSystem['dataToLayout']> | NullUndefined;
): ReturnType<NonNullable<CoordinateSystem['dataToLayout']>> | NullUndefined;

// This methods is also responsible for determining whether this
// coordinate system is applicable to the given `finder`.
Expand All @@ -96,9 +96,9 @@ export interface CoordinateSystemMaster {
convertFromPixel?(
ecModel: GlobalModel,
finder: ParsedModelFinder,
pixelValue: Parameters<CoordinateSystem['pointToData']>[0],
pixelValue: Parameters<NonNullable<CoordinateSystem['pointToData']>>[0],
opt?: unknown
): ReturnType<CoordinateSystem['pointToData']> | NullUndefined;
): ReturnType<NonNullable<CoordinateSystem['pointToData']>> | NullUndefined;

// @param point Point in global pixel coordinate system.
// The signature of this method should be the same as `CoordinateSystemExecutive`
Expand Down
7 changes: 4 additions & 3 deletions src/coord/matrix/Matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@ import { eqNaN, isArray, retrieve2 } from 'zrender/src/core/util';
import Point from 'zrender/src/core/Point';
import { WH, XY } from '../../util/graphic';
import Model from '../../model/Model';
import {
MatrixCellLayoutInfo, MatrixCellLayoutInfoType,
import type {
MatrixCellLayoutInfo,
MatrixDimensionCell, MatrixDimPair, MatrixXYLocator
} from './MatrixDim';
import { mathMax, mathMin, parsePositionSizeOption } from '../../util/number';
import {
createNaNRectLike,
MatrixClampOption,
MatrixCellLayoutInfoType,
parseCoordRangeOption,
resetXYLocatorRange,
xyLocatorRangeToRectOneDim
} from './matrixCoordHelper';
import { MatrixBodyCorner, MatrixBodyOrCornerKind } from './MatrixBodyCorner';
import type { MatrixBodyCorner, MatrixBodyOrCornerKind } from './MatrixBodyCorner';
import { error } from '../../util/log';
import { injectCoordSysByOption, simpleCoordSysInjectionProvider } from '../../core/CoordinateSystem';

Expand Down
6 changes: 3 additions & 3 deletions src/coord/matrix/MatrixBodyCorner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/

import { HashMap, createHashMap, each, extend, isArray, isObject } from 'zrender/src/core/util';
import { NullUndefined } from '../../util/types';
import type { NullUndefined } from '../../util/types';
import type { MatrixXYLocator, MatrixDimPair, MatrixXYLocatorRange } from './MatrixDim';
import { error } from '../../util/log';
import Point from 'zrender/src/core/Point';
import { RectLike } from 'zrender/src/core/BoundingRect';
import { MatrixBodyCornerCellOption, MatrixBodyOption, MatrixCornerOption } from './MatrixModel';
import type { MatrixBodyCornerCellOption, MatrixBodyOption, MatrixCornerOption } from './MatrixModel';
import {
resolveXYLocatorRangeByCellMerge,
MatrixClampOption,
Expand All @@ -34,7 +34,7 @@ import {
resetXYLocatorRange,
cloneXYLocatorRange,
} from './matrixCoordHelper';
import Model from '../../model/Model';
import type Model from '../../model/Model';


/**
Expand Down
11 changes: 2 additions & 9 deletions src/coord/matrix/MatrixDim.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {
createHashMap,
defaults,
each, eqNaN, isArray, isObject, isString,
retrieve2,
each, eqNaN, isArray, isObject, isString
} from 'zrender/src/core/util';
import Point from 'zrender/src/core/Point';
import OrdinalMeta from '../../data/OrdinalMeta';
Expand All @@ -17,7 +16,7 @@ import { WH, XY } from '../../util/graphic';
import { ListIterator } from '../../util/model';
import { RectLike } from 'zrender/src/core/BoundingRect';
import {
createNaNRectLike, setDimXYValue
createNaNRectLike, setDimXYValue, MatrixCellLayoutInfoType
} from './matrixCoordHelper';
import { error } from '../../util/log';
import { mathMax } from '../../util/number';
Expand All @@ -43,12 +42,6 @@ export interface MatrixCellLayoutInfo {
dim: MatrixDim;
}

export const MatrixCellLayoutInfoType = {
level: 1,
leaf: 2,
nonLeaf: 3,
} as const;
export type MatrixCellLayoutInfoType = (typeof MatrixCellLayoutInfoType)[keyof typeof MatrixCellLayoutInfoType];

export type MatrixXYLocator = MatrixCellLayoutInfo['id']['x'] | MatrixCellLayoutInfo['id']['y'];
/**
Expand Down
15 changes: 10 additions & 5 deletions src/coord/matrix/matrixCoordHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@
*/

import Point from 'zrender/src/core/Point';
import {
MatrixCellLayoutInfoType,
import type {
MatrixCellLayoutInfo,
MatrixDimensionCell,
MatrixDimPair,
MatrixXYLocator,
MatrixXYLocatorRange,
} from './MatrixDim';
import { NullUndefined } from '../../util/types';
import type { NullUndefined } from '../../util/types';
import { eqNaN, isArray, isNumber } from 'zrender/src/core/util';
import { WH, XY } from '../../util/graphic';
import { MatrixCoordRangeOption, MatrixCoordValueOption } from './MatrixModel';
import { RectLike } from 'zrender/src/core/BoundingRect';
import type { MatrixCoordRangeOption, MatrixCoordValueOption } from './MatrixModel';
import type { RectLike } from 'zrender/src/core/BoundingRect';
import { mathMax, mathMin } from '../../util/number';

export const MatrixCellLayoutInfoType = {
level: 1,
leaf: 2,
nonLeaf: 3,
} as const;
export type MatrixCellLayoutInfoType = (typeof MatrixCellLayoutInfoType)[keyof typeof MatrixCellLayoutInfoType];

/**
* @public Public to users in `chart.convertFromPixel`.
Expand Down
1 change: 0 additions & 1 deletion src/util/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import CartesianAxisModel from '../coord/cartesian/AxisModel';
import GridModel from '../coord/cartesian/GridModel';
import { isNumeric, getRandomIdBase, getPrecision, round } from './number';
import { error, warn } from './log';
import type Model from '../model/Model';

function interpolateNumber(p0: number, p1: number, percent: number): number {
return (p1 - p0) * percent + p0;
Expand Down