This is an automated email from the ASF dual-hosted git repository.

sarutak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new edc7c96741c4 [SPARK-54374][SQL][UI] Enlarge the SVG viewBox attribute 
of SQL plan visualization initialization
edc7c96741c4 is described below

commit edc7c96741c4382f79956f7ff5b9077e45f92014
Author: Kent Yao <[email protected]>
AuthorDate: Tue Jan 20 19:07:33 2026 +0900

    [SPARK-54374][SQL][UI] Enlarge the SVG viewBox attribute of SQL plan 
visualization initialization
    
    ### What changes were proposed in this pull request?
    
    This is a follow-up to SPARK-54373. Enlarge the SVG viewBox attribute of 
SQL plan visualization initialization from a 100×100 window to an available 
width of the window × 1000.
    
    ### Why are the changes needed?
    
    Improve the visualization quality while the SQL plan graphics are being 
painted, consistent with the improvement made to Job DAG in SPARK-54373.
    
    ### 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?
    
    Yes, GitHub Copilot was used to assist with reviewing SPARK-54373 and 
applying the same pattern to spark-sql-viz.js.
    
    Closes #53864 from yaooqinn/SPARK-54374.
    
    Authored-by: Kent Yao <[email protected]>
    Signed-off-by: Kousuke Saruta <[email protected]>
---
 .../org/apache/spark/sql/execution/ui/static/spark-sql-viz.js         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
 
b/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
index faf30d5d5422..0065f81a6a36 100644
--- 
a/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
+++ 
b/sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js
@@ -27,7 +27,9 @@ function shouldRenderPlanViz() {
 }
 
 function renderPlanViz() {
-  var svg = planVizContainer().append("svg");
+  var svg = planVizContainer()
+    .append("svg")
+    .attr("viewBox", `${-PlanVizConstants.svgMarginX} 
${-PlanVizConstants.svgMarginY} ${window.innerWidth || 1920} 1000`);
   var metadata = d3.select("#plan-viz-metadata");
   var dot = metadata.select(".dot-file").text().trim();
   var graph = svg.append("g");


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to