Skip to content

Fix histogram bingroup algo when calendars module is not registered - #4439

Merged
etpinard merged 2 commits into
masterfrom
histogram-bingroup-wo-calendars
Dec 24, 2019
Merged

Fix histogram bingroup algo when calendars module is not registered#4439
etpinard merged 2 commits into
masterfrom
histogram-bingroup-wo-calendars

Conversation

@etpinard

Copy link
Copy Markdown
Contributor

By adding a fallback in the trace calendar getter in Histogram.crossTraceCalc so that when the Calendars module isn't registered (thus making _fullData[i].(x|y)calendar === undefined), we're still able to group traces in the correct bin groups.

fixes#4429

Note also, that at present we only register calendars in the "main" plotly.js bundles:

// components
Plotly.register([
require('./calendars')
]);

cc @archmoj

... so that when the Calendars module isn't registered (thus making
`_fullData[i].(x|y)calendar` undefined), we're still
able to group traces in the correct bin groups
@archmoj

Copy link
Copy Markdown
Contributor

Nicely done.
💃

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugsomething broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong bar layout on the horizontal axis when using 'histogram' in plotly-cartesian

2 participants

@etpinard@archmoj