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

Function shapeTest

test/jasmine/assets/domain_ref_components.js:532–563  ·  view source on GitHub ↗
(
    gd,
    opt)

Source from the content-addressed store, hash-verified

530}
531
532function shapeTest(
533 gd,
534 opt) {
535 var xAxNum = opt.xAxNum;
536 var xaxisType = opt.xaxisType;
537 var xaroPos = opt.xaroPos;
538 var yAxNum = opt.yAxNum;
539 var yaxisType = opt.yaxisType;
540 var yaroPos = opt.yaroPos;
541 var aroType = opt.aroType;
542
543 // console.log('gd.layout: ', JSON.stringify(gd.layout));
544 var aro = {
545 type: aroType,
546 line: {
547 color: aroColor
548 }
549 };
550 aroFromAROPos(aro, 'x', xAxNum, xaroPos);
551 aroFromAROPos(aro, 'y', yAxNum, yaroPos);
552 var layout = {
553 shapes: [aro]
554 };
555 // change to log axes if need be
556 logAxisIfAxType(gd.layout, layout, 'x' + xAxNum, xaxisType);
557 logAxisIfAxType(gd.layout, layout, 'y' + yAxNum, yaxisType);
558 // console.log('layout: ', JSON.stringify(layout));
559 return Plotly.relayout(gd, layout)
560 .then(function(gd) {
561 return checkAROPosition(gd, aro);
562 });
563}
564
565function describeShapeComboTest(combo) {
566 var xaxisType = combo[0];

Callers 1

testShapeComboFunction · 0.85

Calls 3

aroFromAROPosFunction · 0.85
logAxisIfAxTypeFunction · 0.85
checkAROPositionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…