Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 3 additions & 2 deletions src/plots/cartesian/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ function makeSubplotData(gd) {
}

function makeSubplotLayer(gd, plotinfo) {
var fullLayout = gd._fullLayout;
var plotgroup = plotinfo.plotgroup;
var id = plotinfo.id;

Expand All @@ -565,9 +566,9 @@ function makeSubplotLayer(gd, plotinfo) {

var xLayer = constants.layerValue2layerClass[plotinfo.xaxis.layer];
var yLayer = constants.layerValue2layerClass[plotinfo.yaxis.layer];
var hasOnlyLargeSploms = gd._fullLayout._hasOnlyLargeSploms;
var hasOnlyLargeSploms = fullLayout._hasOnlyLargeSploms;

if(!plotinfo.mainplot) {
if(!plotinfo.mainplot || fullLayout._zindices.length > 1) {
if(hasOnlyLargeSploms) {
// TODO could do even better
// - we don't need plot (but we would have to mock it in lsInner
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"data": [
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [1, 2, 3, 4],
"zorder": 1
},
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [2, 3, 4, 1],
"zorder": 2
},
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [3, 4, 1, 2],
"xaxis": "x2",
"zorder": 3
},
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [4, 1, 2, 3],
"xaxis": "x2",
"yaxis": "y2",
"zorder": 4
}
],
"layout": {
"showlegend": true,
"title": {
"text": "zorder overlayed subplots - multiple on the same subplot",
"subtitle": {
"text": "Orange trace is displayed on top!"
}
},
"width": 600,
"height": 400,
"xaxis2": {
"overlaying": "x",
"side": "top"
},
"yaxis2": {
"overlaying": "y",
"side": "right"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"data": [
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [1, 2, 3, 4],
"zorder": 4
},
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [2, 3, 4, 1],
"zorder": 3
},
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [3, 4, 1, 2],
"xaxis": "x2",
"zorder": 2
},
{
"line": {
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [4, 1, 2, 3],
"xaxis": "x2",
"yaxis": "y2",
"zorder": 1
}
],
"layout": {
"showlegend": true,
"title": {
"text": "zorder overlayed subplots - multiple on the same subplot",
"subtitle": {
"text": "Orange trace is displayed on top!"
}
},
"width": 600,
"height": 400,
"xaxis2": {
"overlaying": "x",
"side": "top"
},
"yaxis2": {
"overlaying": "y",
"side": "right"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"data": [
{
"line": {
"color": "blue",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [1, 2, 3, 4],
"zorder": 8
},
{
"line": {
"color": "darkblue",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [1.2, 2.2, 3.2, 4.2],
"zorder": 7
},
{
"line": {
"color": "orange",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [2, 3, 4, 1],
"yaxis": "y2",
"zorder": 6
},
{
"line": {
"color": "darkorange",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [2.2, 3.2, 4.2, 1.2],
"yaxis": "y2",
"zorder": 5
},
{
"line": {
"color": "green",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [3, 4, 1, 2],
"xaxis": "x2",
"zorder": 4
},
{
"line": {
"color": "darkgreen",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [3.2, 4.2, 1.2, 2.2],
"xaxis": "x2",
"zorder": 3
},
{
"line": {
"color": "red",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [4, 1, 2, 3],
"xaxis": "x2",
"yaxis": "y2",
"zorder": 2
},
{
"line": {
"color": "darkred",
"width": 15
},
"mode": "lines",
"x": ["A", "B", "C", "D"],
"y": [4.2, 1.2, 2.2, 3.2],
"xaxis": "x2",
"yaxis": "y2",
"zorder": 1
}
],
"layout": {
"showlegend": true,
"title": {
"text": "zorder overlayed subplots",
"subtitle": {
"text": "case of multiple traces in one subplot"
}
},
"width": 600,
"height": 400,
"xaxis2": {
"overlaying": "x",
"side": "top"
},
"yaxis2": {
"overlaying": "y",
"side": "right"
}
}
}