MCPcopy Index your code
hub / github.com/plotly/plotly.js / zoomIn

Function zoomIn

test/jasmine/tests/axes_test.js:7915–7933  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7913 var testCount = 0;
7914
7915 var zoomIn = function() {
7916 promise = promise.then(function() {
7917 getZoomInButton(gd).click();
7918 var xLabels = Axes.calcTicks(gd._fullLayout.xaxis);
7919 var formatter = getFormatter(Axes.getTickFormat(gd._fullLayout.xaxis));
7920 var expectedLabels = xLabels.map(function(d) {return formatter(new Date(d.x));});
7921 var actualLabels = xLabels.map(function(d) {return d.text;});
7922 expect(expectedLabels).toEqual(actualLabels);
7923 testCount++;
7924
7925 if(gd._fullLayout.xaxis.dtick > 1) {
7926 zoomIn();
7927 } else {
7928 // make sure we tested as many levels as we thought we would
7929 expect(testCount).toBe(32);
7930 done();
7931 }
7932 });
7933 };
7934 zoomIn();
7935 });
7936

Callers 1

axes_test.jsFile · 0.85

Calls 4

getZoomInButtonFunction · 0.85
doneFunction · 0.85
getFormatterFunction · 0.70
formatterFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…