pissang commented on code in PR #16880:
URL: https://github.com/apache/echarts/pull/16880#discussion_r851980729
##########
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:
> But here in echarts, if you trace the dataflow, every singleRect has {x:
0, y: 0}. So when you use union on two rects at the same position, you are just
returning the larger one. That's why I say it actually returns the largest
bounding rect of all labels.
Thanks for correct me. You are right.
> P.S. Do you mind telling me how to get the dom size in Echarts? I
struggled to get dom attributes but failed.
You can use `api.getWidth` and `api.getHeight` to get the canvas size
--
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]