Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33a037b

Browse files
committed
unified hoverlabel: fix code style
1 parent 8308111 commit 33a037b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/legend/style.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ module.exports = function style(s, gd, legend) {
290290

291291
function styleWaterfalls(d) {
292292
var trace = d[0].trace;
293+
var isWaterfall = trace.type === 'waterfall';
293294

294-
if(d[0]._distinct && trace.type === 'waterfall') {
295+
if(d[0]._distinct && isWaterfall) {
295296
var cont = d[0].trace[d[0].dir].marker;
296297
d[0].mc = cont.color;
297298
d[0].mlw = cont.line.width;
@@ -300,7 +301,7 @@ module.exports = function style(s, gd, legend) {
300301
}
301302

302303
var ptsData = [];
303-
if(trace.visible && trace.type === 'waterfall') {
304+
if(trace.visible && isWaterfall) {
304305
ptsData = d[0].hasTotals ?
305306
[['increasing', 'M-6,-6V6H0Z'], ['totals', 'M6,6H0L-6,-6H-0Z'], ['decreasing', 'M6,6V-6H0Z']] :
306307
[['increasing', 'M-6,-6V6H6Z'], ['decreasing', 'M6,6V-6H-6Z']];

0 commit comments

Comments
 (0)