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

Function checkPointData

test/jasmine/tests/click_test.js:113–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 });
112
113 function checkPointData() {
114 expect(futureData.points.length).toEqual(1);
115 expect(clickPassthroughs).toBe(2);
116 expect(contextPassthroughs).toBe(0);
117
118 var pt = futureData.points[0];
119 expect(Object.keys(pt).sort()).toEqual([
120 'data', 'fullData', 'curveNumber', 'pointNumber', 'pointIndex',
121 'bbox',
122 'x', 'y', 'xaxis', 'yaxis', 'xPixel', 'yPixel'
123 ].sort());
124 expect(pt.curveNumber).toEqual(0);
125 expect(pt.pointNumber).toEqual(11);
126 expect(pt.x).toEqual(0.125);
127 expect(pt.y).toEqual(2.125);
128
129 var evt = futureData.event;
130 expect(evt.clientX).toEqual(pointPos[0]);
131 expect(evt.clientY).toEqual(pointPos[1]);
132 }
133
134 it('should contain the correct fields', function() {
135 click(pointPos[0], pointPos[1]);

Callers 1

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