Closed moontrip closed 1 year ago
@chowington I was waiting for your elbow work to be done for this PR :) Since it is finished, I updated this PR and changed it to be ready for review
Hi DK, thanks for this work! While testing I found a case where the title still overflows:
This is on the WASH Benefits Bangladesh Cluster Randomized Trial study. Can you look into this case? I wonder whether it would be worth it to have the title length dependent on the plot container size? That gets hairy sometimes though...
Also, I'd suggest trying to DRY up this code bit. For instance, it could be helpful to factor out the ellipsis logic into a function, as well as to assign plotlyProps?.layout?.xaxis?.title
to a const
so you don't have to repeat it every time.
@chowington Thank you for your reviews and tests! 👍 I have addressed them in the new commit: reduced the max length of x-axis title (attached a screenshot with the same example) and make that ellipsis of the axis title be a function, axisTitleEllipsis().
Looks good, thanks DK!
@chowington Thank you for your review and tests! 👍
This will address https://github.com/VEuPathDB/web-eda/issues/1377. Since there is another mosaic work by Connor, https://github.com/VEuPathDB/web-components/pull/418, this is branched out from mosaic-elbow-labels to minimize conflicts and accommodate new layouts. Thus, this PR will be finalized when https://github.com/VEuPathDB/web-components/pull/418 is done.
Now both X and Y axes have ellipsis. For this, the max length of X-axis string is set to 80. Also, a story is made for testing. Here is a screenshot.