Skip to content
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

Stock Tools: Circle annotations are not relative to X/Y axes (when changing the zoom level) #14997

Closed
ivan-stojanov opened this issue Jan 26, 2021 · 4 comments
Labels
Product: Highcharts Stock Type: Feature Request Used when a new feature is requested either directly or indirectly

Comments

@ivan-stojanov
Copy link

Expected behaviour

Circle annotations should be relative to X/Y axes and when changing the zoom levels, they should stick above the candles to which they were initially drawn. This should work on the same way as rectangle annotations are working.

Actual behaviour

Circle annotations are not relative to X/Y axes and when changing the zoom levels, they do not stick to the candles above which they were initially drawn.

Live demo with steps to reproduce

Comparation between rectangle annotations and circle annotations can be found in the following video.
Sample code from the video above, where both type of annotations are added, can be found here.

Product version

Highstock JS v8.2.2 (2020-10-22)

Affected browser(s)

Google Chrome, Version 88.0.4324.104

@highsoft-bot highsoft-bot added this to To do in Development-Flow Jan 26, 2021
@KacperMadej
Copy link

KacperMadej commented Jan 26, 2021

Hi @ivan-stojanov

Thank you for reporting the problem.

A rectangle annotation has multiple points assigned as points and is using axes (x and y) to scale correctly on zoom.

A circle annotation has a single point like that and it is the center of the circle. The radius is constant and not tied to any axis.

A circle tied to axes positions all around the edge would lead to some kind of a wobbly egg-like shape because x-axis could be oridinal, so not only the shape will be vertically distorted but it would be unequally stretched and squashed horizontally.

Could you explain in more detail the feature that you are looking for?
Maybe you are looking for an ellipse shape with semi-minor/major axes tied to the chart's x and y axes?

@ivan-stojanov
Copy link
Author

@KacperMadej I am looking for the annotation to be tied to the chart's x and y axes, even if that would lead to resulting with the ellipse shape (in form of egg-like shape). As you can see, the both annotation types acts differently when changing the zoom level and I need them to be consistent with the axes values on which they were drawn to.

Based on your comments, I see that the current implementation is probably the expected behavior, so I wonder if there is some workaround to this?
Since I guess that the ellipse shape is not supported, I wonder if there are known plans for it for the further releases?

@KacperMadej
Copy link

Currently, there is no such option available.

A solution could be to create a custom stock tool with a custom annotation bound to it, but almost all logic would have to be added because there is no support for drawing curved paths and no default control point that would allow editing such path on drag-and-drop.

You could rename this issue or open a new feature request with a title matching the request for a new ellipse stock tool.

@KacperMadej KacperMadej added Type: Feature Request Used when a new feature is requested either directly or indirectly and removed Status: Pending reply labels Jan 27, 2021
@ivan-stojanov
Copy link
Author

@KacperMadej I added more details in #15008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product: Highcharts Stock Type: Feature Request Used when a new feature is requested either directly or indirectly
Projects
None yet
Development

No branches or pull requests

3 participants