Skip to content

Commit b8c71e1

Browse files
committed
Add group to plot
1 parent 6b896d8 commit b8c71e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/plots/cartesian/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ exports.plot = function(gd, traces, transitionOpts, makeOnCompleteCallback) {
6363
// Skip trace if whitelist provided and it's not whitelisted:
6464
// if (Array.isArray(traces) && traces.indexOf(i) === -1) continue;
6565
if(trace.xaxis + trace.yaxis === subplot) {
66+
// XXX: Should trace carpet dependencies. Only replot all carpet plots if the carpet
67+
// axis has actually changed:
68+
//
6669
// If this trace is specifically requested, add it to the list:
67-
if(traces.indexOf(trace.index) !== -1) {
70+
if(traces.indexOf(trace.index) !== -1 || trace.carpet) {
6871
// Okay, so example: traces 0, 1, and 2 have fill = tonext. You animate
6972
// traces 0 and 2. Trace 1 also needs to be updated, otherwise its fill
7073
// is outdated. So this retroactively adds the previous trace if the
@@ -300,6 +303,7 @@ function makeSubplotLayer(plotinfo) {
300303
joinLayer(parent, 'g', 'imagelayer');
301304
joinLayer(parent, 'g', 'maplayer');
302305
joinLayer(parent, 'g', 'barlayer');
306+
joinLayer(parent, 'g', 'carpetlayer');
303307
joinLayer(parent, 'g', 'boxlayer');
304308
joinLayer(parent, 'g', 'scatterlayer');
305309
}

0 commit comments

Comments
 (0)