From 11fb80f7b45b081fb65ea0b8319dd93d9afa6623 Mon Sep 17 00:00:00 2001 From: Justin-ZS Date: Thu, 22 Jan 2026 17:33:09 +0800 Subject: [PATCH 1/3] feat(drp): use current dpr when resize --- src/core/echarts.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/echarts.ts b/src/core/echarts.ts index a432ad137a..87c0204aa5 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -312,6 +312,7 @@ export interface SetOptionOpts { export interface ResizeOpts { width?: number | 'auto', // Can be 'auto' (the same as null/undefined) height?: number | 'auto', // Can be 'auto' (the same as null/undefined) + devicePixelRatio?: number, animation?: AnimationOption silent?: boolean // by default false. }; @@ -1458,7 +1459,14 @@ class ECharts extends Eventful { return; } - this._zr.resize(opts); + // Default to use window.devicePixelRatio to handle browser zoom changes. + const zrResizeOpts = opts ? extend({}, opts) : {}; + if (zrResizeOpts.devicePixelRatio == null && env.hasGlobalWindow) { + /* eslint-disable-next-line */ + zrResizeOpts.devicePixelRatio = window.devicePixelRatio; + } + + this._zr.resize(zrResizeOpts); const ecModel = this._model; From 66901e6747a736e9a7b70df7ee0a1539e8bfaf1f Mon Sep 17 00:00:00 2001 From: Justin-ZS Date: Fri, 30 Jan 2026 17:06:55 +0800 Subject: [PATCH 2/3] fix: get default dpr in zrender --- src/core/echarts.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/core/echarts.ts b/src/core/echarts.ts index 87c0204aa5..8214c11e0e 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -1459,14 +1459,7 @@ class ECharts extends Eventful { return; } - // Default to use window.devicePixelRatio to handle browser zoom changes. - const zrResizeOpts = opts ? extend({}, opts) : {}; - if (zrResizeOpts.devicePixelRatio == null && env.hasGlobalWindow) { - /* eslint-disable-next-line */ - zrResizeOpts.devicePixelRatio = window.devicePixelRatio; - } - - this._zr.resize(zrResizeOpts); + this._zr.resize(opts); const ecModel = this._model; From 8b9d116924c20f41d3eccde09e793337b748c4bc Mon Sep 17 00:00:00 2001 From: Justin-ZS Date: Wed, 27 May 2026 16:45:20 +0800 Subject: [PATCH 3/3] ci: build generated types before type check --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 516d9f493a..3ae48287eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,9 @@ jobs: - name: Lint run: npx eslint $(cat ~/tmp/changed_files) + - name: Build generated types + run: npm run build:lib + - name: Check types run: npm run checktype