Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

We could happen that a user would like to move the annotations in an empty space on the chart in order to see the underlying data.

To enable that, we could add a new draggable option to the annotation that if is set to true, the user can drag the annotation (or annotations).

mousedown and mouseup event types should be added by the user in order to activate it.
The reset and the fallback to original position can be easily performed by a chart.update() to invoke externally (by a button or another controller).

You must be logged in to vote

Replies: 3 comments · 2 replies

Comment options

Should be almost as easy with an external plugin, so not sure if that is something that should be implementer. Always good to give examples though, so maybe a sample implementation instead?

You must be logged in to vote
2 replies
@stockiNail
Comment options

stockiNail Apr 27, 2022
Maintainer Author

I'm not sure if it could be easy because the plugin is not exposing the elements. I'll do an example in codepen soon.

@stockiNail
Comment options

stockiNail Apr 27, 2022
Maintainer Author

Here codepen: https://codepen.io/stockinail/pen/OJOBEGm

You can drag the labels.

EDIT: added button to reset the drag.

Comment options

stockiNail
May 3, 2022
Maintainer Author

@kurkle today I had time to think more about this enhancement. Well, finally I think you are right! This can be done by another plugin.
If you think it could be helpful, I'd like to prepare a codepen to show the implementation. And then, if you agree, I could add a sample in the interactions section. Let me know what you think.

You must be logged in to vote
0 replies
Comment options

stockiNail
May 4, 2022
Maintainer Author

Codepen (drag with external plugin) https://codepen.io/stockinail/pen/jOZPWXy

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
status: implement externally Better suited as code in the user's project or a separate plugin
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.