@@ -63,7 +63,7 @@ Plotly.plot = function(gd, data, layout, config) {
63
63
// if there's no data or layout, and this isn't yet a plotly plot
64
64
// container, log a warning to help plotly.js users debug
65
65
if ( ! data && ! layout && ! Lib . isPlotDiv ( gd ) ) {
66
- console . log ( 'Warning: calling Plotly.plot as if redrawing ' +
66
+ Lib . warn ( 'Calling Plotly.plot as if redrawing ' +
67
67
'but this container doesn\'t yet have a plot.' , gd ) ;
68
68
}
69
69
@@ -539,7 +539,7 @@ function cleanLayout(layout) {
539
539
}
540
540
541
541
if ( layout . annotations !== undefined && ! Array . isArray ( layout . annotations ) ) {
542
- console . log ( 'annotations must be an array') ;
542
+ Lib . warn ( 'Annotations must be an array. ') ;
543
543
delete layout . annotations ;
544
544
}
545
545
var annotationsLen = ( layout . annotations || [ ] ) . length ;
@@ -561,7 +561,7 @@ function cleanLayout(layout) {
561
561
}
562
562
563
563
if ( layout . shapes !== undefined && ! Array . isArray ( layout . shapes ) ) {
564
- console . log ( 'shapes must be an array') ;
564
+ Lib . warn ( 'Shapes must be an array. ') ;
565
565
delete layout . shapes ;
566
566
}
567
567
var shapesLen = ( layout . shapes || [ ] ) . length ;
@@ -785,9 +785,7 @@ function cleanData(data, existingData) {
785
785
786
786
// sanitize rgb(fractions) and rgba(fractions) that old tinycolor
787
787
// supported, but new tinycolor does not because they're not valid css
788
- Lib . markTime ( 'finished rest of cleanData, starting color' ) ;
789
788
Color . clean ( trace ) ;
790
- Lib . markTime ( 'finished cleanData color.clean' ) ;
791
789
}
792
790
}
793
791
@@ -816,7 +814,7 @@ Plotly.redraw = function(gd) {
816
814
gd = getGraphDiv ( gd ) ;
817
815
818
816
if ( ! Lib . isPlotDiv ( gd ) ) {
819
- console . log ( 'This element is not a Plotly Plot ' , gd ) ;
817
+ Lib . warn ( 'This element is not a Plotly plot. ' , gd ) ;
820
818
return ;
821
819
}
822
820
@@ -891,7 +889,6 @@ function doCalcdata(gd) {
891
889
if ( ! cd [ 0 ] . t ) cd [ 0 ] . t = { } ;
892
890
cd [ 0 ] . trace = trace ;
893
891
894
- Lib . markTime ( 'done with calcdata for ' + i ) ;
895
892
calcdata [ i ] = cd ;
896
893
}
897
894
}
@@ -1548,7 +1545,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
1548
1545
if ( traces === undefined ) traces = val ; // the 3-arg form
1549
1546
}
1550
1547
else {
1551
- console . log ( 'restyle fail', astr , val , traces ) ;
1548
+ Lib . warn ( 'Restyle fail. ', astr , val , traces ) ;
1552
1549
return Promise . reject ( ) ;
1553
1550
}
1554
1551
@@ -2092,7 +2089,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
2092
2089
if ( typeof astr === 'string' ) aobj [ astr ] = val ;
2093
2090
else if ( Lib . isPlainObject ( astr ) ) aobj = astr ;
2094
2091
else {
2095
- console . log ( 'relayout fail', astr , val ) ;
2092
+ Lib . warn ( 'Relayout fail. ', astr , val ) ;
2096
2093
return Promise . reject ( ) ;
2097
2094
}
2098
2095
@@ -2283,7 +2280,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
2283
2280
}
2284
2281
else undoit [ ai ] = obji ;
2285
2282
}
2286
- else console . log ( '???' , aobj ) ;
2283
+ else Lib . log ( '???' , aobj ) ;
2287
2284
}
2288
2285
if ( ( refAutorange ( obji , 'x' ) || refAutorange ( obji , 'y' ) ) &&
2289
2286
! Lib . containsAny ( ai , [ 'color' , 'opacity' , 'align' , 'dash' ] ) ) {
0 commit comments