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

Function _newPlot

test/jasmine/tests/scattergl_select_test.js:14–30  ·  view source on GitHub ↗
(gd, arg2, arg3, arg4)

Source from the content-addressed store, hash-verified

12var readPixel = require('../assets/read_pixel');
13
14function _newPlot(gd, arg2, arg3, arg4) {
15 var fig;
16 if(Array.isArray(arg2)) {
17 fig = {
18 data: arg2,
19 layout: arg3,
20 config: arg4
21 };
22 } else fig = arg2;
23
24 if(!fig.layout) fig.layout = {};
25 if(!fig.layout.newselection) fig.layout.newselection = {};
26 fig.layout.newselection.mode = 'gradual';
27 // complex ouline creation are mainly tested in "gradual" mode here
28
29 return Plotly.newPlot(gd, fig);
30}
31
32function drag(gd, path) {
33 var len = path.length;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…