mirror of
https://github.com/we-promise/sure.git
synced 2026-06-06 03:09:02 +00:00
fix(charts): address review — glide opt-in, no shadowed var, truncate cap
- The 80ms left/top transition moved out of .chart-tooltip: it eased the snap-positioned goal tooltip but made cursor-following tooltips (sankey, time-series) trail the pointer by a frame. Goal projection opts back in via inline style; the component comment documents the split. - setRelation reuses _draw()'s targetAmount const instead of declaring a local 'target' that shadowed the target-date const. - Sankey context line gets max-w-64 so truncate has a constraint to fire against on deep flows. - Component comment now says 10x12 padding, matching the declaration.
This commit is contained in:
@@ -550,7 +550,9 @@ export default class extends Controller {
|
||||
// what's hovered. No color swatch — the hover highlight on the diagram
|
||||
// itself already says which ribbon the card belongs to.
|
||||
#tooltipContext(label) {
|
||||
return `<div class="text-xs text-secondary mb-1 truncate">${label}</div>`;
|
||||
// max-w-64 gives truncate a constraint to fire against — an absolute
|
||||
// tooltip otherwise grows to fit and never ellipsizes deep flows.
|
||||
return `<div class="max-w-64 text-xs text-secondary mb-1 truncate">${label}</div>`;
|
||||
}
|
||||
|
||||
#showTooltip(event, value, percentage, contextHtml = null) {
|
||||
|
||||
Reference in New Issue
Block a user