Skip to content

Commit 8fa794b

Browse files
yaooqinnsarutak
authored andcommitted
[SPARK-46627][SS][UI] Fix timeline tooltip content on streaming ui
### What changes were proposed in this pull request? Fix timeline tooltip content on streaming ui ### Why are the changes needed? d3 v7 mouseover event has changed, we shall get the values from the 2nd parameter instead of the 1st one which points to the mouse event. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? ![image](https://github.com/apache/spark/assets/8326978/ded6e09e-837d-499c-8fed-21e3f42d8244) Additionally, https://issues.apache.org/jira/browse/SPARK-46631 was created to add UT for drawTimeline. We don't do it in this patch because it needs code refactoring beyond the scope of the current PR. ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#44633 from yaooqinn/SPARK-46627. Authored-by: Kent Yao <[email protected]> Signed-off-by: Kousuke Saruta <[email protected]>
1 parent ee2a87b commit 8fa794b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function drawTimeline(id, data, minX, maxX, minY, maxY, unitY, batchInterval) {
223223
.attr("cx", function(d) { return x(d.x); })
224224
.attr("cy", function(d) { return y(d.y); })
225225
.attr("r", function(d) { return isFailedBatch(d.x) ? "2" : "3";})
226-
.on('mouseover', function(d) {
226+
.on('mouseover', function(event, d) {
227227
var tip = yValueFormat(d.y) + " " + unitY + " at " + timeTipStrings[d.x];
228228
showBootstrapTooltip(d3.select(this), tip);
229229
// show the point

0 commit comments

Comments
 (0)