(astr, vals, exps, selector, fn)
| 388 | } |
| 389 | |
| 390 | function toggle(astr, vals, exps, selector, fn) { |
| 391 | return function() { |
| 392 | return Plotly.relayout(gd, astr, vals[0]).then(function() { |
| 393 | fn(selector, exps[0], astr + ' ' + vals[0]); |
| 394 | return Plotly.relayout(gd, astr, vals[1]); |
| 395 | }) |
| 396 | .then(function() { |
| 397 | fn(selector, exps[1], astr + ' ' + vals[1]); |
| 398 | return Plotly.relayout(gd, astr, vals[0]); |
| 399 | }) |
| 400 | .then(function() { |
| 401 | fn(selector, exps[0], astr + ' ' + vals[0]); |
| 402 | }); |
| 403 | }; |
| 404 | } |
| 405 | |
| 406 | Plotly.newPlot(gd, fig) |
| 407 | .then(toggle( |
no test coverage detected
searching dependent graphs…