Skip to content

Commit bed6842

Browse files
committed
dont coerce waterfall textinfo if textposition is none
1 parent 3159fab commit bed6842

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/traces/bar/plot.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ function getText(calcTrace, index, xa, ya) {
475475
var trace = calcTrace[0].trace;
476476

477477
var value;
478-
if(!trace.textinfo || trace.textinfo === 'none') {
478+
if(!trace.textinfo) {
479479
value = helpers.getValue(trace.text, index);
480480
} else {
481481
value = calcTextinfo(calcTrace, index, xa, ya);

src/traces/waterfall/defaults.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
4545
coerce('width');
4646

4747
coerce('text');
48-
coerce('textinfo');
4948

5049
coerce('hovertext');
5150
coerce('hovertemplate');
5251

5352
handleText(traceIn, traceOut, layout, coerce, false);
5453

54+
// TODO: move this block to bar handleText if/when textinfo implimented for bars/histograms
55+
if(traceOut.textposition !== 'none') {
56+
coerce('textinfo');
57+
}
58+
5559
handleDirection(coerce, 'increasing', INCREASING_COLOR);
5660
handleDirection(coerce, 'decreasing', DECREASING_COLOR);
5761
handleDirection(coerce, 'totals', TOTALS_COLOR);

0 commit comments

Comments
 (0)