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

Support for chart.inverted=true #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

prusse-martin
Copy link

Properly position annotations on inverted charts when:

  • linked to points;
  • positioned using yValue and/or xValue ;
  • drag/drop annotations along the correct axis when allowDragX or allowDragY are disabled (also correctly update the xValue and/or yValue);

Properly position annotations on inverted charts when:
- linked to points;
- positioned using `yValue` and/or `xValue` ;
- drag/drop annotations along the correct axis when `allowDragX` or `allowDragY` are disabled (also correctly update the `xValue` and/or `yValue`);
@prusse-martin
Copy link
Author

prusse-martin commented Aug 9, 2016

Some jsfidles:

(to see the effect over updating the xValue and yValue value open the console)

@pawelfus
Copy link
Collaborator

Thank you for sharing! Somehow I got distracted and missed this PR. I will review soon. I guess it's the same as PR: #66 ?

@prusse-martin
Copy link
Author

Yes it looks like that have the same general feature in mind.
I didn't run a fiddle testing it but maybe his change in redraw visually compensates for my changes in translateAnnotation.
One will need to check if programmatically inspecting the notes after "mouse translation" yields good or weird values. Maybe editing/copying one of the fiddles I added to this PR and maybe adding some missing case to get a more thorough check.
I got to understand the code to edit it at the time but that didn't make into my long term memory, sorry.

@pawelfus
Copy link
Collaborator

Thanks for your feedback! My apologies for missing this PR once again. I just merged the second PR, so closing this one.

@pawelfus pawelfus closed this Oct 26, 2016
@prusse-martin
Copy link
Author

Check the jsfiddle linked in the PR and try to place a some new shapes and move them. You may want to update translateAnnotation to properly update annotation position, that is used on redraw when mouse is released or a new shape selected, I'm not sure.
I didn't notice the fiddles linked there at first.

@pawelfus
Copy link
Collaborator

Right, thanks!

@pawelfus pawelfus reopened this Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants