MCPcopy
hub / github.com/plotly/plotly.js / assertParcoordsCB

Function assertParcoordsCB

test/jasmine/tests/colorbar_test.js:328–340  ·  view source on GitHub ↗
(present, expandedMargin)

Source from the content-addressed store, hash-verified

326 // also tests impliedEdits for colorbars in containers
327 it('can show and hide parcoords colorbars', function(done) {
328 function assertParcoordsCB(present, expandedMargin) {
329 var colorbars = d3Select(gd).selectAll('.colorbar');
330 expect(colorbars.size()).toBe(present ? 1 : 0);
331
332 var yAxes = d3Select(gd).selectAll('.parcoords .y-axis');
333 expect(yAxes.size()).toBe(2);
334 var transform = yAxes[0][1].getAttribute('transform');
335 if(expandedMargin) expect(transform).not.toBe('translate(400,0)');
336 else expect(transform).toBe('translate(400,0)');
337
338 var cbfills = colorbars.selectAll('.cbfill');
339 expect(cbfills.size()).toBe(present ? 1 : 0);
340 }
341
342 var thickPx, lenFrac;
343

Callers 1

colorbar_test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…