Skip to content

Commit dd46f98

Browse files
committed
aligned all unit labels and ticks
1 parent 0564b62 commit dd46f98

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

streaming/src/main/resources/org/apache/spark/streaming/ui/static/streaming-page.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ var maxXForHistogram = 0;
3131
var histogramBinCount = 10;
3232
var yValueFormat = d3.format(",.2f");
3333

34+
var unitLabelYOffset = -10;
35+
3436
// Show a tooltip "text" for "node"
3537
function showBootstrapTooltip(node, text) {
3638
$(node).tooltip({title: text, trigger: "manual", container: "body"});
@@ -133,7 +135,7 @@ function drawTimeline(id, data, minX, maxX, minY, maxY, unitY, batchInterval) {
133135
.attr("class", "y axis")
134136
.call(yAxis)
135137
.append("text")
136-
.attr("transform", "translate(0," + (-3) + ")")
138+
.attr("transform", "translate(0," + unitLabelYOffset + ")")
137139
.text(unitY);
138140

139141

@@ -248,7 +250,7 @@ function drawHistogram(id, values, minY, maxY, unitY, batchInterval) {
248250
.attr("class", "x axis")
249251
.call(xAxis)
250252
.append("text")
251-
.attr("transform", "translate(" + (margin.left + width - 50) + ", 0)")
253+
.attr("transform", "translate(" + (margin.left + width - 50) + ", " + unitLabelYOffset + ")")
252254
.text("#batches");
253255

254256
svg.append("g")

0 commit comments

Comments
 (0)