Justin-ZS commented on code in PR #21317:
URL: https://github.com/apache/echarts/pull/21317#discussion_r2533406343


##########
src/coord/cartesian/Grid.ts:
##########
@@ -550,6 +562,50 @@ class Grid implements CoordinateSystemMaster {
                 axis.scale.unionExtentFromData(data, dim);
             });
         }
+
+        function UnionExtentForAxisByValue(

Review Comment:
   name should be camcelCase



##########
src/coord/cartesian/Grid.ts:
##########
@@ -550,6 +562,50 @@ class Grid implements CoordinateSystemMaster {
                 axis.scale.unionExtentFromData(data, dim);
             });
         }
+
+        function UnionExtentForAxisByValue(
+            value: any,
+            axis: Axis2D,
+            axisType: OptionAxisType,
+        ): void {
+            const includeMarkerInExtent = 
axis.model.get('includeMarkerInExtent') ?? true;
+            if (includeMarkerInExtent && value != null && typeof value !== 
'string' && axisType !== 'category') {
+                const val = axis.scale.parse(value);
+                if (!isNaN(val)) {
+                    // Construct the parameter and use unionExtentFromData to 
avoid using the private method _innerUnionExtent
+                    axis.scale.unionExtentFromData({

Review Comment:
   Passing a dummy SeriesData is not a good practice.
   
   It would be better to add a new function.



##########
src/coord/cartesian/Grid.ts:
##########
@@ -81,6 +81,8 @@ type AxesMap = {
 
 type ParsedOuterBoundsContain = 'all' | 'axisLabel';
 
+type MarkerTypes = 'markPoint' | 'markLine' | 'markArea';

Review Comment:
   The type definition is duplicated.
   Please import instead of copying.



##########
src/coord/cartesian/Grid.ts:
##########
@@ -542,6 +544,16 @@ class Grid implements CoordinateSystemMaster {
 
                 unionExtent(data, xAxis);
                 unionExtent(data, yAxis);
+
+                // 处理 markPoint、markLine、markArea

Review Comment:
   comments in en



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to