You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2025/06/18 09:46:51 UTC

(echarts) branch fix-relativeTo created (now 3aac20d7f)

This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a change to branch fix-relativeTo
in repository https://gitbox.apache.org/repos/asf/echarts.git


      at 3aac20d7f fix(marker): fix bug since #20166

This branch includes the following new commits:

     new 3aac20d7f fix(marker): fix bug since #20166

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


(echarts) 01/01: fix(marker): fix bug since #20166

Posted by ov...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch fix-relativeTo
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 3aac20d7fe5fa65d8c451a3e645283d4007b369e
Author: Ovilia <zw...@gmail.com>
AuthorDate: Wed Jun 18 17:46:26 2025 +0800

    fix(marker): fix bug since #20166
---
 src/component/marker/MarkPointView.ts | 2 +-
 src/component/marker/markerHelper.ts  | 8 ++++++--
 test/dataZoom-action.html             | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/component/marker/MarkPointView.ts b/src/component/marker/MarkPointView.ts
index ddc575682..bad3d19a0 100644
--- a/src/component/marker/MarkPointView.ts
+++ b/src/component/marker/MarkPointView.ts
@@ -43,7 +43,7 @@ function updateMarkerLayout(
     const coordSys = seriesModel.coordinateSystem;
     const apiWidth = api.getWidth();
     const apiHeight = api.getHeight();
-    const coordRect = coordSys.getArea && coordSys.getArea();
+    const coordRect = coordSys && coordSys.getArea && coordSys.getArea();
     mpData.each(function (idx: number) {
         const itemModel = mpData.getItemModel<MarkPointDataItemOption>(idx);
         const isRelativeToCoordinate = itemModel.get('relativeTo') === 'coordinate';
diff --git a/src/component/marker/markerHelper.ts b/src/component/marker/markerHelper.ts
index 6eca7ac74..37ce88eed 100644
--- a/src/component/marker/markerHelper.ts
+++ b/src/component/marker/markerHelper.ts
@@ -154,8 +154,12 @@ export function dataTransform(
     if (item.coord == null || !isArray(dims)) {
         item.coord = [];
         const baseAxis = seriesModel.getBaseAxis();
-        const otherAxis = coordSys.getOtherAxis(baseAxis);
-        item.value = numCalculate(data, data.mapDimension(otherAxis.dim), item.type);
+        if (baseAxis) {
+            const otherAxis = coordSys.getOtherAxis(baseAxis);
+            if (otherAxis) {
+                item.value = numCalculate(data, data.mapDimension(otherAxis.dim), item.type);
+            }
+        }
     }
     else {
         // Each coord support max, min, average
diff --git a/test/dataZoom-action.html b/test/dataZoom-action.html
index 6c7d8993b..fb34b4261 100644
--- a/test/dataZoom-action.html
+++ b/test/dataZoom-action.html
@@ -25,8 +25,8 @@ under the License.
         <script src="lib/testHelper.js"></script>
         <script src="lib/facePrint.js"></script>
         <script src="lib/jquery.min.js"></script>
-        <script src="lib/config.js"></script>
         <script src="lib/simpleRequire.js"></script>
+        <script src="lib/config.js"></script>
         <link rel="stylesheet" href="lib/reset.css" />
     </head>
     <body>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org