Skip to content

Ensure empty candlestick traces don't lead to autotyped 'category' x-axis #1359

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

Merged
merged 3 commits into from
Feb 8, 2017

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Feb 7, 2017

fixes #1357

- box traces have a special algo to handle the case where
  trace 'name' can appear on axis ticks.
@etpinard etpinard added status: reviewable bug something broken labels Feb 7, 2017
@@ -207,6 +207,7 @@ function isBoxWithoutPositionCoords(trace, axLetter) {

return (
Registry.traceIs(trace, 'box') &&
trace._fullInput.type === 'box' &&
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/plotly/streambed/pull/3236 for the details on why axis auto type with box traces needs more attention.

I'm debating whether we should add a fallback here for _fullInput ?

var trace0 = { type: 'candlestick' };
var out = _supply([trace0], { xaxis: {} });

expect(out._fullLayout.xaxis.type).toEqual('linear');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this patch, this assertions resulted in 'category'.

@VeraZab
Copy link

VeraZab commented Feb 7, 2017

💃 tested on streambed and this fixes the grouping problem! :)

@etpinard etpinard merged commit 32ccae5 into master Feb 8, 2017
@etpinard etpinard deleted the candlestick-no-data-ax-autotype branch February 8, 2017 19:34
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

Successfully merging this pull request may close these issues.

financial charts: calling relayout(gd, {'xaxis.type': '-'}), returns gd.layout.xaxis.type = 'category'
2 participants