@@ -16,10 +16,11 @@ var Registry = require('../registry');
16
16
var Lib = require ( '../lib' ) ;
17
17
var Plots = require ( '../plots/plots' ) ;
18
18
var AxisIds = require ( '../plots/cartesian/axis_ids' ) ;
19
- var cleanId = AxisIds . cleanId ;
20
- var getFromTrace = AxisIds . getFromTrace ;
21
19
var Color = require ( '../components/color' ) ;
22
20
21
+ var cleanId = AxisIds . cleanId ;
22
+ var getFromTrace = AxisIds . getFromTrace ;
23
+ var traceIs = Registry . traceIs ;
23
24
24
25
// clear the promise queue if one of them got rejected
25
26
exports . clearPromiseQueue = function ( gd ) {
@@ -290,7 +291,7 @@ exports.cleanData = function(data) {
290
291
// error_y.opacity is obsolete - merge into color
291
292
if ( trace . error_y && 'opacity' in trace . error_y ) {
292
293
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' ) ?
294
295
Color . defaultLine :
295
296
dc [ tracei % dc . length ] ) ;
296
297
trace . error_y . color = Color . addOpacity (
@@ -302,8 +303,8 @@ exports.cleanData = function(data) {
302
303
// convert bardir to orientation, and put the data into
303
304
// the axes it's eventually going to be used with
304
305
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' ) ) {
307
308
trace . orientation = 'h' ;
308
309
exports . swapXYData ( trace ) ;
309
310
}
@@ -332,11 +333,11 @@ exports.cleanData = function(data) {
332
333
if ( trace . yaxis ) trace . yaxis = cleanId ( trace . yaxis , 'y' ) ;
333
334
334
335
// scene ids scene1 -> scene
335
- if ( Registry . traceIs ( trace , 'gl3d' ) && trace . scene ) {
336
+ if ( traceIs ( trace , 'gl3d' ) && trace . scene ) {
336
337
trace . scene = Plots . subplotsRegistry . gl3d . cleanId ( trace . scene ) ;
337
338
}
338
339
339
- if ( ! Registry . traceIs ( trace , 'pie' ) && ! Registry . traceIs ( trace , 'bar' ) ) {
340
+ if ( ! traceIs ( trace , 'pie' ) && ! traceIs ( trace , 'bar' ) && trace . type !== 'waterfall' ) {
340
341
if ( Array . isArray ( trace . textposition ) ) {
341
342
for ( i = 0 ; i < trace . textposition . length ; i ++ ) {
342
343
trace . textposition [ i ] = cleanTextPosition ( trace . textposition [ i ] ) ;
0 commit comments