highcharts / highcharts

Highcharts JS, the JavaScript charting framework
https://www.highcharts.com
Other
12.02k stars 3.62k forks source link

Title overlapping exporting menu when align is set to 'right' #20544

Open marvin19 opened 8 months ago

marvin19 commented 8 months ago

Expected behaviour

Title overlapping with menu-button

Actual behaviour

I would expect title to not overlap menu when title.align = 'right'

Live demo with steps to reproduce

https://jsfiddle.net/maritavindedal/sfx26jcy/7/

Product version

Affected browser(s)

TorsteinHonsi commented 8 months ago

Thanks!

Internal note Interestingly, we thought about overlapping when the title is aligned left or center, but not right: https://api.highcharts.com/highcharts/title.widthAdjust

TorsteinHonsi commented 8 months ago

I'm not sure whether to call it a bug. Actually it is a bit hard to decide. We have plenty of cases where implementers can get things to overlap if they change the default options. If we start making code exceptions for all of them, we end up with a bloated mess. The map navigation buttons is another case, and it's easy to get legends to overlap with any of the buttons or titles if place them in the same position. I would rather say that if an implementer wants to place the title to the right, they need to be mindful of overlapping and provide x and y offsets as needed: https://jsfiddle.net/highcharts/nLutszge/

TorsteinHonsi commented 8 months ago

PS: What we're missing is a layout management system that would split the chart into regions and handle components within them. But that's a bigger thing.