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