Area: UI Issues
Sub-Area: Lineage Graph Rendering
Issue
When viewing the lineage graph in DataHub, the home (focal) node is incorrectly positioned at the far left of the canvas, causing upstream nodes to render on the right-hand side alongside downstream nodes. This produces a chaotic, difficult-to-navigate layout that is the opposite of the expected left=upstream / right=downstream arrangement. The problem occurs specifically when the browser's default display language is set to a locale that uses the Unicode Minus Sign (U+2212, −) rather than the standard ASCII hyphen-minus (U+002D, -) when formatting negative numbers. Confirmed affected locales include Swedish, Norwegian, Danish, and Finnish.
Error Messages
No explicit error message is displayed; the symptom is a visually incorrect lineage graph layout.
You Might Be Asking
- Why are upstream nodes appearing on the right side of my lineage graph instead of the left?
- Why does my lineage layout look correct in one browser but broken in another?
- Why did my lineage graph layout break after switching browsers?
- Does DataHub's lineage view support non-English browser languages?
Solution
Immediate Workaround
Switch your browser's default display language to English. This resolves the layout issue immediately without any server-side changes.
Google Chrome:
- Open Chrome and navigate to Settings.
- Scroll down to Languages and expand the section.
- Add English if it is not already listed, then drag it to the top of the language list.
- Relaunch Chrome when prompted.
- Reload the DataHub lineage page — the layout should now render correctly.
Mozilla Firefox:
- Open Firefox and navigate to Settings → General.
- Under the Language and Appearance section, click Choose next to the preferred language for displaying pages.
- Add English (United States) or English and move it to the top of the list.
- Click OK and reload DataHub.
Root Cause Explanation
The DataHub lineage layout engine (introduced with LineageV2 and carried forward into LineageV3) uses JavaScript's toLocaleString() method to convert numeric layer values to strings when computing graph node positions. Upstream nodes are assigned negative layer numbers (e.g., -1, -2). The layout code then identifies upstream layers by checking whether the string representation starts with a hyphen-minus character:
// Affected code pattern (simplified)
const isUpstream = layerKey.startsWith('-');
On locales such as Swedish, Norwegian, Danish, and Finnish, (-1).toLocaleString() returns "−1" using the Unicode Minus Sign (U+2212) instead of the ASCII hyphen-minus (U+002D). Because the startsWith('-') check only matches the ASCII character, all upstream layers silently fail the check and are classified as downstream — causing them to render on the right side of the home node.
The permanent fix replaces toLocaleString() with locale-independent string conversion (String(main)) in the lineage layer computation logic, ensuring consistent behavior regardless of browser locale.
// Before (locale-dependent — broken on non-English locales)
const layerKey = main.toLocaleString();
// After (locale-independent — correct behavior everywhere)
const layerKey = String(main);
Permanent Fix
This bug has been resolved in the DataHub codebase. The fix is available in the following releases:
- DataHub OSS: Available in releases following the merge of the fix (see GitHub issue #16096).
- DataHub Cloud (SaaS): Deployed in v2.0.0-cloud and later.
- DataHub CLI: Available from v1.6.0.1 and later.
If you are on a version that includes the fix, no browser language change is required.
Additional Notes
- This bug was present in LineageV2 and LineageV3 implementations. The original LineageV1 UI was not affected because it used a different layout approach that did not rely on
toLocaleString()for layer key generation. - The issue is purely client-side (browser locale) and is not caused by any server configuration, ingestion pipeline, or metadata problem.
- Affected locales confirmed to use Unicode Minus Sign for negative number formatting include Swedish (
sv), Norwegian (no/nb/nn), Danish (da), and Finnish (fi). Other locales may also be affected if their number formatting uses a non-ASCII minus character. - If you are on a version prior to the fix and cannot change your browser language, you can manually rearrange lineage nodes by dragging them in the lineage canvas as a temporary visual workaround.
- The relevant source files are
datahub-web-react/src/app/lineageV2/NodeBuilder.tsanddatahub-web-react/src/app/lineageV3/useComputeGraph/NodeBuilder.ts.
Related Documentation
- GitHub Issue #16096 — Lineage layout broken on non-English browser locales
- DataHub Lineage Feature Guide
- Lineage Impact Analysis
Tags: lineage, lineage-graph, ui-rendering, browser-locale, unicode, swedish-locale, nordic-locale, lineageV2, lineageV3, layout-bug