Skip to content

Commit de1ad0d

Browse files
author
Jaroslaw Odzga
committed
fixed formatting
1 parent 8c01911 commit de1ad0d

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

tools/tracevis/js/waterfall.js

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -131,51 +131,50 @@ var WATERFALL = (function() {
131131
.on("click", toggleCollapse);
132132

133133
trace.classed("collapsed", function(d) { return d._children; });
134-
135-
var verticalEnter = traceEnter.filter( function(d) { return d.children || d._children;; } )
134+
135+
var verticalEnter = traceEnter.filter( function(d) { return d.children || d._children; } )
136+
136137
verticalEnter.append("line")
137-
.classed("vertical", true)
138-
.attr("x1", -3)
139-
.attr("y1", 4)
140-
.attr("x2", -3)
141-
.attr("y2", function (d) {
142-
if (d.lowestChild)
143-
return (d.lowestChild - d.level) * (barHeight + barSpacing);
144-
else
145-
4;
146-
} )
147-
.style("stroke", "black")
148-
.style("stroke-width", 1)
149-
.style("stroke-linecap", "round")
150-
.style("stroke-dasharray", 3);
138+
.classed("vertical", true)
139+
.attr("x1", -3)
140+
.attr("y1", 4)
141+
.attr("x2", -3)
142+
.attr("y2", function (d) {
143+
if (d.lowestChild)
144+
return (d.lowestChild - d.level) * (barHeight + barSpacing);
145+
else
146+
4;
147+
} )
148+
.style("stroke", "black")
149+
.style("stroke-width", 1)
150+
.style("stroke-linecap", "round")
151+
.style("stroke-dasharray", 3);
151152

152153
var vertical = trace.select("line.vertical");
153154

154155
vertical.attr("y2", function (d) {
155-
if (d.lowestChild)
156-
return (d.lowestChild - d.level) * (barHeight + barSpacing)
157-
else
158-
this.y2;
159-
} );
156+
if (d.lowestChild)
157+
return (d.lowestChild - d.level) * (barHeight + barSpacing)
158+
else
159+
this.y2;
160+
} );
160161

161162
var noRootEnter = traceEnter.filter( function (d, i) { return i != 0 })
162-
noRootEnter.append("line")
163-
.attr("x1", -4)
164-
.attr("y1", 0)
165-
.attr("x2", function (d) {
166-
return -4 - d.x + d.parent.x;
167-
} )
168-
.attr("y2", 0)
169-
.style("stroke", "black")
170-
.style("stroke-width", 1)
171-
.style("stroke-linecap", "round")
172-
.style("stroke-dasharray", 3);
163+
noRootEnter.append("line")
164+
.attr("x1", -4)
165+
.attr("y1", 0)
166+
.attr("x2", function (d) { return -4 - d.x + d.parent.x; } )
167+
.attr("y2", 0)
168+
.style("stroke", "black")
169+
.style("stroke-width", 1)
170+
.style("stroke-linecap", "round")
171+
.style("stroke-dasharray", 3);
173172

174173
traceEnter.append("circle")
175-
.attr("r", 4)
176-
.attr("cx", -3)
177-
.style("stroke", "black")
178-
.style("stroke-width", 1);
174+
.attr("r", 4)
175+
.attr("cx", -3)
176+
.style("stroke", "black")
177+
.style("stroke-width", 1);
179178

180179
// Enter any new traces at the parent's previous position.
181180
traceEnter.append("rect")

0 commit comments

Comments
 (0)