plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

data missing when multiple parcoords traces

Open jonmmease opened this issue 6 years ago • 6 comments

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);

newplot-5

This worked fine in 1.31.0, seems to have broken in 1.32.0, and remains broken in 1.33.0.

jonmmease avatar Dec 21 '18 11:12 jonmmease

Codepen

archmoj avatar May 30 '19 03:05 archmoj

Likely related to https://github.com/plotly/plotly.js/pull/2159.

archmoj avatar May 30 '19 14:05 archmoj

This is the result of this commit: https://github.com/plotly/plotly.js/pull/2159/commits/e6fcbf51de4b41db470b7194835b20f57f06098f Screenshot from 2019-05-30 14-48-49

archmoj avatar May 30 '19 18:05 archmoj

Also mentioned here in the forum https://community.plot.ly/t/subplots-with-parallel-coordinates-not-showing-second-subplot/35239/2

emmanuelle avatar Feb 20 '20 17:02 emmanuelle

And here https://stackoverflow.com/questions/60393815/plotly-parallel-coordinates-charts-dont-display-correctly-in-subplots

heroldn avatar Nov 21 '21 11:11 heroldn

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...

tzhang-lilly avatar Jun 22 '22 14:06 tzhang-lilly