You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "wong2win (via GitHub)" <gi...@apache.org> on 2024/04/28 07:56:25 UTC
Re: [I] Prevent overlap of grid and legend [echarts]
wong2win commented on issue #14252:
URL: https://github.com/apache/echarts/issues/14252#issuecomment-2081379650
I used a NOT 100% accurate workaround which calculates legend width manually with [measureText](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText) from canvas API.
Don't forget the icon width and margin though.
It works fine until sometimes there is blank space left to prevent word break, which would cause an unexpected new line. But you can do some round up and it should be fine.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org