plotly.js
plotly.js copied to clipboard
data missing when multiple parcoords traces
Originally reported in https://github.com/plotly/plotly.py/issues/1372
When multiple parcoords
traces are placed in the same figure, the data lines only show up for the first trace. Subsequent traces display their axes, but no data lines.
CodePen: https://codepen.io/jonmmease/pen/xmqqJP
Code:
var fig = {
"data": [
{
"dimensions": [
{
"constraintrange": [
1,
2
],
"label": "A",
"range": [
1,
5
],
"values": [
1,
4
]
},
{
"label": "B",
"range": [
1.5,
5
],
"tickvals": [
1.5,
3,
4.5
],
"values": [
3,
1.5
]
}
],
"domain": {
"x": [
0,
0.45
],
"y": [
0,
1
]
},
"line": {
"color": "blue"
},
"type": "parcoords"
},
{
"dimensions": [
{
"constraintrange": [
1,
2
],
"label": "C",
"range": [
1,
5
],
"values": [
1,
4
]
},
{
"label": "D",
"range": [
1.5,
5
],
"tickvals": [
1.5,
3,
4.5
],
"values": [
3,
1.5
]
}
],
"domain": {
"x": [
0.55,
1
],
"y": [
0,
1
]
},
"line": {
"color": "blue"
},
"type": "parcoords"
}
],
"layout": {
"title": "Multi-Parcoords Diagram"
}
}
Plotly.plot('plotly-div', fig);
This worked fine in 1.31.0, seems to have broken in 1.32.0, and remains broken in 1.33.0.
Likely related to https://github.com/plotly/plotly.js/pull/2159.
This is the result of this commit: https://github.com/plotly/plotly.js/pull/2159/commits/e6fcbf51de4b41db470b7194835b20f57f06098f
Also mentioned here in the forum https://community.plot.ly/t/subplots-with-parallel-coordinates-not-showing-second-subplot/35239/2
And here https://stackoverflow.com/questions/60393815/plotly-parallel-coordinates-charts-dont-display-correctly-in-subplots
Hi, I think the bug is not related to the constraints on the graph. I had the same issue with the stackoverflow post. With multiple subplots, only the first graph would show up...