@@ -63,7 +63,7 @@ Plotly.plot = function(gd, data, layout, config) {
6363 // if there's no data or layout, and this isn't yet a plotly plot
6464 // container, log a warning to help plotly.js users debug
6565 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 ' +
6767 'but this container doesn\'t yet have a plot.' , gd ) ;
6868 }
6969
@@ -539,7 +539,7 @@ function cleanLayout(layout) {
539539 }
540540
541541 if ( layout . annotations !== undefined && ! Array . isArray ( layout . annotations ) ) {
542- console . log ( 'annotations must be an array') ;
542+ Lib . warn ( 'Annotations must be an array. ') ;
543543 delete layout . annotations ;
544544 }
545545 var annotationsLen = ( layout . annotations || [ ] ) . length ;
@@ -561,7 +561,7 @@ function cleanLayout(layout) {
561561 }
562562
563563 if ( layout . shapes !== undefined && ! Array . isArray ( layout . shapes ) ) {
564- console . log ( 'shapes must be an array') ;
564+ Lib . warn ( 'Shapes must be an array. ') ;
565565 delete layout . shapes ;
566566 }
567567 var shapesLen = ( layout . shapes || [ ] ) . length ;
@@ -785,9 +785,7 @@ function cleanData(data, existingData) {
785785
786786 // sanitize rgb(fractions) and rgba(fractions) that old tinycolor
787787 // supported, but new tinycolor does not because they're not valid css
788- Lib . markTime ( 'finished rest of cleanData, starting color' ) ;
789788 Color . clean ( trace ) ;
790- Lib . markTime ( 'finished cleanData color.clean' ) ;
791789 }
792790}
793791
@@ -816,7 +814,7 @@ Plotly.redraw = function(gd) {
816814 gd = getGraphDiv ( gd ) ;
817815
818816 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 ) ;
820818 return ;
821819 }
822820
@@ -891,7 +889,6 @@ function doCalcdata(gd) {
891889 if ( ! cd [ 0 ] . t ) cd [ 0 ] . t = { } ;
892890 cd [ 0 ] . trace = trace ;
893891
894- Lib . markTime ( 'done with calcdata for ' + i ) ;
895892 calcdata [ i ] = cd ;
896893 }
897894}
@@ -1548,7 +1545,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
15481545 if ( traces === undefined ) traces = val ; // the 3-arg form
15491546 }
15501547 else {
1551- console . log ( 'restyle fail', astr , val , traces ) ;
1548+ Lib . warn ( 'Restyle fail. ', astr , val , traces ) ;
15521549 return Promise . reject ( ) ;
15531550 }
15541551
@@ -2092,7 +2089,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
20922089 if ( typeof astr === 'string' ) aobj [ astr ] = val ;
20932090 else if ( Lib . isPlainObject ( astr ) ) aobj = astr ;
20942091 else {
2095- console . log ( 'relayout fail', astr , val ) ;
2092+ Lib . warn ( 'Relayout fail. ', astr , val ) ;
20962093 return Promise . reject ( ) ;
20972094 }
20982095
@@ -2283,7 +2280,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
22832280 }
22842281 else undoit [ ai ] = obji ;
22852282 }
2286- else console . log ( '???' , aobj ) ;
2283+ else Lib . log ( '???' , aobj ) ;
22872284 }
22882285 if ( ( refAutorange ( obji , 'x' ) || refAutorange ( obji , 'y' ) ) &&
22892286 ! Lib . containsAny ( ai , [ 'color' , 'opacity' , 'align' , 'dash' ] ) ) {
0 commit comments