Skip to content

OHLC calculations are off on category axes #2004

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
etpinard opened this issue Sep 14, 2017 · 2 comments
Closed

OHLC calculations are off on category axes #2004

etpinard opened this issue Sep 14, 2017 · 2 comments
Labels
bug something broken

Comments

@etpinard
Copy link
Contributor

See https://codepen.io/plotly/pen/KXwaMR

cc @cldougl

@alexcjohnson
Copy link
Collaborator

alexcjohnson commented Sep 14, 2017

oof, I hate to say it but I'm not sure we have a good way to do this within the current framework. You simply can't have data points on a category axis that don't point to exact categories. So the options I see are:

  • build some sort of shim into scatter to allow shifting points away from their data values (cf Add Jitter to Scatterplot-Points #299)
  • build a hook to allow transforms to alter gd.calcdata after it's been created
  • rebuild OHLC as a native trace without transforms

Am I missing some simpler option?

@cldougl
Copy link
Member

cldougl commented Sep 14, 2017

This issue originally came up from someone trying to workaround a scenario similar to #1382 and remove gaps caused by weekends/missing dates. Not setting x (to use default linear coordinates) and then using ticktext works well as a workaround to using category.

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

No branches or pull requests

3 participants