Skip to content

Box pre-computed q1/median/q3 input signature + more quartile-computing methods #4432

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 13 commits into from
Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/plots/cartesian/type_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function setAutoType(ax, data) {

var id = ax._id;
var axLetter = id.charAt(0);
var i;

// support 3d
if(id.indexOf('scene') !== -1) id = axLetter;
Expand All @@ -50,15 +51,22 @@ function setAutoType(ax, data) {
// first check for histograms, as the count direction
// should always default to a linear axis
if(d0.type === 'histogram' &&
axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']) {
axLetter === {v: 'y', h: 'x'}[d0.orientation || 'v']
) {
ax.type = 'linear';
return;
}

var calAttr = axLetter + 'calendar';
var calendar = d0[calAttr];
var opts = {noMultiCategory: !traceIs(d0, 'cartesian') || traceIs(d0, 'noMultiCategory')};
var i;

// To not confuse 2D x/y used for per-box sample points for multicategory coordinates
if(d0.type === 'box' && d0._hasPreCompStats &&
axLetter === {h: 'x', v: 'y'}[d0.orientation || 'v']
) {
opts.noMultiCategory = true;
}

// check all boxes on this x axis to see
// if they're dates, numbers, or categories
Expand Down
Loading