@@ -41,7 +41,7 @@ var numericNameWarningCount = 0;
41
41
var numericNameWarningCountLimit = 5 ;
42
42
43
43
/**
44
- * Main plot-creation function
44
+ * Internal plot-creation function
45
45
*
46
46
* @param {string id or DOM element } gd
47
47
* the id or DOM element of the graph container div
@@ -61,7 +61,7 @@ var numericNameWarningCountLimit = 5;
61
61
* object containing `data`, `layout`, `config`, and `frames` members
62
62
*
63
63
*/
64
- function plot ( gd , data , layout , config ) {
64
+ function _doPlot ( gd , data , layout , config ) {
65
65
var frames ;
66
66
67
67
gd = Lib . getGraphDiv ( gd ) ;
@@ -83,7 +83,7 @@ function plot(gd, data, layout, config) {
83
83
// if there's no data or layout, and this isn't yet a plotly plot
84
84
// container, log a warning to help plotly.js users debug
85
85
if ( ! data && ! layout && ! Lib . isPlotDiv ( gd ) ) {
86
- Lib . warn ( 'Calling Plotly.plot as if redrawing ' +
86
+ Lib . warn ( 'Calling _doPlot as if redrawing ' +
87
87
'but this container doesn\'t yet have a plot.' , gd ) ;
88
88
}
89
89
@@ -139,7 +139,7 @@ function plot(gd, data, layout, config) {
139
139
var fullLayout = gd . _fullLayout ;
140
140
var hasCartesian = fullLayout . _has ( 'cartesian' ) ;
141
141
142
- // so we don't try to re-call Plotly.plot from inside
142
+ // so we don't try to re-call _doPlot from inside
143
143
// legend and colorbar, if margins changed
144
144
fullLayout . _replotting = true ;
145
145
@@ -167,7 +167,7 @@ function plot(gd, data, layout, config) {
167
167
// prepare the data and find the autorange
168
168
169
169
// generate calcdata, if we need to
170
- // to force redoing calcdata, just delete it before calling Plotly.plot
170
+ // to force redoing calcdata, just delete it before calling _doPlot
171
171
var recalc = ! gd . calcdata || gd . calcdata . length !== ( gd . _fullData || [ ] ) . length ;
172
172
if ( recalc ) Plots . doCalcdata ( gd ) ;
173
173
@@ -552,7 +552,7 @@ function redraw(gd) {
552
552
helpers . cleanLayout ( gd . layout ) ;
553
553
554
554
gd . calcdata = undefined ;
555
- return exports . plot ( gd ) . then ( function ( ) {
555
+ return exports . _doPlot ( gd ) . then ( function ( ) {
556
556
gd . emit ( 'plotly_redraw' ) ;
557
557
return gd ;
558
558
} ) ;
@@ -573,7 +573,7 @@ function newPlot(gd, data, layout, config) {
573
573
Plots . cleanPlot ( [ ] , { } , gd . _fullData || [ ] , gd . _fullLayout || { } ) ;
574
574
575
575
Plots . purge ( gd ) ;
576
- return exports . plot ( gd , data , layout , config ) ;
576
+ return exports . _doPlot ( gd , data , layout , config ) ;
577
577
}
578
578
579
579
/**
@@ -1284,7 +1284,7 @@ function restyle(gd, astr, val, _traces) {
1284
1284
var seq = [ ] ;
1285
1285
1286
1286
if ( flags . fullReplot ) {
1287
- seq . push ( exports . plot ) ;
1287
+ seq . push ( exports . _doPlot ) ;
1288
1288
} else {
1289
1289
seq . push ( Plots . previousPromises ) ;
1290
1290
@@ -2313,7 +2313,7 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
2313
2313
// relayoutFlags.layoutReplot and restyleFlags.fullReplot are true
2314
2314
seq . push ( subroutines . layoutReplot ) ;
2315
2315
} else if ( restyleFlags . fullReplot ) {
2316
- seq . push ( exports . plot ) ;
2316
+ seq . push ( exports . _doPlot ) ;
2317
2317
} else {
2318
2318
seq . push ( Plots . previousPromises ) ;
2319
2319
axRangeSupplyDefaultsByPass ( gd , relayoutFlags , relayoutSpecs ) || Plots . supplyDefaults ( gd ) ;
@@ -2705,7 +2705,7 @@ function react(gd, data, layout, config) {
2705
2705
} ) ;
2706
2706
} else if ( restyleFlags . fullReplot || relayoutFlags . layoutReplot || configChanged ) {
2707
2707
gd . _fullLayout . _skipDefaults = true ;
2708
- seq . push ( exports . plot ) ;
2708
+ seq . push ( exports . _doPlot ) ;
2709
2709
} else {
2710
2710
for ( var componentType in relayoutFlags . arrays ) {
2711
2711
var indices = relayoutFlags . arrays [ componentType ] ;
@@ -3604,7 +3604,7 @@ function deleteFrames(gd, frameList) {
3604
3604
}
3605
3605
3606
3606
/**
3607
- * Purge a graph container div back to its initial pre-Plotly.plot state
3607
+ * Purge a graph container div back to its initial pre-_doPlot state
3608
3608
*
3609
3609
* @param {string id or DOM element } gd
3610
3610
* the id or DOM element of the graph container div
@@ -3627,7 +3627,7 @@ function purge(gd) {
3627
3627
// remove plot container
3628
3628
if ( fullLayout . _container ) fullLayout . _container . remove ( ) ;
3629
3629
3630
- // in contrast to Plotly.Plots .purge which does NOT clear _context!
3630
+ // in contrast to _doPlots .purge which does NOT clear _context!
3631
3631
delete gd . _context ;
3632
3632
3633
3633
return gd ;
@@ -3808,7 +3808,7 @@ exports.moveTraces = moveTraces;
3808
3808
exports . prependTraces = prependTraces ;
3809
3809
3810
3810
exports . newPlot = newPlot ;
3811
- exports . plot = plot ;
3811
+ exports . _doPlot = _doPlot ;
3812
3812
exports . purge = purge ;
3813
3813
3814
3814
exports . react = react ;
0 commit comments