Skip to content

Support trendline annotations #601

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

Closed
mdfederici opened this issue Jun 3, 2016 · 6 comments
Closed

Support trendline annotations #601

mdfederici opened this issue Jun 3, 2016 · 6 comments
Labels
feature something new

Comments

@mdfederici
Copy link

mdfederici commented Jun 3, 2016

I would like to be able to leverage annotations to specify a trendline like so:
image
I can do this with the current annotation code leveraging 'ax' and 'ay' but it is a bit clunky (as i need to convert a point on the graph to pixels outside of plotly) and does not work correctly when the plot is zoomed.

How I imagine this working is a flag in the options which when set to true tells the annotation code to interpret 'ax' and 'ay' not as an offset in pixels but rather an absolute point in the coordinate system which indicates the position of the tail (while x,y continues to represent the head as usual). This would make it easier to draw the trendline and the trendline would correctly scale with zoom like so:
image

I've never contributed to plot.ly before but I've implemented this in my plotly fork and have a pull request there (in accordance with the contributing guidelines).

@mdfederici
Copy link
Author

pull request to plotly/plotly.js

@mdfederici
Copy link
Author

@etpinard @mdtusz any chance we can get this one in for this week's release to npm? thanks guys
MFed

@etpinard
Copy link
Contributor

etpinard commented Jun 8, 2016

@mdfederici I'm a little caught up with a big project. I'll review your PR either tomorrow or Friday. Thanks for your contribution!

@etpinard
Copy link
Contributor

@mdfederici My bad. I have to wrap up an important PR today. I'll review yours on Monday. Sorry for the wait.

@mdfederici
Copy link
Author

@etpinard no worries. finishing important things is good :)

@etpinard
Copy link
Contributor

done in #610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

2 participants