Skip to content

Commit c5468b9

Browse files
committed
[SPARK-54373][UI] Enlarge the SVG viewBox attribute of Job DAG initialization
### What changes were proposed in this pull request? Enlarge the SVG viewBox attribute of Job DAG initialization from a 100*100 window to an available width of the window * 1000. ### Why are the changes needed? improve the visualization while the graphics are being painted ### Does this PR introduce _any_ user-facing change? No, the final sizes of these SVGs will be adjusted to the actual needs ### How was this patch tested? tested in Chrome DevTools ### Was this patch authored or co-authored using generative AI tooling? no Closes #53087 from yaooqinn/SPARK-54373. Authored-by: Kent Yao <yao@apache.org> Signed-off-by: Kent Yao <yao@apache.org>
1 parent 5fb072e commit c5468b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/resources/org/apache/spark/ui/static/spark-dag-viz.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ function renderDagViz(forJob) {
157157
}
158158

159159
// Render
160-
var svg = graphContainer().append("svg").attr("class", jobOrStage);
160+
const svg = graphContainer()
161+
.append("svg")
162+
.attr("class", jobOrStage)
163+
.attr("viewBox", `${-VizConstants.svgMarginX} ${-VizConstants.svgMarginY} ${window.innerWidth || 1920} 1000`);
161164
if (forJob) {
162165
renderDagVizForJob(svg);
163166
} else {

0 commit comments

Comments
 (0)