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

Function assertRangeDomain

test/jasmine/tests/axes_test.js:1835–1857  ·  view source on GitHub ↗
(axName, range, domainIn, domainOut, msg)

Source from the content-addressed store, hash-verified

1833 });
1834
1835 function assertRangeDomain(axName, range, domainIn, domainOut, msg) {
1836 var ax = gd._fullLayout[axName];
1837 var axIn = ax._input;
1838
1839 msg = msg || axName;
1840
1841 expect(ax.domain).toBeCloseToArray(domainOut, 5,
1842 'full domain, ' + msg);
1843
1844 // the actual domain in layout is changed, but the original is
1845 // cached in _fullLayout for responsiveness to later changes.
1846 // (or may be deleted if domain is not adjusted)
1847 expect(axIn.domain || ax.domain).toBeCloseToArray(ax.domain, 5,
1848 'layout domain, ' + msg);
1849 expect(ax._inputDomain || ax.domain).toBeCloseToArray(domainIn, 5,
1850 '_inputDomain, ' + msg);
1851
1852 // input and full range always match
1853 expect(ax.range.map(ax.r2l)).toBeCloseToArray(range.map(ax.r2l), 5,
1854 'range, ' + msg + ': ' + ax.range);
1855 expect(axIn.range.map(ax.r2l)).toBeCloseToArray(ax.range.map(ax.r2l), 5,
1856 'input range, ' + msg + ': ' + ax.range);
1857 }
1858
1859 it('can change axis domain on call to react when template is present', function(done) {
1860 Plotly.newPlot(gd,

Callers 1

axes_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…