-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highstock - flags overlap with "circlepin" and "squarepin" shape type #9726
Comments
Another example (overflows x-axis) https://jsfiddle.net/dgqxz172/ |
The second case there is probably a mistake in how |
Thanks @sebastianbochan for referencing the issue. And my apologies for not searching more thoroughly before opening a new issue. Just wanted to post my example here as well: https://jsfiddle.net/cop0t871/5/ |
@TorsteinHonsi Do you have some update on this issue? I am interested in the overflows on x-axis. Could you give me some hint where to look in the codebase to try it? |
@TorsteinHonsi I think that the code causing the overflow might be around this line: highcharts/js/parts/SvgRenderer.js Line 5310 in 43ad98f
It seems that when See: https://jsfiddle.net/3dco5m2y/2/ Fix: value = Math.max(0, value - alignFactor * ((width || bBox.width) + 2 * padding)); |
Thanks for your patience! The issue was with the way the results of the Reported cases with the fix applied: |
@TorsteinHonsi This fix is probably "most of the time" ok, but requires |
Yes I see the problem. As you say, this is a different case since we don't run the |
Might be that you find a better solution, else please consider this easy fix: |
I'm afraid that solution goes too deep, it would affect all text labels in all situations (including axis labels, data labels, titles, subtitles, tooltip etc..), not only flags. We need a solution that simply hides each flag if a part of it is overflowing. |
Another thing is that flags actually don't have any collision detection or cropping capabilites at all if we turn on It is this problem we are addressing with setting |
@TorsteinHonsi In my use case, I will go for |
Expected behaviour
The flags should behave in similar way like with "flag" shape type:
http://jsfiddle.net/BlackLabel/hwym791L/
Actual behaviour
The flags overlap.
Live demo with steps to reproduce
Open jsfiddle: http://jsfiddle.net/BlackLabel/2dz4tuja/
Product version
Highstock 7.0.1
Affected browser(s)
All
The text was updated successfully, but these errors were encountered: