@@ -16,10 +16,11 @@ var Registry = require('../registry');
1616var Lib = require ( '../lib' ) ;
1717var Plots = require ( '../plots/plots' ) ;
1818var AxisIds = require ( '../plots/cartesian/axis_ids' ) ;
19- var cleanId = AxisIds . cleanId ;
20- var getFromTrace = AxisIds . getFromTrace ;
2119var Color = require ( '../components/color' ) ;
2220
21+ var cleanId = AxisIds . cleanId ;
22+ var getFromTrace = AxisIds . getFromTrace ;
23+ var traceIs = Registry . traceIs ;
2324
2425// clear the promise queue if one of them got rejected
2526exports . clearPromiseQueue = function ( gd ) {
@@ -290,7 +291,7 @@ exports.cleanData = function(data) {
290291 // error_y.opacity is obsolete - merge into color
291292 if ( trace . error_y && 'opacity' in trace . error_y ) {
292293 var dc = Color . defaults ;
293- var yeColor = trace . error_y . color || ( Registry . traceIs ( trace , 'bar' ) ?
294+ var yeColor = trace . error_y . color || ( traceIs ( trace , 'bar' ) ?
294295 Color . defaultLine :
295296 dc [ tracei % dc . length ] ) ;
296297 trace . error_y . color = Color . addOpacity (
@@ -302,8 +303,8 @@ exports.cleanData = function(data) {
302303 // convert bardir to orientation, and put the data into
303304 // the axes it's eventually going to be used with
304305 if ( 'bardir' in trace ) {
305- if ( trace . bardir === 'h' && ( Registry . traceIs ( trace , 'bar' ) ||
306- trace . type . substr ( 0 , 9 ) === 'histogram' ) ) {
306+ if ( trace . bardir === 'h' && ( traceIs ( trace , 'bar' ) ||
307+ trace . type . substr ( 0 , 9 ) === 'histogram' ) ) {
307308 trace . orientation = 'h' ;
308309 exports . swapXYData ( trace ) ;
309310 }
@@ -332,11 +333,11 @@ exports.cleanData = function(data) {
332333 if ( trace . yaxis ) trace . yaxis = cleanId ( trace . yaxis , 'y' ) ;
333334
334335 // scene ids scene1 -> scene
335- if ( Registry . traceIs ( trace , 'gl3d' ) && trace . scene ) {
336+ if ( traceIs ( trace , 'gl3d' ) && trace . scene ) {
336337 trace . scene = Plots . subplotsRegistry . gl3d . cleanId ( trace . scene ) ;
337338 }
338339
339- if ( ! Registry . traceIs ( trace , 'pie' ) && ! Registry . traceIs ( trace , 'bar' ) ) {
340+ if ( ! traceIs ( trace , 'pie' ) && ! traceIs ( trace , 'bar' ) && trace . type !== 'waterfall' ) {
340341 if ( Array . isArray ( trace . textposition ) ) {
341342 for ( i = 0 ; i < trace . textposition . length ; i ++ ) {
342343 trace . textposition [ i ] = cleanTextPosition ( trace . textposition [ i ] ) ;
0 commit comments