pissang commented on code in PR #16880:
URL: https://github.com/apache/echarts/pull/16880#discussion_r852550346


##########
src/coord/cartesian/Grid.ts:
##########
@@ -202,10 +200,32 @@ class Grid implements CoordinateSystemMaster {
                     }
                 }
             });
-
+            //Adjust grid.width to keep xAxis labels in dom
+            const [xAxis, yAxis] = axesList[0].isHorizontal() ? axesList : 
axesList.slice().reverse();

Review Comment:
   `getViewLabels` will return the labels that will be finally displayed on the 
chart. See how it is used when rendering the axis.
   
https://github.com/apache/echarts/blob/master/src/component/axis/AxisBuilder.ts
   
   However the `getTicksCoord` will have a different result when user-set 
`axisTick.interval` and `axisLabel.interval` are different. `getTicksCoord` 
will use the `axisTick.interval` to skip the tick lines and `getViewLabels` 
will use `axisLabel.interval` to skip the coord. 
   
   <img width="731" alt="image" 
src="https://user-images.githubusercontent.com/841551/163910512-7b7e482c-f2e3-43ec-8f28-e5f4a09a9ab4.png";>
   
   



-- 
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