ZeRego commented on issue #15654: URL: https://github.com/apache/echarts/issues/15654#issuecomment-1157807935
In my case I want the legend at the top to not overflow the grid.  The solution from @Houstoten didn't work for me as accessing anything from the `_componentsMap` was always returning undefined. I was able to come up with this hack: ``` const found = echartsInstance._componentsViews.find((entry) => entry.type === 'legend.plain'); const legendHeight = found._backgroundEl.shape.height; if (legendHeight) { echartsInstance.setOption({ grid: { top: legendHeight + 20, }, }); } ``` @Ovilia I saw some of your comments in other related issues about you having internal discussing on how to solve this. Are there any updates on this ? -- 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]
