Skip to content
Merged
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
Next Next commit
ensure only 'previous' trace of same subplot are included in calcdata
- which erroneous traces in multi-violin subplots.
  • Loading branch information
etpinard committed Nov 24, 2016
commit 6c58cf59cca0efd5357c522656f7e3a0ec879fc6
9 changes: 6 additions & 3 deletions src/plots/cartesian/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {
// traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill
// is outdated. So this retroactively adds the previous trace if the
// traces are interdependent.
if(pcd &&
['tonextx', 'tonexty', 'tonext'].indexOf(trace.fill) !== -1 &&
cdSubplot.indexOf(pcd) === -1) {
if(
pcd &&
pcd[0].trace.xaxis + pcd[0].trace.yaxis === subplot &&
Copy link
Contributor Author

@etpinard etpinard Nov 24, 2016

Choose a reason for hiding this comment

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

@rreusser does this look right to you?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahhh, I see. cd is all the subplots. Yup, fix looks good to me.

['tonextx', 'tonexty', 'tonext'].indexOf(trace.fill) !== -1 &&
cdSubplot.indexOf(pcd) === -1
) {
cdSubplot.push(pcd);
}

Expand Down