Skip to content

Conversation

mikolalysenko
Copy link
Contributor

@etpinard
Copy link
Contributor

Great. Looks like a solid first step. 🎉

Unfortunately, npm run test-image (after removing this line) is still struggling.

Running individual tests e.g. npm run test-image -- gl2d_stacked_subplots.json seems to behave fine. But, running multiple tests in a row leads to misplaced axes, hover spikes showing, and sometimes, even blank canvases.

@mikolalysenko Luckily, the problem is reproducible from within the test dashboard, by pasting the following in the console:

var list = [
  'gl2d_10',
  'gl2d_12',
  'gl2d_14',
  'gl2d_17',
  'gl2d_22',
  'gl2d_24',
  'gl2d_28',
  'gl2d_30',
  'gl2d_32',
];

list.forEach(function(mock) {
  Tabs.getMock(mock, function(err, fig) {
    var gd = Tabs.fresh(mock);  // appends new graph div with id set to mock name

    Plotly.plot(gd, fig.data, fig.layout).then(function() {
      Plotly.downloadImage(gd).then(function() {
        Plotly.purge(gd);  // this destroys the scene2d instances too!
        gd.parentNode.removeChild(gd);
      });
    });

  });
});

You can also use Plotly.toImage instead of Plotly.downloadImage to inspect the resulting dataURL.

Adding @monfera and @bpostlethwaite to the conversation who may have some insights on the problem.

@etpinard
Copy link
Contributor

closed in favor of #735

@etpinard etpinard closed this Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug something broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants