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

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new c7aef3a  profiling(flame): drop the duplicate native tooltip
c7aef3a is described below

commit c7aef3a35db4d41420c12dba2828a7e370fe5f6d
Author: Wu Sheng <[email protected]>
AuthorDate: Thu May 21 21:25:38 2026 +0800

    profiling(flame): drop the duplicate native tooltip
    
    With the d3-tip tooltip disabled, d3-flame-graph still appends an
    <svg:title> per cell (filled from the label handler → "name (pct%, N
    samples)"), which rendered a browser-native tooltip on top of our
    richer cursor-following .fg-tip card. Set an empty label handler so the
    title text is blank — only the custom card shows now.
---
 apps/ui/src/layer/profiling/ProfileFlameGraph.vue | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/apps/ui/src/layer/profiling/ProfileFlameGraph.vue 
b/apps/ui/src/layer/profiling/ProfileFlameGraph.vue
index f7a52f4..dfb30c6 100644
--- a/apps/ui/src/layer/profiling/ProfileFlameGraph.vue
+++ b/apps/ui/src/layer/profiling/ProfileFlameGraph.vue
@@ -186,6 +186,13 @@ function draw(): void {
     });
 
   chart.tooltip(false);
+  // Suppress the library's native <title> tooltip ("name (pct%, N
+  // samples)"). With the d3-tip tooltip off, d3-flame-graph still
+  // appends an <svg:title> per cell filled from the label handler —
+  // it collided with our richer cursor-following .fg-tip card. An empty
+  // handler leaves the title text blank (no browser tooltip). Cast: the
+  // method exists at runtime but isn't in the shipped d3-flame-graph types.
+  (chart as unknown as { setLabelHandler(fn: () => string): unknown 
}).setLabelHandler(() => '');
   // Click selects + zooms. d3-flame-graph zooms to the clicked frame by
   // default (the "expand"); we additionally pin a persistent outline on
   // the selected frame so the operator can see WHICH cell is focused —

Reply via email to